vkd3d-utils: Move to .def exports

Otherwise this won't work in MSVC because it'd technically be re-defining the D3D12 function prototypes with the decltypes.

There is no other nice way around this.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2020-10-28 15:22:37 +00:00 committed by Hans-Kristian Arntzen
parent 37e6647ab0
commit a1a6840fb5
3 changed files with 31 additions and 3 deletions

View File

@ -31,10 +31,18 @@ extern "C" {
#define VKD3D_INFINITE (~0u)
#ifdef _WIN32
# ifdef VKD3D_UTILS_EXPORTS
# define VKD3D_UTILS_EXPORT __declspec(dllexport)
# ifdef _MSC_VER
# define VKD3D_UTILS_EXPORT
# else
# define VKD3D_UTILS_EXPORT __declspec(dllimport)
/* We need to specify the __declspec(dllexport) attribute
* on MinGW because otherwise the stdcall aliases/fixups
* don't get exported.
*/
# ifdef VKD3D_UTILS_EXPORTS
# define VKD3D_UTILS_EXPORT __declspec(dllexport)
# else
# define VKD3D_UTILS_EXPORT __declspec(dllimport)
# endif
# endif
#elif defined(__GNUC__)
# define VKD3D_UTILS_EXPORT DECLSPEC_VISIBLE

View File

@ -6,6 +6,10 @@ vkd3d_utils_lib = shared_library('vkd3d-proton-utils', vkd3d_utils_src, vkd3d_he
dependencies : vkd3d_dep,
include_directories : vkd3d_private_includes,
install : true,
objects : not vkd3d_msvc and vkd3d_platform == 'windows'
? 'vkd3d-proton-utils.def'
: [],
vs_module_defs : 'vkd3d-proton-utils.def',
version : '2.0.0',
c_args : '-DVKD3D_UTILS_EXPORTS',
override_options : [ 'c_std='+vkd3d_c_std ])

View File

@ -0,0 +1,16 @@
LIBRARY vkd3d-proton-utils-2.dll
EXPORTS
D3D12CreateDevice @101
D3D12GetDebugInterface @102
D3D12CreateRootSignatureDeserializer @107
D3D12CreateVersionedRootSignatureDeserializer @108
D3D12EnableExperimentalFeatures @110
D3D12SerializeRootSignature @115
D3D12SerializeVersionedRootSignature @116
vkd3d_create_event
vkd3d_wait_event
vkd3d_signal_event
vkd3d_destroy_event