aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-11-15 23:19:52 +0000
committerBrian Paul <[email protected]>2006-11-15 23:19:52 +0000
commit699a33ea77ecd164d7435811258eee96bd37aaa2 (patch)
treefd16030266e9a089dc6042721932ce2bb1bd173d /src/mesa/shader/program.h
parent408e01b9394d39ecd7755ca63b36017bbc0521d0 (diff)
Add new _mesa_lookup_parameter_constant() to search for a GLfloat4 constant
in a parameter list. Use it in _mesa_add_named_constant() and _mesa_add_unnamed_constant() to avoid duplication of identical constants.
Diffstat (limited to 'src/mesa/shader/program.h')
-rw-r--r--src/mesa/shader/program.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h
index 50958394c20..3f84ea8a403 100644
--- a/src/mesa/shader/program.h
+++ b/src/mesa/shader/program.h
@@ -249,19 +249,22 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList,
const GLint *stateTokens);
extern GLfloat *
-_mesa_lookup_parameter_value(struct gl_program_parameter_list *paramList,
+_mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList,
GLsizei nameLen, const char *name);
extern GLint
-_mesa_lookup_parameter_index(struct gl_program_parameter_list *paramList,
+_mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList,
GLsizei nameLen, const char *name);
+extern GLboolean
+_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList,
+ const GLfloat v[], GLsizei vSize,
+ GLuint *posOut, GLuint *swizzleOut);
+
extern void
_mesa_load_state_parameters(GLcontext *ctx,
struct gl_program_parameter_list *paramList);
-
-
extern void
_mesa_print_instruction(const struct prog_instruction *inst);