1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[build] Add version scripts for native builds

FEX would like clean symbols for experimenting with making thunks down the line.

We also just shouldn't be exporting a bunch of random crap -- sadly -fvisibility=hidden doesn't help with a bunch of stuff :(

For reference, RADV also does this.
This commit is contained in:
Joshua Ashton 2022-10-06 01:22:17 +01:00 committed by Philip Rebohle
parent 25798f6fe1
commit 1d3decf100
6 changed files with 75 additions and 0 deletions

10
src/d3d11/d3d11.sym Normal file
View File

@ -0,0 +1,10 @@
{
global:
D3D11CoreCreateDevice;
D3D11CreateDevice;
D3D11CreateDeviceAndSwapChain;
D3D11On12CreateDevice;
local:
*;
};

View File

@ -67,6 +67,14 @@ d3d11_shaders = files([
'shaders/d3d11_video_blit_vert.vert',
])
d3d11_ld_args = []
d3d11_link_depends = []
if platform != 'windows'
d3d11_ld_args += [ '-Wl,--version-script', join_paths(meson.current_source_dir(), 'd3d11.sym') ]
d3d11_link_depends += files('d3d11.sym')
endif
d3d11_dll = shared_library('d3d11'+dll_ext, dxgi_common_src + d3d11_src + d3d10_src,
glsl_generator.process(d3d11_shaders), d3d11_res,
name_prefix : dxvk_name_prefix,
@ -74,6 +82,8 @@ d3d11_dll = shared_library('d3d11'+dll_ext, dxgi_common_src + d3d11_src + d3d10_
include_directories : dxvk_include_path,
install : true,
vs_module_defs : 'd3d11'+def_spec_ext,
link_args : d3d11_ld_args,
link_depends : [ d3d11_link_depends ],
)
d3d11_dep = declare_dependency(

24
src/d3d9/d3d9.sym Normal file
View File

@ -0,0 +1,24 @@
{
global:
Direct3DCreate9;
Direct3DCreate9Ex;
D3DPERF_BeginEvent;
D3DPERF_EndEvent;
D3DPERF_SetMarker;
D3DPERF_SetRegion;
D3DPERF_QueryRepeatFrame;
D3DPERF_SetOptions;
D3DPERF_GetStatus;
DebugSetMute;
DebugSetLevel;
PSGPError;
PSGPSampleTexture;
Direct3DShaderValidatorCreate9;
Direct3D9EnableMaximizedWindowedModeShim;
DXVK_RegisterAnnotation;
DXVK_UnRegisterAnnotation;
Direct3D9ForceHybridEnumeration;
local:
*;
};

View File

@ -46,12 +46,22 @@ d3d9_src = [
'd3d9_interop.cpp'
]
d3d9_ld_args = []
d3d9_link_depends = []
if platform != 'windows'
d3d9_ld_args += [ '-Wl,--version-script', join_paths(meson.current_source_dir(), 'd3d9.sym') ]
d3d9_link_depends += files('d3d9.sym')
endif
d3d9_dll = shared_library('d3d9'+dll_ext, d3d9_src, glsl_generator.process(d3d9_shaders), d3d9_res,
name_prefix : dxvk_name_prefix,
dependencies : [ dxso_dep, dxvk_dep ],
include_directories : dxvk_include_path,
install : true,
vs_module_defs : 'd3d9'+def_spec_ext,
link_args : d3d9_ld_args,
link_depends : [ d3d9_link_depends ],
)
d3d9_dep = declare_dependency(

11
src/dxgi/dxgi.sym Normal file
View File

@ -0,0 +1,11 @@
{
global:
CreateDXGIFactory2;
CreateDXGIFactory1;
CreateDXGIFactory;
DXGIDeclareAdapterRemovalSupport;
DXGIGetDebugInterface1;
local:
*;
};

View File

@ -12,12 +12,22 @@ dxgi_src = [
'dxgi_swapchain.cpp',
]
dxgi_ld_args = []
dxgi_link_depends = []
if platform != 'windows'
dxgi_ld_args += [ '-Wl,--version-script', join_paths(meson.current_source_dir(), 'dxgi.sym') ]
dxgi_link_depends += files('dxgi.sym')
endif
dxgi_dll = shared_library('dxgi'+dll_ext, dxgi_src, dxgi_res,
name_prefix : dxvk_name_prefix,
dependencies : [ dxvk_dep ],
include_directories : dxvk_include_path,
install : true,
vs_module_defs : 'dxgi'+def_spec_ext,
link_args : dxgi_ld_args,
link_depends : [ dxgi_link_depends ],
)
dxgi_dep = declare_dependency(