diff options
author | marha <marha@users.sourceforge.net> | 2011-08-05 08:17:38 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-08-05 08:17:38 +0200 |
commit | 67e52c577364b17e7339b04faf17c77cd3ad9b59 (patch) | |
tree | 0bc2b0c652907d4c9e4ba2f486754a23ca91147b /mesalib/src/mesa/program/prog_parameter.h | |
parent | 23cc74efd16feb2676978b9919a8510ed7804ed9 (diff) | |
parent | d105412503ea250e07d3cb008f10f60e6e48bf8a (diff) | |
download | vcxsrv-67e52c577364b17e7339b04faf17c77cd3ad9b59.tar.gz vcxsrv-67e52c577364b17e7339b04faf17c77cd3ad9b59.tar.bz2 vcxsrv-67e52c577364b17e7339b04faf17c77cd3ad9b59.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/glsl/ast_to_hir.cpp
mesalib/src/mesa/SConscript
mesalib/src/mesa/main/compiler.h
mesalib/src/mesa/main/enable.c
mesalib/src/mesa/main/ff_fragment_shader.cpp
mesalib/src/mesa/main/texcompress_rgtc_tmp.h
mesalib/src/mesa/main/texobj.c
mesalib/src/mesa/main/texparam.c
mesalib/src/mesa/main/uniforms.c
mesalib/src/mesa/program/ir_to_mesa.cpp
mesalib/src/mesa/program/prog_print.c
mesalib/src/mesa/program/prog_statevars.c
mesalib/src/mesa/program/program.c
mesalib/src/mesa/program/program_parse.y
mesalib/src/mesa/program/program_parser.h
mesalib/src/mesa/program/sampler.cpp
mesalib/src/mesa/sources.mak
mesalib/src/mesa/state_tracker/st_atom_pixeltransfer.c
mesalib/src/mesa/state_tracker/st_cb_blit.c
mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
mesalib/src/mesa/state_tracker/st_extensions.c
mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c
mesalib/src/mesa/state_tracker/st_program.c
mesalib/src/mesa/state_tracker/st_texture.h
mesalib/src/mesa/vbo/vbo_exec_array.c
pixman/pixman/pixman-arm-neon-asm.S
pixman/pixman/pixman-arm-neon.c
Diffstat (limited to 'mesalib/src/mesa/program/prog_parameter.h')
-rw-r--r-- | mesalib/src/mesa/program/prog_parameter.h | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/mesalib/src/mesa/program/prog_parameter.h b/mesalib/src/mesa/program/prog_parameter.h index 10cbbe57a..f858cf0fa 100644 --- a/mesalib/src/mesa/program/prog_parameter.h +++ b/mesalib/src/mesa/program/prog_parameter.h @@ -46,7 +46,15 @@ #define PROG_PARAM_BIT_CYL_WRAP 0x10 /**< XXX gallium debug */ /*@}*/ - +/** + * Actual data for constant values of parameters. + */ +typedef union gl_constant_value { + GLfloat f; + GLboolean b; + GLint i; + GLuint u; +} gl_constant_value; /** * Program parameter. @@ -81,7 +89,7 @@ struct gl_program_parameter_list GLuint Size; /**< allocated size of Parameters, ParameterValues */ GLuint NumParameters; /**< number of parameters in arrays */ struct gl_program_parameter *Parameters; /**< Array [Size] */ - GLfloat (*ParameterValues)[4]; /**< Array [Size] of GLfloat[4] */ + gl_constant_value (*ParameterValues)[4]; /**< Array [Size] of constant[4] */ GLbitfield StateFlags; /**< _NEW_* flags indicating which state changes might invalidate ParameterValues[] */ }; @@ -112,22 +120,28 @@ _mesa_num_parameters(const struct gl_program_parameter_list *list) extern GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, gl_register_file type, const char *name, - GLuint size, GLenum datatype, const GLfloat *values, + GLuint size, GLenum datatype, + const gl_constant_value *values, const gl_state_index state[STATE_LENGTH], GLbitfield flags); extern GLint _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4]); + const char *name, const gl_constant_value values[4]); extern GLint _mesa_add_named_constant(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], + const char *name, const gl_constant_value values[4], GLuint size); extern GLint +_mesa_add_typed_unnamed_constant(struct gl_program_parameter_list *paramList, + const gl_constant_value values[4], GLuint size, + GLenum datatype, GLuint *swizzleOut); + +extern GLint _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, - const GLfloat values[4], GLuint size, + const gl_constant_value values[4], GLuint size, GLuint *swizzleOut); extern GLint @@ -143,7 +157,7 @@ extern GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, const gl_state_index stateTokens[STATE_LENGTH]); -extern GLfloat * +extern gl_constant_value * _mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, GLsizei nameLen, const char *name); @@ -153,7 +167,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, extern GLboolean _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, - const GLfloat v[], GLuint vSize, + const gl_constant_value v[], GLuint vSize, GLint *posOut, GLuint *swizzleOut); extern GLuint |