diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_fragprog.c | 9 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_constant_state.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_vertprog.c | 10 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 2e043195121..6493ab99b1e 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -184,11 +184,12 @@ src_vector(struct i915_fragment_program *p, */ case PROGRAM_CONSTANT: case PROGRAM_STATE_VAR: - case PROGRAM_UNIFORM: - src = i915_emit_param4fv(p, - &program->Parameters->ParameterValues[source->Index][0].f); + case PROGRAM_UNIFORM: { + struct gl_program_parameter_list *params = program->Parameters; + unsigned offset = params->ParameterValueOffset[source->Index]; + src = i915_emit_param4fv(p, ¶ms->ParameterValues[offset].f); break; - + } default: i915_program_error(p, "Bad source->File: %d", source->File); return 0; diff --git a/src/mesa/drivers/dri/i965/gen6_constant_state.c b/src/mesa/drivers/dri/i965/gen6_constant_state.c index afcd2bebd76..919aee49ade 100644 --- a/src/mesa/drivers/dri/i965/gen6_constant_state.c +++ b/src/mesa/drivers/dri/i965/gen6_constant_state.c @@ -68,9 +68,10 @@ brw_param_value(struct brw_context *brw, case BRW_PARAM_DOMAIN_PARAMETER: { unsigned idx = BRW_PARAM_PARAMETER_IDX(param); + unsigned offset = prog->Parameters->ParameterValueOffset[idx]; unsigned comp = BRW_PARAM_PARAMETER_COMP(param); assert(idx < prog->Parameters->NumParameters); - return prog->Parameters->ParameterValues[idx][comp].u; + return prog->Parameters->ParameterValues[offset + comp].u; } case BRW_PARAM_DOMAIN_UNIFORM: { diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index 8599e478815..f69f4a0a1e2 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -120,14 +120,16 @@ static GLboolean r200VertexProgUpdateParams(struct gl_context *ctx, struct r200_ } for(pi = 0; pi < paramList->NumParameters; pi++) { + unsigned pvo = paramList->ParameterValueOffset[pi]; + switch(paramList->Parameters[pi].Type) { case PROGRAM_STATE_VAR: //fprintf(stderr, "%s", vp->Parameters->Parameters[pi].Name); case PROGRAM_CONSTANT: - *fcmd++ = paramList->ParameterValues[pi][0].f; - *fcmd++ = paramList->ParameterValues[pi][1].f; - *fcmd++ = paramList->ParameterValues[pi][2].f; - *fcmd++ = paramList->ParameterValues[pi][3].f; + *fcmd++ = paramList->ParameterValues[pvo + 0].f; + *fcmd++ = paramList->ParameterValues[pvo + 1].f; + *fcmd++ = paramList->ParameterValues[pvo + 2].f; + *fcmd++ = paramList->ParameterValues[pvo + 3].f; break; default: _mesa_problem(NULL, "Bad param type in %s", __func__); |