From 377884c9c800164ac6e791241ef8c621f205a0d3 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 11 Feb 2022 16:46:56 +0100 Subject: [PATCH] radv: do not enable per-vertex VRS if the FS uses gl_FragCoord MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It breaks postprocessing in some games like Ghostrunner, Deathloop, Street Fighter V. Signed-off-by: Samuel Pitoiset Reviewed-by: Timur Kristóf Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_pipeline.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index ea22e9c7250..d0bdc85ad20 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3677,6 +3677,12 @@ radv_consider_force_vrs(const struct radv_pipeline *pipeline, bool noop_fs, nir_ if (noop_fs) return false; + /* Do not enable if the PS uses gl_FragCoord because it breaks postprocessing in some games. */ + if (nir[MESA_SHADER_FRAGMENT] && + BITSET_TEST(nir[MESA_SHADER_FRAGMENT]->info.system_values_read, SYSTEM_VALUE_FRAG_COORD)) { + return false; + } + return true; }