From 633d2aa9157cb9b581982bf2f0aa4a80ba0062ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 30 Jul 2020 08:04:28 -0400 Subject: [PATCH] radeonsi: use the same units for esgs_ring_size and ngg_emit_size for consistency Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3 Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/gfx10_shader_ngg.c | 2 +- src/gallium/drivers/radeonsi/si_shader.c | 2 +- src/gallium/drivers/radeonsi/si_state_shaders.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c index c7b55568502..4b639eecf5f 100644 --- a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c +++ b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c @@ -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 */ diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 60ff8388d8b..d4a60e46536 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -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; } diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index a3712ed96da..e2dc6bdabf3 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -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); } -- 2.30.2