From a1c73742f17fe1b7acdb413e49b730352f62bdc0 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 19 Mar 2021 10:37:00 -0700 Subject: Fixed issue with stale descriptor sets in Vulkan --- Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index 32f68f9d..2be6ea63 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -555,6 +555,9 @@ void DeviceContextVkImpl::CommitShaderResources(IShaderResourceBinding* pShaderR ResInfo.pResourceCache = &ResourceCache; BindInfo.SetStaleSRBBit(SRBIndex); + // We must not clear entire ResInfo as DescriptorSetBaseInd and DynamicOffsetCount + // are set by SetPipelineState(). + ResInfo.vkSets = {}; if (ResourceCache.GetNumDynamicBuffers() > 0) BindInfo.SetDynamicBufferBit(SRBIndex); -- cgit v1.2.3