From d62fe21d47985e96d298dfa0dcce933fbc169380 Mon Sep 17 00:00:00 2001 From: Gloria <32610623+yeah-its-gloria@users.noreply.github.com> Date: Mon, 6 Mar 2023 08:31:05 +0100 Subject: [PATCH] RADV bug fix (#139) * Use correct typing for stencil, dispatch launch on UI thread * Clean up some LaunchPath code --- src/xenia/app/xenia_main.cc | 3 ++- src/xenia/gpu/vulkan/vulkan_render_target_cache.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xenia/app/xenia_main.cc b/src/xenia/app/xenia_main.cc index 4e644f777..b7e29bf34 100644 --- a/src/xenia/app/xenia_main.cc +++ b/src/xenia/app/xenia_main.cc @@ -614,7 +614,8 @@ void EmulatorApp::EmulatorThread() { if (!path.empty()) { // Normalize the path and make absolute. auto abs_path = std::filesystem::absolute(path); - result = emulator_->LaunchPath(abs_path); + + result = app_context().CallInUIThread([this, abs_path]() { return emulator_->LaunchPath(abs_path); }); if (XFAILED(result)) { xe::FatalError(fmt::format("Failed to launch target: {:08X}", result)); app_context().RequestDeferredQuit(); diff --git a/src/xenia/gpu/vulkan/vulkan_render_target_cache.cc b/src/xenia/gpu/vulkan/vulkan_render_target_cache.cc index 8113827e5..75aac0dcb 100644 --- a/src/xenia/gpu/vulkan/vulkan_render_target_cache.cc +++ b/src/xenia/gpu/vulkan/vulkan_render_target_cache.cc @@ -2289,7 +2289,7 @@ VkShaderModule VulkanRenderTargetCache::GetTransferShader( builder.addCapability(spv::CapabilityStencilExportEXT); output_fragment_stencil_ref = builder.createVariable(spv::NoPrecision, spv::StorageClassOutput, - type_int, "gl_FragStencilRefARB"); + type_uint, "gl_FragStencilRefARB"); builder.addDecoration(output_fragment_stencil_ref, spv::DecorationBuiltIn, spv::BuiltInFragStencilRefEXT);