summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_parameter.h
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_parameter.h
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_parameter.h')
-rw-r--r--src/mesa/program/prog_parameter.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
index f50e99c8abe..ce5d2cbaabc 100644
--- a/src/mesa/program/prog_parameter.h
+++ b/src/mesa/program/prog_parameter.h
@@ -72,7 +72,7 @@ struct gl_program_parameter
/**
* A sequence of STATE_* tokens and integers to identify GL state.
*/
- gl_state_index StateIndexes[STATE_LENGTH];
+ gl_state_index16 StateIndexes[STATE_LENGTH];
};
@@ -108,7 +108,7 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList,
gl_register_file type, const char *name,
GLuint size, GLenum datatype,
const gl_constant_value *values,
- const gl_state_index state[STATE_LENGTH]);
+ const gl_state_index16 state[STATE_LENGTH]);
extern GLint
_mesa_add_typed_unnamed_constant(struct gl_program_parameter_list *paramList,
@@ -126,7 +126,7 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList,
extern GLint
_mesa_add_state_reference(struct gl_program_parameter_list *paramList,
- const gl_state_index stateTokens[STATE_LENGTH]);
+ const gl_state_index16 stateTokens[]);
static inline GLint