summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parser.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-12-29 09:06:00 -0700
committerBrian Paul <brianp@vmware.com>2009-12-29 09:08:02 -0700
commit639e7a140e430aa8839c652459eddc9a4b79f9c6 (patch)
treedb2cd77e1ff5324c7eac4bc98ba2081664fa1d11 /src/mesa/shader/program_parser.h
parentb4658dbf04003418a1aadc7647ce8c7211f58413 (diff)
ARB prog parser: use _mesa_add_unnamed_constant() to use fewer constant slots
This function will search the constant parameters in an effort to re-use constant slots. For example, {1,2,3,4} and {4,1,1,2} can be stored in one constant slot and accessed with different swizzles. The swizzle info must be propogated though the parsing code in a few places. Fixes Piglit "vpfp-generic tests/shaders/generic/big-param.vpfp" failure.
Diffstat (limited to 'src/mesa/shader/program_parser.h')
-rw-r--r--src/mesa/shader/program_parser.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h
index c170948f73..69396ca2c0 100644
--- a/src/mesa/shader/program_parser.h
+++ b/src/mesa/shader/program_parser.h
@@ -56,6 +56,12 @@ struct asm_symbol {
*/
unsigned param_binding_begin;
+ /**
+ * Constants put into the parameter list may be swizzled. This
+ * field contain's the symbol's swizzle. (SWIZZLE_X/Y/Z/W)
+ */
+ unsigned param_binding_swizzle;
+
/* This is how many entries in the the program_parameter_list we take up
* with our state tokens or constants. Note that this is _not_ the same as
* the number of param registers we eventually use.