From c30250bde82ef8d388cc7aab4e966fa461694e71 Mon Sep 17 00:00:00 2001 From: Karol Herbst <kherbst@redhat.com> Date: Thu, 14 Dec 2023 03:19:34 +0100 Subject: [PATCH 1/7] gallium/vl: stub vl_video_buffer_create_as_resource It's used by radeonsi Signed-off-by: Karol Herbst <kherbst@redhat.com> --- src/gallium/auxiliary/vl/vl_stubs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gallium/auxiliary/vl/vl_stubs.c b/src/gallium/auxiliary/vl/vl_stubs.c index 194e7a8700b6b..11573d33a36d9 100644 --- a/src/gallium/auxiliary/vl/vl_stubs.c +++ b/src/gallium/auxiliary/vl/vl_stubs.c @@ -108,6 +108,16 @@ vl_video_buffer_create_ex2(struct pipe_context *pipe, return NULL; } +struct pipe_video_buffer * +vl_video_buffer_create_as_resource(struct pipe_context *pipe, + const struct pipe_video_buffer *tmpl, + const uint64_t *modifiers, + int modifiers_count) +{ + assert(0); + return NULL; +} + void vl_video_buffer_destroy(struct pipe_video_buffer *buffer) { -- GitLab From 6e62d6f3c3f67e921f3b6a5bcc1fc8d182771b4b Mon Sep 17 00:00:00 2001 From: Karol Herbst <kherbst@redhat.com> Date: Sat, 30 Dec 2023 20:00:33 +0100 Subject: [PATCH 2/7] gallium/vl: remove stubs which are defined in mesa_util Signed-off-by: Karol Herbst <kherbst@redhat.com> --- src/gallium/auxiliary/vl/vl_stubs.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_stubs.c b/src/gallium/auxiliary/vl/vl_stubs.c index 11573d33a36d9..cd6b73b850b69 100644 --- a/src/gallium/auxiliary/vl/vl_stubs.c +++ b/src/gallium/auxiliary/vl/vl_stubs.c @@ -155,9 +155,3 @@ vl_create_mpeg12_decoder(struct pipe_context *pipe, assert(0); return NULL; } - -/* - * vl_zscan - */ -const int vl_zscan_normal[] = {0}; -const int vl_zscan_alternate[] = {0}; -- GitLab From cbcb5abbdbf8060c1b296844ac8043ef6aed43ba Mon Sep 17 00:00:00 2001 From: Karol Herbst <kherbst@redhat.com> Date: Thu, 14 Dec 2023 03:20:08 +0100 Subject: [PATCH 3/7] rusticl: link against libgalliumvl_stub Signed-off-by: Karol Herbst <kherbst@redhat.com> --- src/gallium/targets/rusticl/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build index b2963fe6dfa76..e1acaca7e68e3 100644 --- a/src/gallium/targets/rusticl/meson.build +++ b/src/gallium/targets/rusticl/meson.build @@ -42,6 +42,7 @@ librusticl = shared_library( ], link_whole : librusticl, link_with : [ + libgalliumvl_stub, libpipe_loader_static, libswdri, libswkmsdri, -- GitLab From 1ec151acf98844cabce3cff14d0a8489ebe8e15e Mon Sep 17 00:00:00 2001 From: Karol Herbst <kherbst@redhat.com> Date: Thu, 14 Dec 2023 03:28:48 +0100 Subject: [PATCH 4/7] frontend/nine: link against libgalliumvl_stub Signed-off-by: Karol Herbst <kherbst@redhat.com> --- src/gallium/targets/d3dadapter9/meson.build | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/gallium/targets/d3dadapter9/meson.build b/src/gallium/targets/d3dadapter9/meson.build index 5f2ea8b06317f..2f7044f1100c8 100644 --- a/src/gallium/targets/d3dadapter9/meson.build +++ b/src/gallium/targets/d3dadapter9/meson.build @@ -10,7 +10,7 @@ gallium_nine_c_args = [] gallium_nine_ld_args = [] gallium_nine_link_depends = [] gallium_nine_link_with = [ - libgallium, libnine_st, + libgallium, libgalliumvl_stub, libnine_st, libpipe_loader_static, libws_null, libwsw, libswdri, libswkmsdri, ] @@ -20,13 +20,6 @@ if with_ld_version_script gallium_nine_link_depends += files('d3dadapter9.sym') endif -if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or - with_dri) - gallium_nine_link_with += libgalliumvl -else - gallium_nine_link_with += libgalliumvl_stub -endif - libgallium_nine = shared_library( 'd3dadapter9', files('description.c', 'getproc.c', 'drm.c'), -- GitLab From 830ec5c73efe81a011c70a54dd5d0ab4705c74f6 Mon Sep 17 00:00:00 2001 From: Karol Herbst <kherbst@redhat.com> Date: Thu, 14 Dec 2023 03:29:14 +0100 Subject: [PATCH 5/7] dri: link against libgalliumvl_stub Signed-off-by: Karol Herbst <kherbst@redhat.com> --- src/gallium/targets/dri/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build index 5b455164ced2a..fc60bdacd9921 100644 --- a/src/gallium/targets/dri/meson.build +++ b/src/gallium/targets/dri/meson.build @@ -50,7 +50,7 @@ libgallium_dri = shared_library( link_args : [ld_args_build_id, ld_args_gc_sections, gallium_dri_ld_args], link_depends : gallium_dri_link_depends, link_with : [ - libdri, libmesa, libgalliumvl, + libdri, libmesa, libgalliumvl_stub, libgallium, libglapi, libloader, libpipe_loader_static, libws_null, libwsw, libswdri, libswkmsdri, ], -- GitLab From d66a0b514e0baaf5fae672d95d1e718f13b544a2 Mon Sep 17 00:00:00 2001 From: Karol Herbst <kherbst@redhat.com> Date: Thu, 14 Dec 2023 03:29:20 +0100 Subject: [PATCH 6/7] wgl: link against libgalliumvl_stub Signed-off-by: Karol Herbst <kherbst@redhat.com> --- src/gallium/targets/wgl/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/targets/wgl/meson.build b/src/gallium/targets/wgl/meson.build index d48863da4f946..571f5b1393d49 100644 --- a/src/gallium/targets/wgl/meson.build +++ b/src/gallium/targets/wgl/meson.build @@ -38,7 +38,7 @@ libgallium_wgl = shared_library( ], link_whole : [libwgl], link_with : [ - libgallium, libglsl, libmesa, libwsgdi, libglapi_static, libglapi, libgalliumvl + libgallium, libglsl, libmesa, libwsgdi, libglapi_static, libglapi, libgalliumvl_stub, ], dependencies : [ dep_ws2_32, idep_nir, idep_mesautil, driver_swrast, -- GitLab From e4aa1b403746a408a4c854be400ed0cf2c987c9a Mon Sep 17 00:00:00 2001 From: Karol Herbst <kherbst@redhat.com> Date: Thu, 14 Dec 2023 03:20:25 +0100 Subject: [PATCH 7/7] gallium/drivers: do not link against libgalliumvl directly libgalliumvl_stub was added so not all frontends have to link in full video accleration support, shaving off around 100kB of binary size. Signed-off-by: Karol Herbst <kherbst@redhat.com> --- src/gallium/drivers/d3d12/meson.build | 2 +- src/gallium/drivers/r600/meson.build | 1 - src/gallium/drivers/radeonsi/meson.build | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/d3d12/meson.build b/src/gallium/drivers/d3d12/meson.build index 3d4f5995f565a..71fa95a8de4ac 100644 --- a/src/gallium/drivers/d3d12/meson.build +++ b/src/gallium/drivers/d3d12/meson.build @@ -154,5 +154,5 @@ libd3d12 = static_library( driver_d3d12 = declare_dependency( compile_args : '-DGALLIUM_D3D12', - link_with : [libd3d12, libgalliumvl], + link_with : [libd3d12], ) diff --git a/src/gallium/drivers/r600/meson.build b/src/gallium/drivers/r600/meson.build index 023719a3a16f2..974b59d4594b9 100644 --- a/src/gallium/drivers/r600/meson.build +++ b/src/gallium/drivers/r600/meson.build @@ -185,7 +185,6 @@ libr600 = static_library( inc_src, inc_mapi, inc_mesa, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common, inc_gallium_drivers, ], - link_with : [ libgalliumvl ], dependencies: [dep_libdrm_radeon, dep_elf, dep_llvm, idep_nir, idep_nir_headers], ) diff --git a/src/gallium/drivers/radeonsi/meson.build b/src/gallium/drivers/radeonsi/meson.build index ed76ef822b19d..fd9db54b6c5b1 100644 --- a/src/gallium/drivers/radeonsi/meson.build +++ b/src/gallium/drivers/radeonsi/meson.build @@ -166,7 +166,7 @@ libradeonsi = static_library( driver_radeonsi = declare_dependency( compile_args : '-DGALLIUM_RADEONSI', link_with : radeonsi_gfx_libs + [ - libradeonsi, libradeonwinsys, libamdgpuwinsys, libamd_common, libamd_common_llvm, libgalliumvl, libvpe + libradeonsi, libradeonwinsys, libamdgpuwinsys, libamd_common, libamd_common_llvm, libvpe ], dependencies : idep_nir, ) -- GitLab