From 71761e211736c92fea4317cc1ed8a05a5492a0e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= Date: Mon, 8 Apr 2024 10:44:06 +0200 Subject: [PATCH] r300: move dead constants pass earlier for vertex shaders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to put it before source conflict resolve because we will be shuffling immediates around, so we can introduce new conflicts (albeit in general there should be less conflicts instead). Signed-off-by: Pavel Ondračka Reviewed-by: Filip Gawin Part-of: --- src/gallium/drivers/r300/compiler/r3xx_vertprog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c index 34fd1627332..8c622401254 100644 --- a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c +++ b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c @@ -801,10 +801,10 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler *c) {"native rewrite", 1, 1, rc_local_transform, alu_rewrite}, {"unused channels", 1, opt, rc_mark_unused_channels, NULL}, {"dataflow optimize", 1, opt, rc_optimize, NULL}, + {"dead constants", 1, 1, rc_remove_unused_constants, &c->code->constants_remap_table}, /* This pass must be done after optimizations. */ {"source conflict resolve", 1, 1, rc_local_transform, resolve_src_conflicts}, {"register allocation", 1, opt, allocate_temporary_registers, NULL}, - {"dead constants", 1, 1, rc_remove_unused_constants, &c->code->constants_remap_table}, {"lower control flow opcodes", 1, is_r500, rc_vert_fc, NULL}, {"final code validation", 0, 1, rc_validate_final_shader, NULL}, {"machine code generation", 0, 1, translate_vertex_program, NULL},