summaryrefslogtreecommitdiff
path: root/slang.h
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-04-29 11:32:53 +0800
committerGitHub <noreply@github.com>2023-04-29 11:32:53 +0800
commit5adecbe837d27cf4e0a554ae13a0338743a8cb4b (patch)
treec1e791427a2b57165f950f5df264bbaca551ccaf /slang.h
parent5df7ada451a993efff2b80bb1af2d8c7579ba00b (diff)
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
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h16
1 files changed, 9 insertions, 7 deletions
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. */