mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 17:30:20 +01:00
glsl_to_tgsi: always run copy_propagate() and eliminate_dead_code_advanced()
These two passes are written to handle indirect addressing properly.
This commit is contained in:
parent
4c8b6a2868
commit
9c2810103d
1 changed files with 4 additions and 5 deletions
|
|
@ -4422,18 +4422,17 @@ get_mesa_program(struct gl_context *ctx,
|
|||
if (target == GL_VERTEX_PROGRAM_ARB)
|
||||
v->remove_output_reads(PROGRAM_VARYING);
|
||||
|
||||
/* Perform the simplify_cmp optimization, which is required by r300g. */
|
||||
/* Perform optimizations on the instructions in the glsl_to_tgsi_visitor. */
|
||||
v->simplify_cmp();
|
||||
v->copy_propagate();
|
||||
while (v->eliminate_dead_code_advanced());
|
||||
|
||||
/* Perform optimizations on the instructions in the glsl_to_tgsi_visitor.
|
||||
* FIXME: These passes to optimize temporary registers don't work when there
|
||||
/* FIXME: These passes to optimize temporary registers don't work when there
|
||||
* is indirect addressing of the temporary register space. We need proper
|
||||
* array support so that we don't have to give up these passes in every
|
||||
* shader that uses arrays.
|
||||
*/
|
||||
if (!v->indirect_addr_temps) {
|
||||
v->copy_propagate();
|
||||
while (v->eliminate_dead_code_advanced());
|
||||
v->eliminate_dead_code();
|
||||
v->merge_registers();
|
||||
v->renumber_registers();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue