panfrost: Compile pan_cmdstream per-gen
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851>
This commit is contained in:
committed by
Marge Bot
parent
4cce6b913e
commit
284b71a2e1
@@ -30,7 +30,6 @@ files_panfrost = files(
|
||||
'pan_blit.c',
|
||||
'pan_job.c',
|
||||
'pan_assemble.c',
|
||||
'pan_cmdstream.c',
|
||||
'pan_compute.c',
|
||||
'pan_mempool.c',
|
||||
'pan_mempool.h',
|
||||
@@ -51,6 +50,20 @@ compile_args_panfrost = [
|
||||
'-Wno-pointer-arith'
|
||||
]
|
||||
|
||||
panfrost_versions = ['4', '5', '6', '7']
|
||||
libpanfrost_versions = []
|
||||
|
||||
foreach ver : panfrost_versions
|
||||
libpanfrost_versions += static_library(
|
||||
'panfrost-v' + ver,
|
||||
['pan_cmdstream.c', midgard_pack],
|
||||
include_directories : panfrost_includes,
|
||||
c_args : ['-DPAN_ARCH=' + ver],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [idep_midgard_pack, idep_nir, dep_libdrm],
|
||||
)
|
||||
endforeach
|
||||
|
||||
libpanfrost = static_library(
|
||||
'panfrost',
|
||||
files_panfrost,
|
||||
@@ -64,6 +77,7 @@ libpanfrost = static_library(
|
||||
include_directories : panfrost_includes,
|
||||
c_args : [c_msvc_compat_args, compile_args_panfrost],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
link_with: [libpanfrost_versions],
|
||||
)
|
||||
|
||||
driver_panfrost = declare_dependency(
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "gallium/auxiliary/util/u_blend.h"
|
||||
|
||||
#include "panfrost-quirks.h"
|
||||
#include "gen_macros.h"
|
||||
|
||||
#include "pan_pool.h"
|
||||
#include "pan_bo.h"
|
||||
@@ -3661,7 +3662,7 @@ context_init(struct pipe_context *pipe)
|
||||
}
|
||||
|
||||
void
|
||||
panfrost_cmdstream_screen_init(struct panfrost_screen *screen)
|
||||
GENX(panfrost_cmdstream_screen_init)(struct panfrost_screen *screen)
|
||||
{
|
||||
struct panfrost_device *dev = &screen->dev;
|
||||
|
||||
@@ -3676,5 +3677,3 @@ panfrost_cmdstream_screen_init(struct panfrost_screen *screen)
|
||||
pan_blitter_init(dev, &screen->blitter.bin_pool.base,
|
||||
&screen->blitter.desc_pool.base);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -893,7 +893,16 @@ panfrost_create_screen(int fd, struct renderonly *ro)
|
||||
4096, "Blitter shaders", false, true);
|
||||
panfrost_pool_init(&screen->blitter.desc_pool, NULL, dev, 0, 65536,
|
||||
"Blitter RSDs", false, true);
|
||||
panfrost_cmdstream_screen_init(screen);
|
||||
if (dev->arch == 4)
|
||||
panfrost_cmdstream_screen_init_v4(screen);
|
||||
else if (dev->arch == 5)
|
||||
panfrost_cmdstream_screen_init_v5(screen);
|
||||
else if (dev->arch == 6)
|
||||
panfrost_cmdstream_screen_init_v6(screen);
|
||||
else if (dev->arch == 7)
|
||||
panfrost_cmdstream_screen_init_v7(screen);
|
||||
else
|
||||
unreachable("Unhandled architecture major");
|
||||
|
||||
return &screen->base;
|
||||
}
|
||||
|
||||
@@ -104,8 +104,10 @@ pan_device(struct pipe_screen *p)
|
||||
struct pipe_fence_handle *
|
||||
panfrost_fence_create(struct panfrost_context *ctx);
|
||||
|
||||
void
|
||||
panfrost_cmdstream_screen_init(struct panfrost_screen *screen);
|
||||
void panfrost_cmdstream_screen_init_v4(struct panfrost_screen *screen);
|
||||
void panfrost_cmdstream_screen_init_v5(struct panfrost_screen *screen);
|
||||
void panfrost_cmdstream_screen_init_v6(struct panfrost_screen *screen);
|
||||
void panfrost_cmdstream_screen_init_v7(struct panfrost_screen *screen);
|
||||
|
||||
#define perf_debug(dev, ...) \
|
||||
do { \
|
||||
|
||||
Reference in New Issue
Block a user