summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_statevars.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-16 04:29:35 +0100
committerMarek Olšák <[email protected]>2018-02-13 01:00:45 +0100
commite149a0253c12d103805230bc7bc0a36887c3b8df (patch)
tree2eedb0e74a1d0f71c76634ac165f925feecfa1b3 /src/mesa/program/prog_statevars.c
parenta7882013d3e788a76cce638704c02b7bea0e67a1 (diff)
mesa,glsl,nir: reduce gl_state_index size to 2 bytes
Let's use the new gl_state_index16 type everywhere and remove the typecasts. This helps reduce the size of gl_program_parameter. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/program/prog_statevars.c')
-rw-r--r--src/mesa/program/prog_statevars.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c
index 78f70053017..e7fa72ce10e 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -54,7 +54,7 @@
* The program parser will produce the state[] values.
*/
static void
-_mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
+_mesa_fetch_state(struct gl_context *ctx, const gl_state_index16 state[],
gl_constant_value *val)
{
GLfloat *value = &val->f;
@@ -628,7 +628,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
* some GL state has changed.
*/
GLbitfield
-_mesa_program_state_flags(const gl_state_index state[STATE_LENGTH])
+_mesa_program_state_flags(const gl_state_index16 state[STATE_LENGTH])
{
switch (state[0]) {
case STATE_MATERIAL:
@@ -948,7 +948,7 @@ append_index(char *dst, GLint index)
* Use free() to deallocate the string.
*/
char *
-_mesa_program_state_string(const gl_state_index state[STATE_LENGTH])
+_mesa_program_state_string(const gl_state_index16 state[STATE_LENGTH])
{
char str[1000] = "";
char tmp[30];