From: Dave Airlie Date: Sun, 22 Apr 2018 23:52:28 +0000 (+1000) Subject: radeonsi: don't runtime check gs table info X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b25f6cde89c21b19f4582f19630f6d7e96a04913;p=mesa.git radeonsi: don't runtime check gs table info We can just unreachable here, this aligns with radv code, makes it easier to move to common code. Reviewed-by: Nicolai Hähnle Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index f2fdb984139..b3ef098b8ea 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -659,11 +659,11 @@ static void si_destroy_screen(struct pipe_screen* pscreen) FREE(sscreen); } -static bool si_init_gs_info(struct si_screen *sscreen) +static void si_init_gs_info(struct si_screen *sscreen) { /* gs_table_depth is not used by GFX9 */ if (sscreen->info.chip_class >= GFX9) - return true; + return; switch (sscreen->info.family) { case CHIP_OLAND: @@ -675,7 +675,7 @@ static bool si_init_gs_info(struct si_screen *sscreen) case CHIP_CARRIZO: case CHIP_STONEY: sscreen->gs_table_depth = 16; - return true; + return; case CHIP_TAHITI: case CHIP_PITCAIRN: case CHIP_VERDE: @@ -688,9 +688,9 @@ static bool si_init_gs_info(struct si_screen *sscreen) case CHIP_POLARIS12: case CHIP_VEGAM: sscreen->gs_table_depth = 32; - return true; + return; default: - return false; + unreachable("unknown GPU"); } } @@ -853,8 +853,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws, (void) mtx_init(&sscreen->aux_context_lock, mtx_plain); (void) mtx_init(&sscreen->gpu_load_mutex, mtx_plain); - if (!si_init_gs_info(sscreen) || - !si_init_shader_cache(sscreen)) { + si_init_gs_info(sscreen); + if (!si_init_shader_cache(sscreen)) { FREE(sscreen); return NULL; }