@@ -246,7 +246,7 @@ static std::string GetSemaphoreInUseBySwapchainMessage(const vvl::Semaphore::Swa
246
246
marked_history_index = (history_length - 1 ) - (swapchain.acquire_count - swapchain_info.acquire_counter_value );
247
247
}
248
248
// Print acquire history
249
- ss << " Here are the most recently acquired image indices: " ;
249
+ ss << " Most recently acquired image indices: " ;
250
250
for (uint32_t i = 0 ; i < print_count; i++) {
251
251
uint32_t history_index = first_history_index + i;
252
252
uint32_t acquired_image_index = swapchain.GetAcquiredImageIndexFromHistory (history_index);
@@ -261,7 +261,7 @@ static std::string GetSemaphoreInUseBySwapchainMessage(const vvl::Semaphore::Swa
261
261
ss << " , " ;
262
262
}
263
263
}
264
- ss << " .\n (brackets mark the last use of " << semaphore_str << " in a presentation operation)\n " ;
264
+ ss << " .\n (Brackets mark the last use of " << semaphore_str << " in a presentation operation. )\n " ;
265
265
// Describe problem details
266
266
ss << " Swapchain image " << swapchain_info.image_index << " was presented but was " ;
267
267
if (swapchain_fence_supported) {
@@ -277,29 +277,17 @@ static std::string GetSemaphoreInUseBySwapchainMessage(const vvl::Semaphore::Swa
277
277
<< swapchain.GetAcquiredImageIndexFromHistory (history_length - 1 );
278
278
}
279
279
ss << " .\n " ;
280
- // Additional details
281
- ss << " Vulkan insight: One solution is to assign each image its own semaphore." ;
282
- if (print_count >= 2 && swapchain.GetAcquiredImageIndexFromHistory (history_length - 2 ) ==
283
- swapchain.GetAcquiredImageIndexFromHistory (history_length - 1 )) {
284
- ss << " This also handles the case where vkAcquireNextImageKHR returns the same index twice in a "
285
- " row." ;
286
- }
287
280
}
288
281
} else { // Multiple swapchains use case. Describe problem without additional swapchain data
289
282
ss << " (" << semaphore_str << " ) is being signaled by " << queue_str
290
283
<< " , but it may still be in use by the swapchain since the corresponding swapchain image has not been "
291
284
" re-acquired.\n " ;
292
-
293
- ss << " Vulkan insight:" ;
294
285
}
295
- // Shared additional details.
296
- ss << " Here are some common methods to ensure that a semaphore passed to vkQueuePresentKHR is not in use and can be "
297
- " safely reused:\n "
298
- " \t a) Use a separate semaphore per swapchain image. Index these semaphores using the index of the "
299
- " acquired image.\n "
300
- " \t b) Consider the VK_KHR_swapchain_maintenance1 extension. It allows using a VkFence with the "
301
- " presentation operation." ;
302
-
286
+ ss << " Vulkan insight: See https://docs.vulkan.org/guide/latest/swapchain_semaphore_reuse.html for details on swapchain "
287
+ " semaphore reuse. Examples of possible approaches:\n "
288
+ " a) Use a separate semaphore per swapchain image. Index these semaphores using the index of the acquired image.\n "
289
+ " b) Consider the VK_KHR_swapchain_maintenance1 extension. It allows using a VkFence with the presentation "
290
+ " operation.\n " ;
303
291
return ss.str ();
304
292
}
305
293
0 commit comments