From: Marek Olšák Date: Sun, 6 Sep 2020 06:50:44 +0000 (-0400) Subject: radeonsi: reduce type sizes in si_shader_selector X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=62e36ba43860fdbfb1a1058c64d0ec71734f7b0a;p=mesa.git radeonsi: reduce type sizes in si_shader_selector Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 084ae587ae1..0bb0b3a71a3 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2142,7 +2142,7 @@ void si_get_ps_prolog_key(struct si_shader *shader, union si_shader_part_key *ke key->ps_prolog.ancillary_vgpr_index = shader->info.ancillary_vgpr_index; if (info->colors_read) { - unsigned *color = shader->selector->color_attr_index; + ubyte *color = shader->selector->color_attr_index; if (shader->key.part.ps.prolog.color_two_side) { /* BCOLORs are stored after the last input. */ diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index bfcbfab6e25..9b325f1d48b 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -422,30 +422,30 @@ struct si_shader_selector { ubyte cs_images_sgpr_index; ubyte cs_images_num_sgprs; ubyte cs_num_images_in_user_sgprs; - unsigned num_vs_inputs; - unsigned num_vbos_in_user_sgprs; + ubyte num_vs_inputs; + ubyte num_vbos_in_user_sgprs; unsigned pa_cl_vs_out_cntl; ubyte clipdist_mask; ubyte culldist_mask; - unsigned rast_prim; + ubyte rast_prim; /* ES parameters. */ - unsigned esgs_itemsize; /* vertex stride */ - unsigned lshs_vertex_stride; + uint16_t esgs_itemsize; /* vertex stride */ + uint16_t lshs_vertex_stride; /* GS parameters. */ - unsigned gs_input_verts_per_prim; - unsigned gs_output_prim; - unsigned gs_max_out_vertices; - unsigned gs_num_invocations; - unsigned max_gs_stream; /* count - 1 */ - unsigned gsvs_vertex_size; + uint16_t gs_max_out_vertices; + uint16_t gsvs_vertex_size; + ubyte gs_input_verts_per_prim; + ubyte gs_output_prim; + ubyte gs_num_invocations; + ubyte max_gs_stream; /* count - 1 */ unsigned max_gsvs_emit_size; - unsigned enabled_streamout_buffer_mask; + uint16_t enabled_streamout_buffer_mask; bool tess_turns_off_ngg; /* PS parameters. */ - unsigned color_attr_index[2]; + ubyte color_attr_index[2]; unsigned db_shader_control; /* Set 0xf or 0x0 (4 bits) per each written output. * ANDed with spi_shader_col_format.