Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan/CommandBufferManager: Show error code in PanicAlerts. #11119

Merged
merged 1 commit into from Oct 4, 2022

Conversation

AdmiralCurtiss
Copy link
Contributor

So people will actually tell us the error code when this happens. (https://bugs.dolphin-emu.org/issues/13060)

@@ -303,7 +303,7 @@ void CommandBufferManager::SubmitCommandBuffer(bool submit_on_worker_thread,
if (res != VK_SUCCESS)
{
LOG_VULKAN_ERROR(res, "vkEndCommandBuffer failed: ");
PanicAlertFmt("Failed to end command buffer");
PanicAlertFmt("Failed to end command buffer: {} ({})", VkResultToString(res), res);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOG_VULKAN_ERROR uses static_cast<int>(res), but that probably isn't necessary.

I was going to suggest that it might be better to print it as {:08x}, but it looks like the docs show them in decimal. So this is probably good as-is.

@dolphin-emu-bot
Copy link
Contributor

FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:

  • pm-hc-jp on ogl-lin-radeon: diff

automated-fifoci-reporter

@Pokechu22 Pokechu22 merged commit 5479f0e into dolphin-emu:master Oct 4, 2022
11 checks passed
@AdmiralCurtiss AdmiralCurtiss deleted the vulkan-panic-alerts branch October 4, 2022 18:21
@K0bin
Copy link
Contributor

K0bin commented Oct 5, 2022

FWIW I don't think this will be particularly useful. The error code is most likely just gonna be VK_ERROR_DEVICE_LOST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants