From 67ffe25fd9de94acc654312ec9261d811d139adf Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Mon, 21 Nov 2022 09:39:35 +0100 Subject: [PATCH] r600: Fix lower-to-scalar on TTN path We must limit what alu ops are scalazized, and since we now run finalize_nir we also have to make sure not to try to scalarize backend specific instructions that are introduced there. While we touch the code, also remove the vectorization, it is no longer helping. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7747 Fixes: a81c50a2 (r600/sfn: implement finalize_nir) Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/r600_shader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 532c25e..db0b16f 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -209,9 +209,8 @@ int r600_pipe_shader_create(struct pipe_context *ctx, /* Lower int64 ops because we have some r600 build-in shaders that use it */ if (nir_options->lower_int64_options) { NIR_PASS_V(sel->nir, nir_lower_regs_to_ssa); - NIR_PASS_V(sel->nir, nir_lower_alu_to_scalar, NULL, NULL); + NIR_PASS_V(sel->nir, nir_lower_alu_to_scalar, r600_lower_to_scalar_instr_filter, NULL); NIR_PASS_V(sel->nir, nir_lower_int64); - NIR_PASS_V(sel->nir, nir_opt_vectorize, NULL, NULL); } NIR_PASS_V(sel->nir, nir_lower_flrp, ~0, false); } -- 2.7.4