radeonsi: use the same units for esgs_ring_size and ngg_emit_size
authorMarek Olšák <marek.olsak@amd.com>
Thu, 30 Jul 2020 12:04:28 +0000 (08:04 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 7 Aug 2020 15:22:21 +0000 (11:22 -0400)
for consistency

Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>

src/gallium/drivers/radeonsi/gfx10_shader_ngg.c
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_state_shaders.c

index c7b5556850221831ac2c96a84597a116b45c260c..4b639eecf5f94e5ae3095f0a28427c32ddea6320 100644 (file)
@@ -2061,7 +2061,7 @@ retry_select_mode:
    shader->ngg.prim_amp_factor = prim_amp_factor;
    shader->ngg.max_vert_out_per_gs_instance = max_vert_out_per_gs_instance;
 
-   shader->gs_info.esgs_ring_size = 4 * max_esverts * esvert_lds_size;
+   shader->gs_info.esgs_ring_size = max_esverts * esvert_lds_size;
    shader->ngg.ngg_emit_size = max_gsprims * gsprim_lds_size;
 
    assert(shader->ngg.hw_max_esverts >= 24); /* HW limitation */
index 60ff8388d8b6e8121a17d0b3555ff0742a6e46f9..d4a60e4653699ae304fff4ce7a1ffec53a9e59a0 100644 (file)
@@ -816,7 +816,7 @@ static bool si_shader_binary_open(struct si_screen *screen, struct si_shader *sh
        */
       struct ac_rtld_symbol *sym = &lds_symbols[num_lds_symbols++];
       sym->name = "esgs_ring";
-      sym->size = shader->gs_info.esgs_ring_size;
+      sym->size = shader->gs_info.esgs_ring_size * 4;
       sym->align = 64 * 1024;
    }
 
index a3712ed96da797e4f170a547f66af3bb99338049..e2dc6bdabf3de55a9a1c898c437ba9be781b1585 100644 (file)
@@ -703,7 +703,7 @@ void gfx9_get_gs_info(struct si_shader_selector *es, struct si_shader_selector *
    out->gs_prims_per_subgroup = gs_prims;
    out->gs_inst_prims_in_subgroup = gs_prims * gs_num_invocations;
    out->max_prims_per_subgroup = out->gs_inst_prims_in_subgroup * gs->gs_max_out_vertices;
-   out->esgs_ring_size = 4 * esgs_lds_size;
+   out->esgs_ring_size = esgs_lds_size;
 
    assert(out->max_prims_per_subgroup <= max_out_prims);
 }