summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-06-16 10:17:56 +1000
committerTimothy Arceri <[email protected]>2018-03-20 14:17:33 +1100
commitedded1237607348683f492db313e823dc2e380c3 (patch)
tree1fb861be1d324eb309fbef50e6b353dfff4a0c83 /src/mesa/drivers/dri/i915
parentb13b9eb432a3b67efb29ca25c3e244b467c3c4af (diff)
mesa: rework ParameterList to allow packing
Currently everything is padded to 4 components. Making the list more flexible will allow us to do uniform packing. V2 (suggestions from Nicolai): - always pass existing calls to _mesa_add_parameter() true for padd_and_align - fix bindless param value offsets - remove left over wip logic from pad and align code - zero out param value padding - whitespace fix Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c9
1 files changed, 5 insertions, 4 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, &params->ParameterValues[offset].f);
break;
-
+ }
default:
i915_program_error(p, "Bad source->File: %d", source->File);
return 0;