From 5adecbe837d27cf4e0a554ae13a0338743a8cb4b Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Sat, 29 Apr 2023 11:32:53 +0800 Subject: vkd3d and dxvk integration (#2823) * Add d3d sources for linux builds * Return NOT_IMPLEMENTED for shared handle support on Linux * Enable DirectX api on Linux * Do not report DX11 support without FXC * Initial version of SynchAPI emulation * Neaten dx library name handling * Neaten and use posix-synchapi * Add premake option for DirectX on Vulkan * s/SLANG_ENABLE_VKD3D_PROTON/SLANG_ENABLE_VKD3D * Skip failing tests on vkd3d * Regenerate vs projects * Silence unused var warning --- slang.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 31a98481a..89ef4ce4e 100644 --- a/slang.h +++ b/slang.h @@ -167,27 +167,29 @@ Any platforms not detected by the above logic are now now explicitly zeroed out. #define SLANG_UNIX_FAMILY (SLANG_LINUX_FAMILY || SLANG_APPLE_FAMILY) /* shortcut for unix/posix platforms */ /* Macros concerning DirectX */ +#if !defined(SLANG_CONFIG_DX_ON_VK) || !SLANG_CONFIG_DX_ON_VK +# define SLANG_ENABLE_DXVK 0 +# define SLANG_ENABLE_VKD3D 0 +#else +# define SLANG_ENABLE_DXVK 1 +# define SLANG_ENABLE_VKD3D 1 +#endif + #if SLANG_WINDOWS_FAMILY # define SLANG_ENABLE_DIRECTX 1 # define SLANG_ENABLE_DXGI_DEBUG 1 # define SLANG_ENABLE_DXBC_SUPPORT 1 # define SLANG_ENABLE_PIX 1 -# define SLANG_ENABLE_DXVK 0 -# define SLANG_ENABLE_VKD3D_PROTON 0 #elif SLANG_LINUX_FAMILY -# define SLANG_ENABLE_DIRECTX 0 +# define SLANG_ENABLE_DIRECTX (SLANG_ENABLE_DXVK || SLANG_ENABLE_VKD3D) # define SLANG_ENABLE_DXGI_DEBUG 0 # define SLANG_ENABLE_DXBC_SUPPORT 0 # define SLANG_ENABLE_PIX 0 -# define SLANG_ENABLE_DXVK 1 -# define SLANG_ENABLE_VKD3D_PROTON 1 #else # define SLANG_ENABLE_DIRECTX 0 # define SLANG_ENABLE_DXGI_DEBUG 0 # define SLANG_ENABLE_DXBC_SUPPORT 0 # define SLANG_ENABLE_PIX 0 -# define SLANG_ENABLE_DXVK 0 -# define SLANG_ENABLE_VKD3D_PROTON 0 #endif /* Macro for declaring if a method is no throw. Should be set before the return parameter. */ -- cgit v1.2.3