summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_link.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-17 13:13:02 -0600
committerKeith Whitwell <[email protected]>2008-09-23 17:11:25 -0700
commit9118b02fd0e4c5c472d7dbf211eec350a1d37ea4 (patch)
tree2d8ad92921dd37646664150b05292531f5400584 /src/mesa/shader/slang/slang_link.c
parentc79779aff09073d87b9a6138bf09f23c3b8b5fd7 (diff)
mesa: update program->NumAddressRegs field in _slang_update_inputs_outputs()
Diffstat (limited to 'src/mesa/shader/slang/slang_link.c')
-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 b780e87fe65..dd7d5be6d8b 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -381,6 +381,7 @@ static void
_slang_update_inputs_outputs(struct gl_program *prog)
{
GLuint i, j;
+ GLuint maxAddrReg = 0;
prog->InputsRead = 0x0;
prog->OutputsWritten = 0x0;
@@ -406,11 +407,19 @@ _slang_update_inputs_outputs(struct gl_program *prog)
fp->UsesPointCoord = GL_TRUE;
}
}
+ 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;
}