summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-17 13:13:02 -0600
committerBrian Paul <[email protected]>2008-09-17 13:13:02 -0600
commit133693ebe8904de785610efd38219bca67b75222 (patch)
tree957fceaa7f96f827b3fb7605eb8dc465d577de44 /src
parent095ca0acd8019e8f2da89f9320b92ce4a96a140e (diff)
mesa: update program->NumAddressRegs field in _slang_update_inputs_outputs()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_link.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index a6390846b26..a44d0014770 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -363,6 +363,7 @@ static void
_slang_update_inputs_outputs(struct gl_program *prog)
{
GLuint i, j;
+ GLuint maxAddrReg = 0;
prog->InputsRead = 0x0;
prog->OutputsWritten = 0x0;
@@ -374,11 +375,19 @@ _slang_update_inputs_outputs(struct gl_program *prog)
if (inst->SrcReg[j].File == PROGRAM_INPUT) {
prog->InputsRead |= 1 << inst->SrcReg[j].Index;
}
+ else if (inst->SrcReg[j].File == PROGRAM_ADDRESS) {
+ maxAddrReg = MAX2(maxAddrReg, inst->SrcReg[j].Index + 1);
+ }
}
if (inst->DstReg.File == PROGRAM_OUTPUT) {
prog->OutputsWritten |= 1 << inst->DstReg.Index;
}
+ else if (inst->DstReg.File == PROGRAM_ADDRESS) {
+ maxAddrReg = MAX2(maxAddrReg, inst->DstReg.Index + 1);
+ }
}
+
+ prog->NumAddressRegs = maxAddrReg;
}