From 21bdc7105d2f98e52a86c345527e97b959503bce Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Thu, 9 Apr 2026 16:19:20 +0200 Subject: [PATCH] radv: clarify that copy prop is required for correctness after D16 opt Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14854 Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_pipeline.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 8295605f793..9070657a76b 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -581,8 +581,10 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_graphics_stat bool run_copy_prop = false; NIR_PASS(run_copy_prop, stage->nir, nir_opt_16bit_tex_image, &opt_16bit_options); - /* Optimizing 16bit texture/image dests leaves scalar moves that stops - * nir_opt_vectorize from vectorzing the alu uses of them. + /* Optimizing 16bit texture/image dests leaves scalar moves that need to be removed + * before the next alu nir_lower_alu_width, otherwise we might end up with invalid swizzles + * in the backend. + * It also allows nir_opt_vectorize to make more progress. */ if (run_copy_prop) { NIR_PASS(_, stage->nir, nir_opt_copy_prop);