summaryrefslogtreecommitdiff
path: root/slang.h
diff options
context:
space:
mode:
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. */