mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
mesa: fix instruction indexing bugs
We were looping over instructions but only looking at the 0th instruction's opcode. Fixes fd.o bug 27566.
This commit is contained in:
parent
21cf976ad9
commit
b22a00bff4
1 changed files with 2 additions and 2 deletions
|
|
@ -625,7 +625,7 @@ replace_registers(struct prog_instruction *inst, GLuint numInst,
|
|||
GLuint i, j;
|
||||
for (i = 0; i < numInst; i++) {
|
||||
/* src regs */
|
||||
for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) {
|
||||
for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) {
|
||||
if (inst[i].SrcReg[j].File == oldFile &&
|
||||
inst[i].SrcReg[j].Index == oldIndex) {
|
||||
inst[i].SrcReg[j].File = newFile;
|
||||
|
|
@ -652,7 +652,7 @@ adjust_param_indexes(struct prog_instruction *inst, GLuint numInst,
|
|||
{
|
||||
GLuint i, j;
|
||||
for (i = 0; i < numInst; i++) {
|
||||
for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) {
|
||||
for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) {
|
||||
GLuint f = inst[i].SrcReg[j].File;
|
||||
if (f == PROGRAM_CONSTANT ||
|
||||
f == PROGRAM_UNIFORM ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue