From 5f2f75aa671eee2f0973945c7beba2a1380f4d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Mon, 6 Nov 2023 12:39:24 +0100 Subject: [PATCH] mesa/ffvs: Use gl_state_index16 in helpers directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit register_state_var will have to convert everything to gl_state_index16 and the values given to it are already either gl_state_index or any short integer which are covered by the gl_state_index16 type. Signed-off-by: Corentin Noël Reviewed-by: Erik Faye-Lund Part-of: --- src/mesa/main/ffvertex_prog.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index bfa6e898528..76f58b8cdb5 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -296,10 +296,10 @@ struct tnl_program { static nir_variable * register_state_var(struct tnl_program *p, - gl_state_index s0, - gl_state_index s1, - gl_state_index s2, - gl_state_index s3, + gl_state_index16 s0, + gl_state_index16 s1, + gl_state_index16 s2, + gl_state_index16 s3, const struct glsl_type *type) { gl_state_index16 tokens[STATE_LENGTH]; @@ -319,10 +319,10 @@ register_state_var(struct tnl_program *p, static nir_def * load_state_var(struct tnl_program *p, - gl_state_index s0, - gl_state_index s1, - gl_state_index s2, - gl_state_index s3, + gl_state_index16 s0, + gl_state_index16 s1, + gl_state_index16 s2, + gl_state_index16 s3, const struct glsl_type *type) { nir_variable *var = register_state_var(p, s0, s1, s2, s3, type); @@ -331,10 +331,10 @@ load_state_var(struct tnl_program *p, static nir_def * load_state_vec4(struct tnl_program *p, - gl_state_index s0, - gl_state_index s1, - gl_state_index s2, - gl_state_index s3) + gl_state_index16 s0, + gl_state_index16 s1, + gl_state_index16 s2, + gl_state_index16 s3) { return load_state_var(p, s0, s1, s2, s3, glsl_vec4_type()); }