mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
gallium/ttn: don't upset nir_validate w/ BRK's
Previously we were unconditionally doing ttn_get_src() even for instructions with no src's. Which created a lot of unnecessary load_const instructions. These were mostly harmless since NIR opt passes would strip them back out. But for an ENDIF following a BRK, it would result in load_const instructions created after the NIR break instruction. Which nir_validate dislikes. But we can actually just dtrt by using NumSrcRegs instead. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
d1f0e01979
commit
879dcf07f6
1 changed files with 1 additions and 1 deletions
|
|
@ -1491,7 +1491,7 @@ ttn_emit_instruction(struct ttn_compile *c)
|
|||
return;
|
||||
|
||||
nir_ssa_def *src[TGSI_FULL_MAX_SRC_REGISTERS];
|
||||
for (i = 0; i < TGSI_FULL_MAX_SRC_REGISTERS; i++) {
|
||||
for (i = 0; i < tgsi_inst->Instruction.NumSrcRegs; i++) {
|
||||
src[i] = ttn_get_src(c, &tgsi_inst->Src[i]);
|
||||
}
|
||||
nir_alu_dest dest = ttn_get_dest(c, tgsi_dst);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue