diff options
author | Dave Airlie <[email protected]> | 2018-04-23 09:52:28 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2018-04-24 09:05:29 +1000 |
commit | b25f6cde89c21b19f4582f19630f6d7e96a04913 (patch) | |
tree | e01b29862c86f975cd00281c2aaeacad4d9ef4ed /src | |
parent | 40783a7fa372ef12184d893efaed27f2c3cebbbc (diff) |
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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 14 |
1 files changed, 7 insertions, 7 deletions
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; } |