These have an implicit m0 read and don't write VGPRs.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333>
encoding |= reg(ctx, instr->operands[2]) << 24;
encoding |= (mubuf.tfe ? 1 : 0) << 23;
encoding |= (reg(ctx, instr->operands[0]) >> 2) << 16;
- if (instr->operands.size() > 3)
+ if (instr->operands.size() > 3 && !mubuf.lds)
encoding |= reg(ctx, instr->operands[3], 8) << 8;
- else
+ else if (!mubuf.lds)
encoding |= reg(ctx, instr->definitions[0], 8) << 8;
encoding |= reg(ctx, instr->operands[1], 8);
out.push_back(encoding);