Update mvkClear() to support optional length parameter.
diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKQueryPool.mm b/MoltenVK/MoltenVK/GPUObjects/MVKQueryPool.mm
index 35e970f..acaf35b 100644
--- a/MoltenVK/MoltenVK/GPUObjects/MVKQueryPool.mm
+++ b/MoltenVK/MoltenVK/GPUObjects/MVKQueryPool.mm
@@ -259,7 +259,7 @@
     } else {  // Host-side reset
         id<MTLBuffer> vizBuff = getVisibilityResultMTLBuffer();
         size_t size = std::min(lastOffset, vizBuff.length) - firstOffset;
-        mvkClear((char *)[vizBuff contents] + firstOffset);
+        mvkClear((char *)[vizBuff contents] + firstOffset, size);
     }
 }
 
diff --git a/MoltenVK/MoltenVK/Utility/MVKFoundation.h b/MoltenVK/MoltenVK/Utility/MVKFoundation.h
index 04cb768..97c2197 100644
--- a/MoltenVK/MoltenVK/Utility/MVKFoundation.h
+++ b/MoltenVK/MoltenVK/Utility/MVKFoundation.h
@@ -418,11 +418,11 @@
 
 /** If pVal is not null, clears the memory occupied by *pVal by writing zeros to all the bytes. */
 template<typename T>
-void mvkClear(T* pVal) { if (pVal) { memset(pVal, 0, sizeof(T)); } }
+void mvkClear(T* pVal, size_t clearSize = sizeof(T)) { if (pVal) { memset(pVal, 0, clearSize); } }
 
 /** If pVal is not null, overrides the const declaration, and clears the memory occupied by *pVal by writing zeros to all the bytes. */
 template<typename T>
-void mvkClear(const T* pVal) { mvkClear((T*)pVal); }
+void mvkClear(const T* pVal, size_t clearSize = sizeof(T)) { mvkClear((T*)pVal, clearSize); }
 
 /**
  * If pSrc and pDst are not null, copies at most copySize bytes from the contents of the source