Change disabled-by-default DISABLE_HLSL option to enabled-by-default ENABLE_HLSL.

Matches existing options.
This commit is contained in:
Alex Szpakowski 2017-01-09 18:10:14 -04:00
parent 84eabf7ea7
commit ff21a25bc8
3 changed files with 12 additions and 12 deletions

View File

@ -6,7 +6,7 @@ option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON)
option(ENABLE_NV_EXTENSIONS "Enables support of Nvidia-specific extensions" ON) option(ENABLE_NV_EXTENSIONS "Enables support of Nvidia-specific extensions" ON)
option(DISABLE_HLSL "Disables HLSL input support" OFF) option(ENABLE_HLSL "Enables HLSL input support" ON)
enable_testing() enable_testing()
@ -22,9 +22,9 @@ if(ENABLE_NV_EXTENSIONS)
add_definitions(-DNV_EXTENSIONS) add_definitions(-DNV_EXTENSIONS)
endif(ENABLE_NV_EXTENSIONS) endif(ENABLE_NV_EXTENSIONS)
if(DISABLE_HLSL) if(ENABLE_HLSL)
add_definitions(-DDISABLE_HLSL) add_definitions(-DENABLE_HLSL)
endif(DISABLE_HLSL) endif(ENABLE_HLSL)
if(WIN32) if(WIN32)
set(CMAKE_DEBUG_POSTFIX "d") set(CMAKE_DEBUG_POSTFIX "d")
@ -69,7 +69,7 @@ if(ENABLE_GLSLANG_BINARIES)
add_subdirectory(StandAlone) add_subdirectory(StandAlone)
endif() endif()
add_subdirectory(SPIRV) add_subdirectory(SPIRV)
if(NOT DISABLE_HLSL) if(ENABLE_HLSL)
add_subdirectory(hlsl) add_subdirectory(hlsl)
endif() endif()
add_subdirectory(gtests) add_subdirectory(gtests)

View File

@ -26,7 +26,7 @@ set(LIBRARIES
SPVRemapper SPVRemapper
glslang-default-resource-limits) glslang-default-resource-limits)
if(NOT DISABLE_HLSL) if(ENABLE_HLSL)
set(LIBRARIES ${LIBRARIES} HLSL) set(LIBRARIES ${LIBRARIES} HLSL)
endif() endif()

View File

@ -50,7 +50,7 @@
#include "Scan.h" #include "Scan.h"
#include "ScanContext.h" #include "ScanContext.h"
#ifndef DISABLE_HLSL #ifdef ENABLE_HLSL
#include "../../hlsl/hlslParseHelper.h" #include "../../hlsl/hlslParseHelper.h"
#include "../../hlsl/hlslParseables.h" #include "../../hlsl/hlslParseables.h"
#include "../../hlsl/hlslScanContext.h" #include "../../hlsl/hlslScanContext.h"
@ -76,7 +76,7 @@ TBuiltInParseables* CreateBuiltInParseables(TInfoSink& infoSink, EShSource sourc
{ {
switch (source) { switch (source) {
case EShSourceGlsl: return new TBuiltIns(); // GLSL builtIns case EShSourceGlsl: return new TBuiltIns(); // GLSL builtIns
#ifndef DISABLE_HLSL #ifdef ENABLE_HLSL
case EShSourceHlsl: return new TBuiltInParseablesHlsl(); // HLSL intrinsics case EShSourceHlsl: return new TBuiltInParseablesHlsl(); // HLSL intrinsics
#endif #endif
@ -93,7 +93,7 @@ TParseContextBase* CreateParseContext(TSymbolTable& symbolTable, TIntermediate&
SpvVersion spvVersion, bool forwardCompatible, EShMessages messages, SpvVersion spvVersion, bool forwardCompatible, EShMessages messages,
bool parsingBuiltIns, const std::string sourceEntryPointName = "") bool parsingBuiltIns, const std::string sourceEntryPointName = "")
{ {
#ifdef DISABLE_HLSL #ifndef ENABLE_HLSL
(void)sourceEntryPointName; // Unused argument. (void)sourceEntryPointName; // Unused argument.
#endif #endif
@ -103,7 +103,7 @@ TParseContextBase* CreateParseContext(TSymbolTable& symbolTable, TIntermediate&
return new TParseContext(symbolTable, intermediate, parsingBuiltIns, version, profile, spvVersion, return new TParseContext(symbolTable, intermediate, parsingBuiltIns, version, profile, spvVersion,
language, infoSink, forwardCompatible, messages); language, infoSink, forwardCompatible, messages);
#ifndef DISABLE_HLSL #ifdef ENABLE_HLSL
case EShSourceHlsl: case EShSourceHlsl:
return new HlslParseContext(symbolTable, intermediate, parsingBuiltIns, version, profile, spvVersion, return new HlslParseContext(symbolTable, intermediate, parsingBuiltIns, version, profile, spvVersion,
language, infoSink, sourceEntryPointName.c_str(), forwardCompatible, messages); language, infoSink, sourceEntryPointName.c_str(), forwardCompatible, messages);
@ -1096,7 +1096,7 @@ int ShInitialize()
PerProcessGPA = new TPoolAllocator(); PerProcessGPA = new TPoolAllocator();
glslang::TScanContext::fillInKeywordMap(); glslang::TScanContext::fillInKeywordMap();
#ifndef DISABLE_HLSL #ifdef ENABLE_HLSL
glslang::HlslScanContext::fillInKeywordMap(); glslang::HlslScanContext::fillInKeywordMap();
#endif #endif
@ -1191,7 +1191,7 @@ int __fastcall ShFinalize()
} }
glslang::TScanContext::deleteKeywordMap(); glslang::TScanContext::deleteKeywordMap();
#ifndef DISABLE_HLSL #ifdef ENABLE_HLSL
glslang::HlslScanContext::deleteKeywordMap(); glslang::HlslScanContext::deleteKeywordMap();
#endif #endif