aco/tests: support GFX12

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29162>
This commit is contained in:
Rhys Perry 2024-05-01 19:41:58 +01:00 committed by Marge Bot
parent 43bb989070
commit e9a25151fa
3 changed files with 9 additions and 3 deletions

View File

@ -75,6 +75,7 @@ init_program(Program* program, Stage stage, const struct aco_shader_info* info,
case GFX10: program->family = CHIP_NAVI10; break;
case GFX10_3: program->family = CHIP_NAVI21; break;
case GFX11: program->family = CHIP_NAVI31; break;
case GFX12: program->family = CHIP_GFX1200; break;
default: program->family = CHIP_UNKNOWN; break;
}
} else {

View File

@ -31,10 +31,14 @@ inline bool
set_variant(amd_gfx_level cls, const char* rest = "")
{
char buf[8 + strlen(rest)];
if (cls != GFX10_3) {
snprintf(buf, sizeof(buf), "gfx%d%s", cls - GFX6 + 6 - (cls > GFX10_3), rest);
} else {
if (cls == GFX10_3) {
snprintf(buf, sizeof(buf), "gfx10_3%s", rest);
} else if (cls == GFX11_5) {
snprintf(buf, sizeof(buf), "gfx11_5%s", rest);
} else {
unsigned num = cls - GFX6 + 6;
num -= (cls > GFX10_3) + (cls > GFX11_5);
snprintf(buf, sizeof(buf), "gfx%d%s", num, rest);
}
return set_variant(buf);
}

View File

@ -623,6 +623,7 @@ get_vk_device(enum amd_gfx_level gfx_level)
case GFX10: family = CHIP_NAVI10; break;
case GFX10_3: family = CHIP_NAVI21; break;
case GFX11: family = CHIP_NAVI31; break;
case GFX12: family = CHIP_GFX1200; break;
default: family = CHIP_UNKNOWN; break;
}
return get_vk_device(family);