radeonsi: reduce type sizes in si_shader_selector
authorMarek Olšák <marek.olsak@amd.com>
Sun, 6 Sep 2020 06:50:44 +0000 (02:50 -0400)
committerVivek Pandya <vivekvpandya@gmail.com>
Mon, 7 Sep 2020 15:55:17 +0000 (21:25 +0530)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624>

src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h

index 084ae587ae153f171b3f647f40d5923e99e04d6f..0bb0b3a71a38f26097f06e047277436d82291509 100644 (file)
@@ -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) {
    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. */
 
       if (shader->key.part.ps.prolog.color_two_side) {
          /* BCOLORs are stored after the last input. */
index bfcbfab6e25d4c9a60cec316d4702c0ab94f7f06..9b325f1d48b9b46f71a01525662bdd8e99e87864 100644 (file)
@@ -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;
    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 pa_cl_vs_out_cntl;
    ubyte clipdist_mask;
    ubyte culldist_mask;
-   unsigned rast_prim;
+   ubyte rast_prim;
 
    /* ES parameters. */
 
    /* ES parameters. */
-   unsigned esgs_itemsize; /* vertex stride */
-   unsigned lshs_vertex_stride;
+   uint16_t esgs_itemsize; /* vertex stride */
+   uint16_t lshs_vertex_stride;
 
    /* GS parameters. */
 
    /* 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 max_gsvs_emit_size;
-   unsigned enabled_streamout_buffer_mask;
+   uint16_t enabled_streamout_buffer_mask;
    bool tess_turns_off_ngg;
 
    /* PS parameters. */
    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.
    unsigned db_shader_control;
    /* Set 0xf or 0x0 (4 bits) per each written output.
     * ANDed with spi_shader_col_format.