Mesa (master): ARB prog parser: fix parameter binding type
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Wed Jan 6 13:52:34 UTC 2010
Module: Mesa
Branch: master
Commit: f0f68b1e4c3d3d23fc9a7d624a465537b2e74d6c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0f68b1e4c3d3d23fc9a7d624a465537b2e74d6c
Author: Brian Paul <brianp at vmware.com>
Date: Tue Jan 5 10:53:44 2010 -0700
ARB prog parser: fix parameter binding type
References to program local and enviroment parameters are put into the
unified program parameters list as PROGRAM_STATE_VAR entries which point
into the local or environment arrays. So the param_binding_type field
should be PROGRAM_STATE_VAR.
This fixes the piglit vpfp-generic vp-arl-env-array.vpfp and
vp-arl-local-array.vpfp test failures.
---
src/mesa/shader/program_parse.y | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index be8c841..5c5d8d7 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -2516,9 +2516,12 @@ initialize_symbol_from_param(struct gl_program *prog,
assert((state_tokens[1] == STATE_ENV)
|| (state_tokens[1] == STATE_LOCAL));
+ /*
+ * The param type is STATE_VAR. The program parameter entry will
+ * effectively be a pointer into the LOCAL or ENV parameter array.
+ */
param_var->type = at_param;
- param_var->param_binding_type = (state_tokens[1] == STATE_ENV)
- ? PROGRAM_ENV_PARAM : PROGRAM_LOCAL_PARAM;
+ param_var->param_binding_type = PROGRAM_STATE_VAR;
/* If we are adding a STATE_ENV or STATE_LOCAL that has multiple elements,
* we need to unroll it and call add_state_reference() for each row
More information about the mesa-commit
mailing list