mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
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.
This commit is contained in:
parent
a7400e7364
commit
258f640eda
1 changed files with 9 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue