From 72a395b6de004d92c5fcc15873248682d6d5582a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 13 Jun 2021 21:13:39 -0400 Subject: [PATCH] radeonsi: remove the chip_class dimension from the draw_vbo array We don't use/initialize draw_vbo callbacks for other generations anymore. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_pipe.h | 5 ++--- src/gallium/drivers/radeonsi/si_state_draw.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index b823fae..2af9365 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -1285,7 +1285,7 @@ struct si_context { */ struct hash_table *dirty_implicit_resources; - pipe_draw_vbo_func draw_vbo[NUM_GFX_VERSIONS - GFX6][2][2][2][2]; + pipe_draw_vbo_func draw_vbo[2][2][2][2]; /* When b.draw_vbo is a wrapper, real_draw_vbo is the real draw_vbo function */ pipe_draw_vbo_func real_draw_vbo; @@ -2021,8 +2021,7 @@ static inline unsigned si_get_shader_wave_size(struct si_shader *shader) static inline void si_select_draw_vbo(struct si_context *sctx) { - pipe_draw_vbo_func draw_vbo = sctx->draw_vbo[sctx->chip_class - GFX6] - [!!sctx->shader.tes.cso] + pipe_draw_vbo_func draw_vbo = sctx->draw_vbo[!!sctx->shader.tes.cso] [!!sctx->shader.gs.cso] [sctx->ngg] [si_compute_prim_discard_enabled(sctx)]; diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index f7a286d..59cd90d 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -2321,7 +2321,7 @@ static void si_init_draw_vbo(struct si_context *sctx) if (NGG && GFX_VERSION < GFX10) return; - sctx->draw_vbo[GFX_VERSION - GFX6][HAS_TESS][HAS_GS][NGG][ALLOW_PRIM_DISCARD_CS] = + sctx->draw_vbo[HAS_TESS][HAS_GS][NGG][ALLOW_PRIM_DISCARD_CS] = si_draw_vbo; } -- 2.7.4