Commit f49820dd by Ben Clayton

Move hlsl/ source to glslang/HLSL/

Now that the HLSL source files are part of the `glslang` target (#2271), it makes sense for these to sit in the `glslang` directory. Changed the case of the directory from `hlsl` to `HLSL` to better match the sibling directories.
parent 4928d556
......@@ -27,15 +27,15 @@ include $(CLEAR_VARS)
LOCAL_MODULE:=HLSL
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_SRC_FILES:= \
hlsl/hlslAttributes.cpp \
hlsl/hlslGrammar.cpp \
hlsl/hlslOpMap.cpp \
hlsl/hlslParseables.cpp \
hlsl/hlslParseHelper.cpp \
hlsl/hlslScanContext.cpp \
hlsl/hlslTokenStream.cpp
glslang/HLSL/hlslAttributes.cpp \
glslang/HLSL/hlslGrammar.cpp \
glslang/HLSL/hlslOpMap.cpp \
glslang/HLSL/hlslParseables.cpp \
glslang/HLSL/hlslParseHelper.cpp \
glslang/HLSL/hlslScanContext.cpp \
glslang/HLSL/hlslTokenStream.cpp
LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
$(LOCAL_PATH)/hlsl
$(LOCAL_PATH)/glslang/HLSL
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
......
......@@ -34,15 +34,15 @@ cc_library(
srcs = glob(
[
"glslang/GenericCodeGen/*.cpp",
"glslang/HLSL/*.cpp",
"glslang/MachineIndependent/*.cpp",
"glslang/MachineIndependent/preprocessor/*.cpp",
"hlsl/*.cpp",
],
exclude = [
"glslang/HLSL/pch.cpp",
"glslang/HLSL/pch.h",
"glslang/MachineIndependent/pch.cpp",
"glslang/MachineIndependent/pch.h",
"hlsl/pch.cpp",
"hlsl/pch.h",
],
) + [
"OGLCompilersDLL/InitializeDll.cpp",
......@@ -53,10 +53,10 @@ cc_library(
["glslang/OSDependent/Unix/ossource.cpp"],
}),
hdrs = glob([
"glslang/HLSL/*.h",
"glslang/Include/*.h",
"glslang/MachineIndependent/*.h",
"glslang/MachineIndependent/preprocessor/*.h",
"hlsl/*.h",
]) + [
"OGLCompilersDLL/InitializeDll.h",
"StandAlone/DirStackFileIncluder.h",
......
......@@ -88,6 +88,21 @@ source_set("glslang_sources") {
"SPIRV/spvIR.h",
"glslang/GenericCodeGen/CodeGen.cpp",
"glslang/GenericCodeGen/Link.cpp",
"glslang/HLSL/hlslAttributes.cpp",
"glslang/HLSL/hlslAttributes.h",
"glslang/HLSL/hlslGrammar.cpp",
"glslang/HLSL/hlslGrammar.h",
"glslang/HLSL/hlslOpMap.cpp",
"glslang/HLSL/hlslOpMap.h",
"glslang/HLSL/hlslParseables.cpp",
"glslang/HLSL/hlslParseables.h",
"glslang/HLSL/hlslParseHelper.cpp",
"glslang/HLSL/hlslParseHelper.h",
"glslang/HLSL/hlslScanContext.cpp",
"glslang/HLSL/hlslScanContext.h",
"glslang/HLSL/hlslTokens.h",
"glslang/HLSL/hlslTokenStream.cpp",
"glslang/HLSL/hlslTokenStream.h",
"glslang/Include/BaseTypes.h",
"glslang/Include/Common.h",
"glslang/Include/ConstantUnion.h",
......@@ -147,21 +162,6 @@ source_set("glslang_sources") {
"glslang/MachineIndependent/reflection.h",
"glslang/OSDependent/osinclude.h",
"glslang/Public/ShaderLang.h",
"hlsl/hlslAttributes.cpp",
"hlsl/hlslAttributes.h",
"hlsl/hlslGrammar.cpp",
"hlsl/hlslGrammar.h",
"hlsl/hlslOpMap.cpp",
"hlsl/hlslOpMap.h",
"hlsl/hlslParseHelper.cpp",
"hlsl/hlslParseHelper.h",
"hlsl/hlslParseables.cpp",
"hlsl/hlslParseables.h",
"hlsl/hlslScanContext.cpp",
"hlsl/hlslScanContext.h",
"hlsl/hlslTokenStream.cpp",
"hlsl/hlslTokenStream.h",
"hlsl/hlslTokens.h",
]
defines = [ "ENABLE_OPT=1" ]
......
......@@ -84,23 +84,23 @@ glslang_pch(SOURCES MachineIndependent/pch.cpp)
if(ENABLE_HLSL)
list(APPEND SOURCES
../hlsl/hlslAttributes.cpp
../hlsl/hlslParseHelper.cpp
../hlsl/hlslScanContext.cpp
../hlsl/hlslOpMap.cpp
../hlsl/hlslTokenStream.cpp
../hlsl/hlslGrammar.cpp
../hlsl/hlslParseables.cpp)
HLSL/hlslAttributes.cpp
HLSL/hlslParseHelper.cpp
HLSL/hlslScanContext.cpp
HLSL/hlslOpMap.cpp
HLSL/hlslTokenStream.cpp
HLSL/hlslGrammar.cpp
HLSL/hlslParseables.cpp)
list(APPEND HEADERS
../hlsl/hlslAttributes.h
../hlsl/hlslParseHelper.h
../hlsl/hlslTokens.h
../hlsl/hlslScanContext.h
../hlsl/hlslOpMap.h
../hlsl/hlslTokenStream.h
../hlsl/hlslGrammar.h
../hlsl/hlslParseables.h)
HLSL/hlslAttributes.h
HLSL/hlslParseHelper.h
HLSL/hlslTokens.h
HLSL/hlslScanContext.h
HLSL/hlslOpMap.h
HLSL/hlslTokenStream.h
HLSL/hlslGrammar.h
HLSL/hlslParseables.h)
endif(ENABLE_HLSL)
add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
......
......@@ -39,8 +39,8 @@
#include <unordered_map>
#include <functional>
#include "../glslang/MachineIndependent/attribute.h"
#include "../glslang/MachineIndependent/SymbolTable.h"
#include "../MachineIndependent/attribute.h"
#include "../MachineIndependent/SymbolTable.h"
#include "hlslScanContext.h"
namespace glslang {
......
......@@ -36,9 +36,9 @@
#ifndef HLSL_PARSE_INCLUDED_
#define HLSL_PARSE_INCLUDED_
#include "../glslang/MachineIndependent/parseVersions.h"
#include "../glslang/MachineIndependent/ParseHelper.h"
#include "../glslang/MachineIndependent/attribute.h"
#include "../MachineIndependent/parseVersions.h"
#include "../MachineIndependent/ParseHelper.h"
#include "../MachineIndependent/attribute.h"
#include <array>
......@@ -320,7 +320,7 @@ protected:
// Finalization step: remove unused buffer blocks from linkage (we don't know until the
// shader is entirely compiled)
void removeUnusedStructBufferCounters();
static bool isClipOrCullDistance(TBuiltInVariable);
static bool isClipOrCullDistance(const TQualifier& qual) { return isClipOrCullDistance(qual.builtIn); }
static bool isClipOrCullDistance(const TType& type) { return isClipOrCullDistance(type.getQualifier()); }
......@@ -407,7 +407,7 @@ protected:
// This tracks texture sample user structure return types. Only a limited number are supported, as
// may fit in TSampler::structReturnIndex.
TVector<TTypeList*> textureReturnStruct;
TMap<TString, bool> structBufferCounter; // true if counter buffer is in use
// The built-in interstage IO map considers e.g, EvqPosition on input and output separately, so that we
......@@ -456,7 +456,7 @@ protected:
std::array<int, maxClipCullRegs> cullSemanticNSizeOut; // vector, indexed by cull semantic ID
// This tracks the first (mip level) argument to the .mips[][] operator. Since this can be nested as
// in tx.mips[tx.mips[0][1].x][2], we need a stack. We also track the TSourceLoc for error reporting
// in tx.mips[tx.mips[0][1].x][2], we need a stack. We also track the TSourceLoc for error reporting
// purposes.
struct tMipsOperatorData {
tMipsOperatorData(TSourceLoc l, TIntermTyped* m) : loc(l), mipLevel(m) { }
......
......@@ -36,7 +36,7 @@
#ifndef _HLSLPARSEABLES_INCLUDED_
#define _HLSLPARSEABLES_INCLUDED_
#include "../glslang/MachineIndependent/Initialize.h"
#include "../MachineIndependent/Initialize.h"
namespace glslang {
......
......@@ -42,15 +42,15 @@
#include <unordered_map>
#include <unordered_set>
#include "../glslang/Include/Types.h"
#include "../glslang/MachineIndependent/SymbolTable.h"
#include "../glslang/MachineIndependent/ParseHelper.h"
#include "../Include/Types.h"
#include "../MachineIndependent/SymbolTable.h"
#include "../MachineIndependent/ParseHelper.h"
#include "hlslScanContext.h"
#include "hlslTokens.h"
// preprocessor includes
#include "../glslang/MachineIndependent/preprocessor/PpContext.h"
#include "../glslang/MachineIndependent/preprocessor/PpTokens.h"
#include "../MachineIndependent/preprocessor/PpContext.h"
#include "../MachineIndependent/preprocessor/PpTokens.h"
namespace {
......
......@@ -41,7 +41,7 @@
#ifndef HLSLSCANCONTEXT_H_
#define HLSLSCANCONTEXT_H_
#include "../glslang/MachineIndependent/ParseHelper.h"
#include "../MachineIndependent/ParseHelper.h"
#include "hlslTokens.h"
namespace glslang {
......
......@@ -34,21 +34,20 @@
// POSSIBILITY OF SUCH DAMAGE.
//
#include "hlslAttributes.h"
#include "hlslGrammar.h"
#include "hlslParseHelper.h"
#include "hlslScanContext.h"
#include "hlslGrammar.h"
#include "hlslAttributes.h"
#include "../glslang/MachineIndependent/Scan.h"
#include "../glslang/MachineIndependent/preprocessor/PpContext.h"
#include "../MachineIndependent/Scan.h"
#include "../MachineIndependent/preprocessor/PpContext.h"
#include "../glslang/OSDependent/osinclude.h"
#include "../OSDependent/osinclude.h"
#include <algorithm>
#include <functional>
#include <cctype>
#include <array>
#include <cctype>
#include <functional>
#include <set>
#endif /* _PCH_H */
......@@ -51,9 +51,9 @@
#include "ScanContext.h"
#ifdef ENABLE_HLSL
#include "../../hlsl/hlslParseHelper.h"
#include "../../hlsl/hlslParseables.h"
#include "../../hlsl/hlslScanContext.h"
#include "../HLSL/hlslParseHelper.h"
#include "../HLSL/hlslParseables.h"
#include "../HLSL/hlslScanContext.h"
#endif
#include "../Include/ShHandle.h"
......
# The HLSL source is directly embedded into the glslang target when ENABLE_HLSL
# is set.
# This source now lives at: glslang/HLSL/
# The HLSL target is now just a stub that exists for backwards compatibility for
# projects that referenced this target.
......
......@@ -35,6 +35,7 @@
// The HLSL source is directly embedded into the glslang target when ENABLE_HLSL
// is set.
// This source now lives at: glslang/HLSL/
// The HLSL target is now just a stub that exists for backwards compatibility
// for projects that referenced this target. As a target requires at least one
// source file to build, this file acts as that stub.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment