Browse Source

Switch D3D9Compiler disable flag to be opt-in instead of opt-out

JoshEngebretson 9 years ago
parent
commit
520a84a130

+ 2 - 2
Build/CMake/Modules/AtomicWindows.cmake

@@ -31,8 +31,8 @@ endif()
 
 # removes dependency on D3DCompiler dll for Atomic Direct3D9 builds which don't require it
 # (binaries that never initialize the Direct3D9 graphics subsystem)
-if (NOT ATOMIC_D3DCOMPILER_DISABLE AND NOT ATOMIC_UWEBKIT)
-  add_definitions(-DATOMIC_D3DCOMPILER_ENABLED)
+if (ATOMIC_D3D9SHADERCOMPILER_DISABLE)
+  add_definitions(-DATOMIC_D3D9SHADERCOMPILER_DISABLE)
 endif()
 
 

+ 2 - 2
Source/Atomic/Graphics/Direct3D9/D3D9ShaderVariation.cpp

@@ -31,7 +31,7 @@
 #include "../../IO/Log.h"
 #include "../../Resource/ResourceCache.h"
 
-#ifdef ATOMIC_D3DCOMPILER_ENABLED
+#ifndef ATOMIC_D3D9SHADERCOMPILER_DISABLE
 #include <d3dcompiler.h>
 #endif
 
@@ -224,7 +224,7 @@ bool ShaderVariation::LoadByteCode(PODVector<unsigned>& byteCode, const String&
 bool ShaderVariation::Compile(PODVector<unsigned>& byteCode)
 {
 
-#ifndef ATOMIC_D3DCOMPILER_ENABLED
+#ifdef ATOMIC_D3D9SHADERCOMPILER_DISABLE
     return false;
 #else
     const String& sourceCode = owner_->GetSourceCode(type_);