Mesa (master): radv: call radv_nir_lower_ycbcr_textures after first optimizations
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 27 10:16:26 UTC 2020
Module: Mesa
Branch: master
Commit: af0bc71015905f14f07abeb216499adc792e1b10
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=af0bc71015905f14f07abeb216499adc792e1b10
Author: Daniel Schürmann <daniel at schuermann.dev>
Date: Sun Jul 26 13:22:12 2020 +0200
radv: call radv_nir_lower_ycbcr_textures after first optimizations
There might still be tex instructions with undef texture/sampler before
the first round of optimizations. No pipelinedb changes.
Fixes: 14a12b771d0a380defacafe5825362af77ff21bd ('spirv: Rework our handling of images and samplers')
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6083>
---
src/amd/vulkan/radv_shader.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index a055d867138..adc54c0c589 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -473,7 +473,7 @@ 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);
@@ -541,6 +541,10 @@ radv_shader_compile_to_nir(struct radv_device *device,
if (!(flags & VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT))
radv_optimize_nir(nir, false, true);
+ /* call radv_nir_lower_ycbcr_textures() late as there might still be
+ * tex with undef texture/sampler before first optimization */
+ NIR_PASS_V(nir, radv_nir_lower_ycbcr_textures, layout);
+
/* We call nir_lower_var_copies() after the first radv_optimize_nir()
* to remove any copies introduced by nir_opt_find_array_copies().
*/
More information about the mesa-commit
mailing list