From 9af71699a447c5b7d52530e534076b8718773d0d Mon Sep 17 00:00:00 2001 From: kd-11 Date: Wed, 11 Oct 2017 01:31:26 +0300 Subject: [PATCH] rsx: Minor fixes - Dont skip cb if a problem occurs, just spin on it instead to allow possibility of recovery - Vulkan cleanup for the die_with_error helper --- rpcs3/Emu/RSX/RSXThread.cpp | 2 -- rpcs3/Emu/RSX/VK/VKHelpers.cpp | 8 ++++---- rpcs3/Emu/RSX/VK/VKHelpers.h | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index d0ce583330..f503376cd4 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -495,7 +495,6 @@ namespace rsx LOG_ERROR(RSX, "Invalid FIFO queue get/put registers found, get=0x%X, put=0x%X", get, put); invalid_command_interrupt_raised = true; - ctrl->get = put; continue; } @@ -546,7 +545,6 @@ namespace rsx LOG_ERROR(RSX, "Invalid FIFO queue args ptr found, get=0x%X, cmd=0x%X, count=%d", get, cmd, count); invalid_command_interrupt_raised = true; - ctrl->get = put; continue; } diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.cpp b/rpcs3/Emu/RSX/VK/VKHelpers.cpp index c8b30268a3..382e266375 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.cpp +++ b/rpcs3/Emu/RSX/VK/VKHelpers.cpp @@ -373,7 +373,7 @@ namespace vk return (g_num_processed_frames > 0)? g_num_processed_frames - 1: 0; } - void die_with_error(std::string faulting_addr, VkResult error_code) + void die_with_error(const char* faulting_addr, VkResult error_code) { std::string error_message; int severity = 0; //0 - die, 1 - warn, 2 - nothing @@ -457,16 +457,16 @@ namespace vk error_message = "Invalid external handle (VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX)"; break; default: - error_message = fmt::format("Unknown Code (%Xh, %d)", (s32)error_code, (s32&)error_code); + error_message = fmt::format("Unknown Code (%Xh, %d)%s", (s32)error_code, (s32&)error_code, faulting_addr); break; } switch (severity) { case 0: - fmt::throw_exception("Assertion Failed! Vulkan API call failed with unrecoverable error: %s", (error_message + faulting_addr).c_str()); + fmt::throw_exception("Assertion Failed! Vulkan API call failed with unrecoverable error: %s%s", error_message.c_str(), faulting_addr); case 1: - LOG_ERROR(RSX, "Vulkan API call has failed with an error but will continue: %s", (error_message + faulting_addr).c_str()); + LOG_ERROR(RSX, "Vulkan API call has failed with an error but will continue: %s%s", error_message.c_str(), faulting_addr); break; } } diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.h b/rpcs3/Emu/RSX/VK/VKHelpers.h index 8e06b36816..8b46cc495c 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.h +++ b/rpcs3/Emu/RSX/VK/VKHelpers.h @@ -94,7 +94,7 @@ namespace vk const u64 get_current_frame_id(); const u64 get_last_completed_frame_id(); - void die_with_error(std::string faulting_addr, VkResult error_code); + void die_with_error(const char* faulting_addr, VkResult error_code); struct memory_type_mapping {