From 4d24f55226870055c8dcbb3409efc5355da134d7 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 20 Apr 2023 20:06:37 +0800 Subject: 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 --- slang.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'slang.h') 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) -- cgit v1.2.3