mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 00:21:35 +00:00
- fix command buffer invalidation bug when DynamicSet is updated
This commit is contained in:
parent
a7e8541341
commit
ce73fe5b16
1 changed files with 5 additions and 0 deletions
|
@ -165,6 +165,11 @@ void VkRenderPassManager::UpdateDynamicSet()
|
|||
{
|
||||
auto fb = GetVulkanFrameBuffer();
|
||||
|
||||
// In some rare cases drawing commands may already have been created before VulkanFrameBuffer::BeginFrame is called.
|
||||
// Make sure there there are no active command buffers using DynamicSet when we update it:
|
||||
fb->GetRenderState()->EndRenderPass();
|
||||
fb->WaitForCommands(false);
|
||||
|
||||
WriteDescriptors update;
|
||||
update.addBuffer(DynamicSet.get(), 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, fb->ViewpointUBO->mBuffer.get(), 0, sizeof(HWViewpointUniforms));
|
||||
update.addBuffer(DynamicSet.get(), 1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, fb->LightBufferSSO->mBuffer.get());
|
||||
|
|
Loading…
Reference in a new issue