diff options
author | Marek Olšák <[email protected]> | 2017-11-16 04:29:35 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-02-13 01:00:45 +0100 |
commit | e149a0253c12d103805230bc7bc0a36887c3b8df (patch) | |
tree | 2eedb0e74a1d0f71c76634ac165f925feecfa1b3 /src/mesa/main | |
parent | a7882013d3e788a76cce638704c02b7bea0e67a1 (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/main')
-rw-r--r-- | src/mesa/main/ffvertex_prog.c | 2 | ||||
-rw-r--r-- | src/mesa/main/tests/program_state_string.cpp | 2 | ||||
-rw-r--r-- | src/mesa/main/uniforms.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index 976b6f46b9f..c7b639456cd 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -413,7 +413,7 @@ static struct ureg register_param5(struct tnl_program *p, GLint s3, GLint s4) { - gl_state_index tokens[STATE_LENGTH]; + gl_state_index16 tokens[STATE_LENGTH]; GLint idx; tokens[0] = s0; tokens[1] = s1; diff --git a/src/mesa/main/tests/program_state_string.cpp b/src/mesa/main/tests/program_state_string.cpp index 64c43960f14..38805f92c77 100644 --- a/src/mesa/main/tests/program_state_string.cpp +++ b/src/mesa/main/tests/program_state_string.cpp @@ -30,7 +30,7 @@ TEST(program_state_string, depth_range) { - const gl_state_index state[STATE_LENGTH] = { + const gl_state_index16 state[STATE_LENGTH] = { STATE_DEPTH_RANGE }; diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h index 9236db97805..819cf90ba41 100644 --- a/src/mesa/main/uniforms.h +++ b/src/mesa/main/uniforms.h @@ -505,7 +505,7 @@ _mesa_flush_vertices_for_uniforms(struct gl_context *ctx, struct gl_builtin_uniform_element { const char *field; - int tokens[STATE_LENGTH]; + gl_state_index16 tokens[STATE_LENGTH]; int swizzle; }; |