summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_shader.c
diff options
context:
space:
mode:
authorDaniel Schürmann <[email protected]>2020-03-04 17:35:26 +0100
committerMarge Bot <[email protected]>2020-03-09 12:29:32 +0000
commitbdd7587414441920743fe476270560722b6beb18 (patch)
treec44d0c39a423b4195924b1eb3b4f6accb1b6cfc7 /src/amd/vulkan/radv_shader.c
parent9d64ad2fe791fcdc3c8c8c2115febdea7cd3e1ba (diff)
radv: use nir_lower_discard_to_demote to work around game bugs
Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4047>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r--src/amd/vulkan/radv_shader.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 40fa3d783d4..37b8ee45e34 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -445,6 +445,8 @@ radv_shader_compile_to_nir(struct radv_device *device,
NIR_PASS_V(nir, nir_lower_system_values);
NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
NIR_PASS_V(nir, radv_nir_lower_ycbcr_textures, layout);
+ if (device->instance->debug_flags & RADV_DEBUG_DISCARD_TO_DEMOTE)
+ NIR_PASS_V(nir, nir_lower_discard_to_demote);
}
/* Vulkan uses the separate-shader linking model */