mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 07:00:12 +01:00
prog_optimize: Only merge writes to temporary registers
In one optimization pass, register files may have been messed therefore merging instructions which use the same index in two different register files.
This commit is contained in:
parent
608f749ec3
commit
5a38e70d59
1 changed files with 5 additions and 1 deletions
|
|
@ -758,7 +758,11 @@ _mesa_remove_extra_moves(struct gl_program *prog)
|
|||
nesting--;
|
||||
break;
|
||||
case OPCODE_MOV:
|
||||
if (i > 0 && can_downward_mov_be_modifed(mov) && nesting == 0) {
|
||||
if (i > 0 &&
|
||||
can_downward_mov_be_modifed(mov) &&
|
||||
mov->SrcReg[0].File == PROGRAM_TEMPORARY &&
|
||||
nesting == 0)
|
||||
{
|
||||
|
||||
/* see if this MOV can be removed */
|
||||
const GLuint id = mov->SrcReg[0].Index;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue