Commit 6790109c authored by Karol Herbst's avatar Karol Herbst 🐧 Committed by Karol Herbst

meson: nuke the dynamic pipe-loader

parent e4f46606
Pipeline #36025 passed with stages
in 10 minutes and 11 seconds
......@@ -50,21 +50,3 @@ libpipe_loader_static = static_library(
dependencies : [dep_libdrm],
build_by_default : false,
)
libpipe_loader_dynamic = static_library(
'pipe_loader_dynamic',
[files_pipe_loader, xmlpool_options_h],
include_directories : [
inc_util, inc_loader, inc_gallium, inc_include, inc_src, inc_gallium_aux,
inc_gallium_winsys,
],
c_args : [
c_vis_args, libpipe_loader_defines,
'-DPIPE_SEARCH_DIR="@0@"'.format(
join_paths(get_option('prefix'), get_option('libdir'), 'gallium-pipe')
)
],
link_with : [libloader, libxmlconfig],
dependencies : [dep_libdrm],
build_by_default : false,
)
......@@ -150,10 +150,6 @@ else
driver_lima = declare_dependency()
endif
if with_gallium_opencl
# TODO: this isn't really clover specific, but ATM clover is the only
# consumer
subdir('targets/pipe-loader')
subdir('state_trackers/clover')
subdir('targets/opencl')
endif
......
# Copyright © 2017-2018 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
pipe_loader_link_args = [ld_args_gc_sections]
pipe_loader_link_deps = []
pipe_loader_link_with = [libgallium, libnir, libmesa_util]
pipe_loader_comp_args = []
pipe_loader_incs = [
inc_include, inc_src, inc_util, inc_gallium, inc_gallium_drivers,
inc_gallium_winsys, inc_gallium_aux,
]
if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
with_gallium_xvmc or with_dri)
pipe_loader_link_with += libgalliumvl
else
pipe_loader_link_with += libgalliumvl_stub
endif
if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
with_gallium_xvmc)
pipe_loader_link_with += libgalliumvlwinsys
endif
if with_ld_version_script
pipe_loader_link_args += [
'-Wl,--version-script', join_paths(meson.current_source_dir(), 'pipe.sym')
]
pipe_loader_link_deps += files('pipe.sym')
endif
pipe_loader_install_dir = join_paths(get_option('libdir'), 'gallium-pipe')
pipe_loaders = [
[with_gallium_i915, 'i915', driver_i915, [], []],
[with_gallium_nouveau, 'nouveau', driver_nouveau, [], []],
[with_gallium_r300, 'r300', driver_r300, [], []],
[with_gallium_r600, 'r600', driver_r600, [], []],
[with_gallium_radeonsi, 'radeonsi', driver_radeonsi, [libxmlconfig], [xmlpool_options_h]],
[with_gallium_freedreno, 'msm', driver_freedreno, [], []],
[with_gallium_svga, 'vmwgfx', driver_svga, [], []],
[with_gallium_softpipe, 'swrast', [driver_swrast, driver_swr], [libwsw, libws_null], []],
]
foreach x : pipe_loaders
if x[0]
shared_library(
'pipe_@0@'.format(x[1]),
['pipe_@0@.c'.format(x[1]), x[4]],
c_args : [pipe_loader_comp_args, c_vis_args],
cpp_args : [pipe_loader_comp_args, cpp_vis_args],
link_args : pipe_loader_link_args,
link_depends : pipe_loader_link_deps,
include_directories : pipe_loader_incs,
link_with : [pipe_loader_link_with, x[3]],
dependencies : [dep_thread, x[2]],
name_prefix : '',
install : true,
install_dir : pipe_loader_install_dir,
)
endif
endforeach
{
global:
driver_descriptor;
swrast_driver_descriptor;
# Workaround for an LLVM warning with -simplifycfg-sink-common
# due to LLVM being initialized multiple times.
radeon_drm_winsys_create;
amdgpu_winsys_create;
local:
*;
};
#include "target-helpers/inline_debug_helper.h"
#include "state_tracker/drm_driver.h"
#include "i915/drm/i915_drm_public.h"
#include "i915/i915_public.h"
static struct pipe_screen *
create_screen(int fd, const struct pipe_screen_config *config)
{
struct i915_winsys *iws;
struct pipe_screen *screen;
iws = i915_drm_winsys_create(fd);
if (!iws)
return NULL;
screen = i915_screen_create(iws);
if (!screen)
return NULL;
screen = debug_screen_wrap(screen);
return screen;
}
PUBLIC
DRM_DRIVER_DESCRIPTOR("i915", NULL, create_screen)
#include "target-helpers/inline_debug_helper.h"
#include "state_tracker/drm_driver.h"
#include "freedreno/drm/freedreno_drm_public.h"
static struct pipe_screen *
create_screen(int fd, const struct pipe_screen_config *config)
{
struct pipe_screen *screen;
screen = fd_drm_screen_create(fd, NULL);
if (!screen)
return NULL;
screen = debug_screen_wrap(screen);
return screen;
}
PUBLIC
DRM_DRIVER_DESCRIPTOR("msm", NULL, create_screen)
#include "target-helpers/inline_debug_helper.h"
#include "state_tracker/drm_driver.h"
#include "nouveau/drm/nouveau_drm_public.h"
static struct pipe_screen *
create_screen(int fd, const struct pipe_screen_config *config)
{
struct pipe_screen *screen;
screen = nouveau_drm_screen_create(fd);
if (!screen)
return NULL;
screen = debug_screen_wrap(screen);
return screen;
}
PUBLIC
DRM_DRIVER_DESCRIPTOR("nouveau", NULL, create_screen)
#include "target-helpers/inline_debug_helper.h"
#include "state_tracker/drm_driver.h"
#include "radeon/drm/radeon_drm_public.h"
#include "radeon/radeon_winsys.h"
#include "r300/r300_public.h"
static struct pipe_screen *
create_screen(int fd, const struct pipe_screen_config *config)
{
struct radeon_winsys *sws;
sws = radeon_drm_winsys_create(fd, config, r300_screen_create);
return sws ? debug_screen_wrap(sws->screen) : NULL;
}
PUBLIC
DRM_DRIVER_DESCRIPTOR("r300", NULL, create_screen)
#include "state_tracker/drm_driver.h"
#include "target-helpers/inline_debug_helper.h"
#include "radeon/drm/radeon_drm_public.h"
#include "radeon/radeon_winsys.h"
#include "r600/r600_public.h"
static struct pipe_screen *
create_screen(int fd, const struct pipe_screen_config *config)
{
struct radeon_winsys *rw;
rw = radeon_drm_winsys_create(fd, config, r600_screen_create);
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
PUBLIC
DRM_DRIVER_DESCRIPTOR("r600", NULL, create_screen)
#include "state_tracker/drm_driver.h"
#include "target-helpers/inline_debug_helper.h"
#include "radeon/drm/radeon_drm_public.h"
#include "radeon/radeon_winsys.h"
#include "amdgpu/drm/amdgpu_public.h"
#include "radeonsi/si_public.h"
#include "util/xmlpool.h"
static struct pipe_screen *
create_screen(int fd, const struct pipe_screen_config *config)
{
struct radeon_winsys *rw;
/* First, try amdgpu. */
rw = amdgpu_winsys_create(fd, config, radeonsi_screen_create);
if (!rw)
rw = radeon_drm_winsys_create(fd, config, radeonsi_screen_create);
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
static const char *driconf_xml =
#include "radeonsi/si_driinfo.h"
;
PUBLIC
DRM_DRIVER_DESCRIPTOR("radeonsi", &driconf_xml, create_screen)
#include "target-helpers/inline_sw_helper.h"
#include "target-helpers/inline_debug_helper.h"
#include "state_tracker/sw_driver.h"
#include "sw/dri/dri_sw_winsys.h"
#include "sw/kms-dri/kms_dri_sw_winsys.h"
#include "sw/null/null_sw_winsys.h"
#include "sw/wrapper/wrapper_sw_winsys.h"
PUBLIC struct pipe_screen *
swrast_create_screen(struct sw_winsys *ws);
struct pipe_screen *
swrast_create_screen(struct sw_winsys *ws)
{
struct pipe_screen *screen;
screen = sw_screen_create(ws);
if (screen)
screen = debug_screen_wrap(screen);
return screen;
}
PUBLIC
const struct sw_driver_descriptor swrast_driver_descriptor = {
.create_screen = swrast_create_screen,
.winsys = {
#ifdef HAVE_PIPE_LOADER_DRI
{
.name = "dri",
.create_winsys = dri_create_sw_winsys,
},
#endif
#ifdef HAVE_PIPE_LOADER_KMS
{
.name = "kms_dri",
.create_winsys = kms_dri_create_winsys,
},
#endif
{
.name = "null",
.create_winsys = null_sw_create,
},
{
.name = "wrapped",
.create_winsys = wrapper_sw_winsys_wrap_pipe_screen,
},
{ 0 },
}
};
#include "target-helpers/inline_debug_helper.h"
#include "state_tracker/drm_driver.h"
#include "svga/drm/svga_drm_public.h"
#include "svga/svga_public.h"
static struct pipe_screen *
create_screen(int fd, const struct pipe_screen_config *config)
{
struct svga_winsys_screen *sws;
struct pipe_screen *screen;
sws = svga_drm_winsys_screen_create(fd);
if (!sws)
return NULL;
screen = svga_screen_create(sws);
if (!screen)
return NULL;
screen = debug_screen_wrap(screen);
return screen;
}
PUBLIC
DRM_DRIVER_DESCRIPTOR("vmwgfx", NULL, create_screen)
......@@ -21,9 +21,14 @@
foreach t : ['compute', 'tri', 'quad-tex']
executable(
t,
'@0@.c'.format(t),
include_directories : inc_common,
link_with : [libmesa_util, libgallium, libpipe_loader_dynamic],
['@0@.c'.format(t), 'target.c'],
include_directories : [
inc_common, inc_util,
],
link_with : [
libmesa_util, libgallium, libpipe_loader_static,
libgalliumvl, libws_null, libwsw, libswdri, libswkmsdri,
],
install : false,
)
endforeach
#include "target-helpers/drm_helper.h"
#include "target-helpers/sw_helper.h"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment