Browse Source

Vulkan renderer: Fix image flickering due to mismatched semaphore (#601)

wh1t3lord 1 year ago
parent
commit
b09f19918b
2 changed files with 3 additions and 3 deletions
  1. 2 2
      Backends/RmlUi_Renderer_VK.cpp
  2. 1 1
      Backends/RmlUi_Renderer_VK.h

+ 2 - 2
Backends/RmlUi_Renderer_VK.cpp

@@ -2660,10 +2660,10 @@ void RenderInterface_VK::Update_PendingForDeletion_Geometries() noexcept
 
 
 void RenderInterface_VK::Submit() noexcept
 void RenderInterface_VK::Submit() noexcept
 {
 {
-	const VkSemaphore p_semaphores_wait[] = {m_semaphores_image_available[m_semaphore_index_previous]};
+	const VkSemaphore p_semaphores_wait[] = {m_semaphores_image_available[m_semaphore_index]};
 	const VkSemaphore p_semaphores_signal[] = {m_semaphores_finished_render[m_semaphore_index]};
 	const VkSemaphore p_semaphores_signal[] = {m_semaphores_finished_render[m_semaphore_index]};
 
 
-	VkFence p_fence = m_executed_fences[m_semaphore_index_previous];
+	VkFence p_fence = m_executed_fences[m_semaphore_index];
 
 
 	VkPipelineStageFlags submit_wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
 	VkPipelineStageFlags submit_wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
 
 

+ 1 - 1
Backends/RmlUi_Renderer_VK.h

@@ -104,7 +104,7 @@ RMLUI_DISABLE_ALL_COMPILER_WARNINGS_POP
  * and delete operations every frame (CPU side), on GPU we implemented the pre-allocated buffer with virtual allocs (Vma) so there's no problems and
  * and delete operations every frame (CPU side), on GPU we implemented the pre-allocated buffer with virtual allocs (Vma) so there's no problems and
  * all fine. I wrote all ideas and implementation for that.
  * all fine. I wrote all ideas and implementation for that.
  *
  *
- * @author wh1t3lord
+ * @author wh1t3lord (https://github.com/wh1t3lord)
  */
  */
 
 
 class RenderInterface_VK : public Rml::RenderInterface {
 class RenderInterface_VK : public Rml::RenderInterface {