aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200
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/r200
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/r200')
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.c10
1 files changed, 6 insertions, 4 deletions
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__);