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);
+ }
}
- }
-
-
- /** cast wrapper */
- static struct gl_vertex_program *
- vertex_program(struct gl_program *prog)
- {
- assert(prog->Target == GL_VERTEX_PROGRAM_ARB);
- return (struct gl_vertex_program *) prog;
- }
-
--
- /** cast wrapper */
- static struct gl_fragment_program *
- fragment_program(struct gl_program *prog)
- {
- assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB);
- return (struct gl_fragment_program *) prog;
+ prog->NumAddressRegs = maxAddrReg;
}