Fix GPU Buffer Map/Unmap pair to prevent stall if map fails on DX11

#942
This commit is contained in:
Wojtek Figat
2023-02-17 16:28:48 +01:00
parent 5dc63da4bf
commit 679757942f
7 changed files with 19 additions and 16 deletions

View File

@@ -689,8 +689,8 @@ bool GlobalSurfaceAtlasPass::Render(RenderContext& renderContext, GPUContext* co
objectsBufferCapacity = counter;
notReady = false;
}
_culledObjectsSizeBuffer->Unmap();
}
_culledObjectsSizeBuffer->Unmap();
// Allow to be ready if the buffer was already used
if (notReady && surfaceAtlasData.CulledObjectsBuffer && surfaceAtlasData.CulledObjectsBuffer->IsAllocated())