diff options
author | Ian Romanick <[email protected]> | 2009-07-24 18:14:47 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2009-07-24 18:14:47 -0700 |
commit | 258f640edab9ca9e71ee255ebe5ddae4b9d0d871 (patch) | |
tree | ac778134393c5ba11628604fe118171e6f97b5d3 /src/mesa/shader/prog_parameter_layout.c | |
parent | a7400e736467b7b032ee0d8a8bad25a0a65e782b (diff) |
ARB prog: Layout parameters from parameter type, not src type
Use the type stored in the Parameters array to determine the layout
instead of the type in the instruction register field. Also, update
the instruction register field based on the parameter type.
This makes Google Earth work exactly like with Mesa master.
Diffstat (limited to 'src/mesa/shader/prog_parameter_layout.c')
-rw-r--r-- | src/mesa/shader/prog_parameter_layout.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/shader/prog_parameter_layout.c b/src/mesa/shader/prog_parameter_layout.c index f374636f113..4d67eca902f 100644 --- a/src/mesa/shader/prog_parameter_layout.c +++ b/src/mesa/shader/prog_parameter_layout.c @@ -170,10 +170,15 @@ _mesa_layout_parameters(struct asm_parser_state *state) } + if ((inst->SrcReg[i].Base.File <= PROGRAM_VARYING ) + || (inst->SrcReg[i].Base.File >= PROGRAM_WRITE_ONLY)) { + continue; + } + inst->Base.SrcReg[i] = inst->SrcReg[i].Base; p = & state->prog->Parameters->Parameters[idx]; - switch (inst->SrcReg[i].Base.File) { + switch (p->Type) { case PROGRAM_CONSTANT: { const float *const v = state->prog->Parameters->ParameterValues[idx]; @@ -194,6 +199,9 @@ _mesa_layout_parameters(struct asm_parser_state *state) default: break; } + + inst->SrcReg[i].Base.File = p->Type; + inst->Base.SrcReg[i].File = p->Type; } } |