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 <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri
2017-06-16 10:17:56 +10:00
parent b13b9eb432
commit edded12376
19 changed files with 125 additions and 60 deletions

View File

@@ -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;