<div dir="ltr"><div><div><div><div>Again, I can't research this right now, but what values in the gl_state_index array are greater than 255?  Perhaps you can add a comment about that.  And if that's not the case, gl_state_index8?<br><br></div>Also, longer term, it might be cleaner in general if the gl_state_index array was encapsulated in a structure:<br><br></div>struct gl_state_record<br>{<br></div>   gl_state_index16 tokens[STATE_LENGTH];<br>};<br><br></div>-Brian<br><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 8, 2018 at 6:18 PM, Marek Olšák <span dir="ltr"><<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
<br>
Let's use the new gl_state_index16 type everywhere and remove<br>
the typecasts.<br>
<br>
This helps reduce the size of gl_program_parameter.<br>
---<br>
 src/compiler/glsl/ir.h                         |  2 +-<br>
 src/compiler/glsl/serialize.<wbr>cpp                |  2 +-<br>
 src/compiler/glsl/standalone_<wbr>scaffolding.cpp   |  4 ++--<br>
 src/compiler/glsl/standalone_<wbr>scaffolding.h     |  4 ++--<br>
 src/compiler/nir/nir.h                         | 10 +++++-----<br>
 src/compiler/nir/nir_lower_<wbr>drawpixels.c        |  3 ++-<br>
 src/compiler/shader_enums.h                    |  2 ++<br>
 src/mesa/drivers/dri/i965/brw_<wbr>link.cpp         |  3 +--<br>
 src/mesa/drivers/dri/i965/brw_<wbr>nir_uniforms.cpp |  2 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>program.c        |  2 +-<br>
 src/mesa/drivers/dri/r200/<wbr>r200_vertprog.c      |  2 +-<br>
 src/mesa/main/ffvertex_prog.c                  |  2 +-<br>
 src/mesa/main/tests/program_<wbr>state_string.cpp   |  2 +-<br>
 src/mesa/main/uniforms.h                       |  2 +-<br>
 src/mesa/program/ir_to_mesa.<wbr>cpp                |  2 +-<br>
 src/mesa/program/prog_<wbr>parameter.c              | 10 +++++-----<br>
 src/mesa/program/prog_<wbr>parameter.h              |  6 +++---<br>
 src/mesa/program/prog_<wbr>statevars.c              |  6 +++---<br>
 src/mesa/program/prog_<wbr>statevars.h              |  5 ++---<br>
 src/mesa/program/program_<wbr>parse.y               | 18 +++++++++---------<br>
 src/mesa/program/programopt.c                  |  8 ++++----<br>
 src/mesa/state_tracker/st_<wbr>atifs_to_tgsi.c      |  4 ++--<br>
 src/mesa/state_tracker/st_<wbr>glsl_to_nir.cpp      |  6 +++---<br>
 src/mesa/state_tracker/st_<wbr>glsl_to_tgsi.cpp     |  7 +++----<br>
 src/mesa/state_tracker/st_<wbr>mesa_to_tgsi.c       |  2 +-<br>
 src/mesa/state_tracker/st_nir_<wbr>lower_builtin.c  |  4 ++--<br>
 src/mesa/state_tracker/st_<wbr>program.c            |  6 +++---<br>
 27 files changed, 63 insertions(+), 63 deletions(-)<br><br></blockquote></div></div></div>