diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/compiler-core/slang-fxc-compiler.cpp | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/source/compiler-core/slang-fxc-compiler.cpp b/source/compiler-core/slang-fxc-compiler.cpp index 9d547e673..4153585d3 100644 --- a/source/compiler-core/slang-fxc-compiler.cpp +++ b/source/compiler-core/slang-fxc-compiler.cpp @@ -1,6 +1,8 @@ // slang-fxc-compiler.cpp #include "slang-fxc-compiler.h" +#if SLANG_ENABLE_DXBC_SUPPORT + #include "../core/slang-common.h" #include "../../slang-com-helper.h" @@ -28,28 +30,20 @@ #ifdef _WIN32 # include <windows.h> # include <d3dcompiler.h> - -# ifndef SLANG_ENABLE_DXBC_SUPPORT -# define SLANG_ENABLE_DXBC_SUPPORT 1 -# endif #endif -#ifndef SLANG_ENABLE_DXBC_SUPPORT -# define SLANG_ENABLE_DXBC_SUPPORT 0 +// Some of the `D3DCOMPILE_*` constants aren't available in all +// versions of `d3dcompiler.h`, so we define them here just in case +#ifndef D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES +# define D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES (1 << 20) #endif -#if SLANG_ENABLE_DXBC_SUPPORT - // Some of the `D3DCOMPILE_*` constants aren't available in all - // versions of `d3dcompiler.h`, so we define them here just in case -# ifndef D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES -# define D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES (1 << 20) -# endif - -# ifndef D3DCOMPILE_ALL_RESOURCES_BOUND -# define D3DCOMPILE_ALL_RESOURCES_BOUND (1 << 21) -# endif +#ifndef D3DCOMPILE_ALL_RESOURCES_BOUND +# define D3DCOMPILE_ALL_RESOURCES_BOUND (1 << 21) #endif +#endif // SLANG_ENABLE_DXBC_SUPPORT + namespace Slang { @@ -396,6 +390,6 @@ SlangResult FXCDownstreamCompiler::convert(IArtifact* from, const ArtifactDesc& return SLANG_E_NOT_AVAILABLE; } -#endif // SLANG_ENABLE_DXBC_SUPPORT +#endif // else SLANG_ENABLE_DXBC_SUPPORT } |
