summaryrefslogtreecommitdiff
path: root/slang.h
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-04-20 20:06:37 +0800
committerGitHub <noreply@github.com>2023-04-20 20:06:37 +0800
commit4d24f55226870055c8dcbb3409efc5355da134d7 (patch)
tree479c4341e38dcea2f1b9a831cf6ce0dea20234ac /slang.h
parent588991f6df3d6813378721166a7260990835817e (diff)
Changes for vkd3d proton (#2813)
* Add some caches to .gitignore * Remove appendWideChars Use String::toWString instead * s/Sleep/sleepCurrentThread * formatting * Expand set of shared libraries which have buggy dlclose Work around https://github.com/microsoft/DirectXShaderCompiler/issues/5119 and https://github.com/doitsujin/dxvk/issues/3330 libdxcompiler.so invokes UB on dlclose, the dxvk libs break GDB when closed * Add assert for specialization failure on DX11 As a band aid for https://github.com/shader-slang/slang/issues/2805 * More fine grained selection of directx features
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/slang.h b/slang.h
index 404d2ea23..732402441 100644
--- a/slang.h
+++ b/slang.h
@@ -166,6 +166,30 @@ Any platforms not detected by the above logic are now now explicitly zeroed out.
#define SLANG_APPLE_FAMILY (SLANG_IOS || SLANG_OSX) /* equivalent to #if __APPLE__ */
#define SLANG_UNIX_FAMILY (SLANG_LINUX_FAMILY || SLANG_APPLE_FAMILY) /* shortcut for unix/posix platforms */
+/* Macros concerning DirectX */
+#if SLANG_WINDOWS_FAMILY
+# define SLANG_ENABLE_DIRECTX 1
+# define SLANG_ENABLE_DXGI_DEBUG 1
+# define SLANG_ENABLE_FXC 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_DXGI_DEBUG 0
+# define SLANG_ENABLE_FXC 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_FXC 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. */
#ifndef SLANG_NO_THROW
# if SLANG_WINDOWS_FAMILY && !defined(SLANG_DISABLE_EXCEPTIONS)