Clear attachments in MVKCmdBeginRenderPass between invocations.
Fixes crash due to incorrect number of attachments.
Update What's New document with VK_KHR_imageless_framebuffer extension.
diff --git a/Docs/Whats_New.md b/Docs/Whats_New.md
index 08ded05..e13796b 100644
--- a/Docs/Whats_New.md
+++ b/Docs/Whats_New.md
@@ -18,6 +18,8 @@
Released TBD
+- Add support for extensions:
+ - `VK_KHR_imageless_framebuffer`
- Make `vkGetPastPresentationTimingGOOGLE()` queuing behavior compliant with Vulkan spec.
- Expose `vkGetIOSurfaceMVK()` and `vkUseIOSurfaceMVK()` without requiring _Objective-C_.
- Support _Xcode 12.5_ build settings, build warnings, and SDK change to availability of
diff --git a/MoltenVK/MoltenVK/Commands/MVKCmdRenderPass.mm b/MoltenVK/MoltenVK/Commands/MVKCmdRenderPass.mm
index 4fc1146..42b84f1 100644
--- a/MoltenVK/MoltenVK/Commands/MVKCmdRenderPass.mm
+++ b/MoltenVK/MoltenVK/Commands/MVKCmdRenderPass.mm
@@ -58,6 +58,7 @@
_clearValues.push_back(pRenderPassBegin->pClearValues[i]);
}
+ _attachments.clear(); // Clear for reuse
bool imageless = false;
for (auto* next = (const VkBaseInStructure*)pRenderPassBegin->pNext; next; next = next->pNext) {
switch (next->sType) {