Skip to content

Commit 7596e62

Browse files
committed
layers: Update swapchain semaphore error message
1 parent 7c92446 commit 7596e62

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

layers/core_checks/cc_synchronization.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static std::string GetSemaphoreInUseBySwapchainMessage(const vvl::Semaphore::Swa
228228
const vvl::Swapchain &swapchain = *swapchain_info.swapchain;
229229

230230
ss << "(" << semaphore_str << ") is being signaled by " << queue_str << ", but it may still be in use by "
231-
<< logger.FormatHandle(swapchain.Handle()) << ".\n\n";
231+
<< logger.FormatHandle(swapchain.Handle()) << ".\n";
232232

233233
if (swapchain_info.acquire_counter_value > 0) {
234234
const uint32_t max_print_count = 8; // max number of history items to print
@@ -243,11 +243,7 @@ static std::string GetSemaphoreInUseBySwapchainMessage(const vvl::Semaphore::Swa
243243
marked_history_index = (history_length - 1) - (swapchain.acquire_count - swapchain_info.acquire_counter_value);
244244
}
245245
// Print acquire history
246-
if (print_count == 1) {
247-
ss << "The only acquired image index so far: ";
248-
} else {
249-
ss << "Here are the last " << print_count << " acquired image indices: ";
250-
}
246+
ss << "Here are the most recently acquired image indices: ";
251247
for (uint32_t i = 0; i < print_count; i++) {
252248
uint32_t history_index = first_history_index + i;
253249
uint32_t acquired_image_index = swapchain.GetAcquiredImageIndexFromHistory(history_index);
@@ -277,7 +273,7 @@ static std::string GetSemaphoreInUseBySwapchainMessage(const vvl::Semaphore::Swa
277273
ss << " and cannot be safely reused with image index "
278274
<< swapchain.GetAcquiredImageIndexFromHistory(history_length - 1);
279275
}
280-
ss << ".\n\n";
276+
ss << ".\n";
281277
// Additional details
282278
ss << "Vulkan insight: One solution is to assign each image its own semaphore.";
283279
if (print_count >= 2 && swapchain.GetAcquiredImageIndexFromHistory(history_length - 2) ==
@@ -294,7 +290,7 @@ static std::string GetSemaphoreInUseBySwapchainMessage(const vvl::Semaphore::Swa
294290
ss << "Vulkan insight:";
295291
}
296292
// Shared additional details.
297-
ss << " Here are common methods to ensure that a semaphore passed to vkQueuePresentKHR is not in use and can be "
293+
ss << " Here are some common methods to ensure that a semaphore passed to vkQueuePresentKHR is not in use and can be "
298294
"safely reused:\n"
299295
"\ta) Use a separate semaphore per swapchain image. Index these semaphores using the index of the "
300296
"acquired image.\n"

0 commit comments

Comments
 (0)