aco: implement aco_is_gpu_supported using switch statement

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
This commit is contained in:
Marek Olšák 2023-11-10 19:05:41 -05:00 committed by Marge Bot
parent 1585a5cc6d
commit df6fe90926

View file

@ -433,8 +433,21 @@ aco_get_codegen_flags()
bool
aco_is_gpu_supported(const struct radeon_info* info)
{
/* Does not support compute only cards yet. */
return info->gfx_level >= GFX6 && info->has_graphics;
switch (info->gfx_level) {
case GFX6:
case GFX7:
case GFX8:
return true;
case GFX9:
return info->has_graphics; /* no CDNA support */
case GFX10:
case GFX10_3:
case GFX11:
case GFX11_5:
return true;
default:
return false;
}
}
bool