pan/clc: Build for v12

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
This commit is contained in:
Mary Guillemard 2025-02-11 15:09:27 +01:00
parent 2210eb873a
commit 250988e963
4 changed files with 17 additions and 2 deletions

View file

@ -43,6 +43,9 @@ static const struct spirv_to_nir_options spirv_options = {
static const nir_shader_compiler_options *
get_compiler_options(unsigned arch)
{
if (arch >= 11)
return &bifrost_nir_options_v11;
if (arch >= 9)
return &bifrost_nir_options_v9;
@ -300,6 +303,11 @@ void pan_shader_compile_v10(nir_shader *nir,
struct util_dynarray *binary,
struct pan_shader_info *info);
void pan_shader_compile_v12(nir_shader *nir,
struct panfrost_compile_inputs *inputs,
struct util_dynarray *binary,
struct pan_shader_info *info);
static void
shader_compile(int arch, nir_shader *nir,
struct panfrost_compile_inputs *inputs,
@ -318,6 +326,9 @@ shader_compile(int arch, nir_shader *nir,
case 10:
pan_shader_compile_v10(nir, inputs, binary, info);
break;
case 12:
pan_shader_compile_v12(nir, inputs, binary, info);
break;
default:
unreachable("Unknown arch!");
}
@ -342,7 +353,7 @@ main(int argc, const char **argv)
int target_arch = atoi(target_arch_str);
if (target_arch < 4 || target_arch > 10) {
if (target_arch < 4 || target_arch > 12) {
fprintf(stderr, "Unsupported target arch %d\n", target_arch);
return 1;
}

View file

@ -24,6 +24,8 @@
#include "libpan_v9.h"
#elif (PAN_ARCH == 10)
#include "libpan_v10.h"
#elif (PAN_ARCH == 12)
#include "libpan_v12.h"
#else
#error "Unsupported architecture for libpan"
#endif

View file

@ -22,6 +22,8 @@
#include "libpan_shaders_v9.h"
#elif (PAN_ARCH == 10)
#include "libpan_shaders_v10.h"
#elif (PAN_ARCH == 12)
#include "libpan_shaders_v12.h"
#else
#error "Unsupported architecture for libpan"
#endif

View file

@ -8,7 +8,7 @@ libpan_shader_files = files(
idep_libpan_per_arch = {}
foreach ver : ['4', '5', '6', '7', '9', '10']
foreach ver : ['4', '5', '6', '7', '9', '10', '12']
libpan_spv = custom_target(
input : libpan_shader_files,
output : 'libpan_v' + ver + '.spv',