Mesa (main): radv: do not enable per-vertex VRS if the FS uses gl_FragCoord
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 16 21:35:51 UTC 2022
Module: Mesa
Branch: main
Commit: 377884c9c800164ac6e791241ef8c621f205a0d3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=377884c9c800164ac6e791241ef8c621f205a0d3
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Fri Feb 11 16:46:56 2022 +0100
radv: do not enable per-vertex VRS if the FS uses gl_FragCoord
It breaks postprocessing in some games like Ghostrunner, Deathloop,
Street Fighter V.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15042>
---
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;
}
More information about the mesa-commit
mailing list