From 2c41eecdb167ddb3632ee00124fedfedb297ce85 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 22 Oct 2022 23:45:29 +0300 Subject: [PATCH] rsx: Force position invariance on GPUs where it matters --- rpcs3/Emu/RSX/GL/GLVertexProgram.cpp | 2 +- rpcs3/Emu/RSX/VK/VKVertexProgram.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp b/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp index c4f04dee8..9115e0781 100644 --- a/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp +++ b/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp @@ -129,7 +129,7 @@ void GLVertexDecompilerThread::insertMainStart(std::stringstream & OS) properties2.emulate_zclip_transform = true; properties2.emulate_depth_clip_only = dev_caps.NV_depth_buffer_float_supported; properties2.low_precision_tests = dev_caps.vendor_NVIDIA; - properties2.require_explicit_invariance = dev_caps.vendor_MESA; + properties2.require_explicit_invariance = dev_caps.vendor_MESA || (dev_caps.vendor_NVIDIA && g_cfg.video.shader_precision != gpu_preset_level::low); insert_glsl_legacy_function(OS, properties2); glsl::insert_vertex_input_fetch(OS, glsl::glsl_rules_opengl4, dev_caps.vendor_INTEL == false); diff --git a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp index faec3e2e9..5b8b7023e 100644 --- a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp +++ b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp @@ -208,6 +208,7 @@ void VKVertexDecompilerThread::insertMainStart(std::stringstream & OS) properties2.emulate_zclip_transform = true; properties2.emulate_depth_clip_only = vk::g_render_device->get_shader_types_support().allow_float64; properties2.low_precision_tests = vk::get_driver_vendor() == vk::driver_vendor::NVIDIA; + properties2.require_explicit_invariance = (vk::get_driver_vendor() == vk::driver_vendor::NVIDIA && g_cfg.video.shader_precision != gpu_preset_level::low); glsl::insert_glsl_legacy_function(OS, properties2); glsl::insert_vertex_input_fetch(OS, glsl::glsl_rules_spirv);