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.
This commit is contained in:
Ben Clayton 2020-06-16 11:54:34 +01:00
parent 4928d556e6
commit f49820dd6b
24 changed files with 124 additions and 123 deletions

View File

@ -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)

View File

@ -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",

View File

@ -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" ]

View File

@ -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})

View File

@ -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 {

View File

@ -39,11 +39,11 @@
#include "hlslGrammar.h"
#include "hlslAttributes.h"
#include "../glslang/Include/Common.h"
#include "../glslang/MachineIndependent/Scan.h"
#include "../glslang/MachineIndependent/preprocessor/PpContext.h"
#include "../Include/Common.h"
#include "../MachineIndependent/Scan.h"
#include "../MachineIndependent/preprocessor/PpContext.h"
#include "../glslang/OSDependent/osinclude.h"
#include "../OSDependent/osinclude.h"
#include <algorithm>
#include <functional>
@ -814,7 +814,7 @@ TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc,
base->getAsSymbolNode()->getName().c_str(), "");
else
error(loc, " left of '[' is not of type array, matrix, or vector ", "expression", "");
} else if (base->getType().getQualifier().isFrontEndConstant() &&
} else if (base->getType().getQualifier().isFrontEndConstant() &&
index->getQualifier().isFrontEndConstant()) {
// both base and index are front-end constants
checkIndex(loc, base->getType(), indexValue);
@ -1848,7 +1848,7 @@ void HlslParseContext::handleEntryPointAttributes(const TSourceLoc& loc, const T
error(loc, "invalid partitioning", "", "");
} else {
TVertexSpacing partitioning = EvsNone;
if (partitionStr == "integer") {
partitioning = EvsEqual;
} else if (partitionStr == "fractional_even") {
@ -2484,7 +2484,7 @@ TIntermTyped* HlslParseContext::assignPosition(const TSourceLoc& loc, TOperator
TIntermTyped* rhsElement = intermediate.addIndex(EOpIndexDirect, tempSymR, index, loc);
const TType derefType(right->getType(), 0);
lhsElement->setType(derefType);
rhsElement->setType(derefType);
@ -2504,7 +2504,7 @@ TIntermTyped* HlslParseContext::assignPosition(const TSourceLoc& loc, TOperator
return assignList;
}
// Clip and cull distance require special handling due to a semantic mismatch. In HLSL,
// these can be float scalar, float vector, or arrays of float scalar or float vector.
// In SPIR-V, they are arrays of scalar floats in all cases. We must copy individual components
@ -2573,7 +2573,7 @@ TIntermAggregate* HlslParseContext::assignClipCullDistance(const TSourceLoc& loc
vecItems += (*semanticNSize)[x];
arrayLoc += (*semanticNSize)[x];
}
// It can have up to 2 array dimensions (in the case of geometry shader inputs)
const TArraySizes* const internalArraySizes = internalNode->getType().getArraySizes();
@ -2594,7 +2594,7 @@ TIntermAggregate* HlslParseContext::assignClipCullDistance(const TSourceLoc& loc
// into a float array, or vice versa. Here, we make the array the right size and type,
// which depends on the incoming data, which has several potential dimensions:
// * Semantic ID
// * vector size
// * vector size
// * array size
// Of those, semantic ID and array size cannot appear simultaneously.
//
@ -2655,7 +2655,7 @@ TIntermAggregate* HlslParseContext::assignClipCullDistance(const TSourceLoc& loc
// Holds individual component assignments as we make them.
TIntermTyped* clipCullAssign = nullptr;
// If the types are homomorphic, use a simple assign. No need to mess about with
// If the types are homomorphic, use a simple assign. No need to mess about with
// individual components.
if (clipCullSym->getType().isArray() == internalNode->getType().isArray() &&
clipCullInnerArraySize == internalInnerArraySize &&
@ -2766,7 +2766,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
if (binaryNode == nullptr)
return false;
return (binaryNode->getOp() == EOpIndexDirect || binaryNode->getOp() == EOpIndexIndirect) &&
return (binaryNode->getOp() == EOpIndexDirect || binaryNode->getOp() == EOpIndexIndirect) &&
wasSplit(binaryNode->getLeft());
};
@ -2798,7 +2798,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
const bool isFlattenLeft = wasFlattened(leftSymbol);
const bool isFlattenRight = wasFlattened(rightSymbol);
// OK to do a single assign if neither side is split or flattened. Otherwise,
// OK to do a single assign if neither side is split or flattened. Otherwise,
// fall through to a member-wise copy.
if (!isFlattenLeft && !isFlattenRight && !isSplitLeft && !isSplitRight) {
// Clip and cull distance requires more processing. See comment above assignClipCullDistance.
@ -3430,9 +3430,9 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte
// Byte address buffers index in bytes (only multiples of 4 permitted... not so much a byte address
// buffer then, but that's what it calls itself.
const bool isByteAddressBuffer = (builtInType == EbvByteAddressBuffer ||
const bool isByteAddressBuffer = (builtInType == EbvByteAddressBuffer ||
builtInType == EbvRWByteAddressBuffer);
if (isByteAddressBuffer)
argIndex = intermediate.addBinaryNode(EOpRightShift, argIndex,
@ -3447,7 +3447,7 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte
const TType derefType(argArray->getType(), 0);
node->setType(derefType);
}
break;
case EOpMethodLoad2:
@ -3573,8 +3573,8 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte
const TType indexType(argValue->getType(), 0);
rValue->setType(indexType);
}
TIntermTyped* assign = intermediate.addAssign(EOpAssign, lValue, rValue, loc);
TIntermTyped* assign = intermediate.addAssign(EOpAssign, lValue, rValue, loc);
body = intermediate.growAggregate(body, assign);
}
@ -3751,7 +3751,7 @@ TIntermConstantUnion* HlslParseContext::getSamplePosArray(int count)
}
TConstUnionArray* values = new TConstUnionArray(numSamples*2);
for (int pos=0; pos<count; ++pos) {
TConstUnion x, y;
x.setDConst(sampleLoc[pos].x);
@ -3785,7 +3785,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
result->setType(TType(node->getType().getBasicType(), EvqTemporary, node->getVectorSize()));
TIntermTyped* convertedResult = nullptr;
TType retType;
getTextureReturnType(sampler, retType);
@ -3811,7 +3811,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
for (unsigned m = 0; m < unsigned(retType.getStruct()->size()); ++m) {
const TType memberType(retType, m); // dereferenced type of the member we're about to assign.
// Check for bad struct members. This should have been caught upstream. Complain, because
// wwe don't know what to do with it. This algorithm could be generalized to handle
// other things, e.g, sub-structures, but HLSL doesn't allow them.
@ -3819,7 +3819,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
error(loc, "expected: scalar or vector type in texture structure", "", "");
return nullptr;
}
// Index into the struct variable to find the member to assign.
TIntermTyped* structMember = intermediate.addIndex(EOpIndexDirectStruct,
intermediate.addSymbol(*structVar, loc),
@ -3841,14 +3841,14 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
TIntermTyped* structVecComponent = intermediate.addIndex(EOpIndexDirect, structMember,
intermediate.addConstantUnion(component, loc), loc);
memberAssign = intermediate.addAssign(EOpAssign, structVecComponent, vec4Member, loc);
} else {
// Scalar member: we can assign to it directly.
memberAssign = intermediate.addAssign(EOpAssign, structMember, vec4Member, loc);
}
conversionAggregate->getSequence().push_back(memberAssign);
}
}
@ -3887,7 +3887,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
if (arguments->getAsTyped()->getBasicType() != EbtSampler)
return;
} else {
if (argAggregate->getSequence().size() == 0 ||
if (argAggregate->getSequence().size() == 0 ||
argAggregate->getSequence()[0] == nullptr ||
argAggregate->getSequence()[0]->getAsTyped()->getBasicType() != EbtSampler)
return;
@ -4584,13 +4584,13 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
int count = 0;
for (int val = 2; val <= 16; val *= 2)
idxtest[count++] =
intermediate.addBinaryNode(EOpEqual,
intermediate.addBinaryNode(EOpEqual,
intermediate.addSymbol(*outSampleCount, loc),
intermediate.addConstantUnion(val, loc),
loc, TType(EbtBool));
const TOperator idxOp = (argSampIdx->getQualifier().storage == EvqConst) ? EOpIndexDirect : EOpIndexIndirect;
// Create index ops into position arrays given sample index.
// TODO: should it be clamped?
TIntermTyped* index[4];
@ -4605,13 +4605,13 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
// (sampleCount == 4) ? pos4[idx] :
// (sampleCount == 8) ? pos8[idx] :
// (sampleCount == 16) ? pos16[idx] : float2(0,0);
TIntermTyped* test =
intermediate.addSelection(idxtest[0], index[0],
intermediate.addSelection(idxtest[1], index[1],
TIntermTyped* test =
intermediate.addSelection(idxtest[0], index[0],
intermediate.addSelection(idxtest[1], index[1],
intermediate.addSelection(idxtest[2], index[2],
intermediate.addSelection(idxtest[3], index[3],
intermediate.addSelection(idxtest[3], index[3],
getSamplePosArray(1), loc), loc), loc), loc);
compoundStatement = intermediate.growAggregate(compoundStatement, test);
compoundStatement->setOperator(EOpSequence);
compoundStatement->setLoc(loc);
@ -4624,7 +4624,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
case EOpSubpassLoad:
{
const TIntermTyped* argSubpass =
const TIntermTyped* argSubpass =
argAggregate ? argAggregate->getSequence()[0]->getAsTyped() :
arguments->getAsTyped();
@ -4639,7 +4639,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
break;
}
default:
break; // most pass through unchanged
@ -5159,7 +5159,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
for (int idx = 0; idx < vecSize; ++idx) {
TIntermTyped* idxConst = intermediate.addConstantUnion(idx, loc, true);
TIntermTyped* component = argValue->getType().isVector() ?
TIntermTyped* component = argValue->getType().isVector() ?
intermediate.addIndex(EOpIndexDirect, argValue, idxConst, loc) : argValue;
if (component != argValue)
@ -5171,7 +5171,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
unpackOp->setLoc(loc);
TIntermTyped* lowOrder = intermediate.addIndex(EOpIndexDirect, unpackOp, zero, loc);
if (result != nullptr) {
result->getSequence().push_back(lowOrder);
node = result;
@ -5179,7 +5179,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
node = lowOrder;
}
}
break;
}
@ -5210,7 +5210,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
for (int idx = 0; idx < vecSize; ++idx) {
TIntermTyped* idxConst = intermediate.addConstantUnion(idx, loc, true);
TIntermTyped* component = argValue->getType().isVector() ?
TIntermTyped* component = argValue->getType().isVector() ?
intermediate.addIndex(EOpIndexDirect, argValue, idxConst, loc) : argValue;
if (component != argValue)
@ -5221,7 +5221,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
vec2ComponentAndZero->getSequence().push_back(zero);
vec2ComponentAndZero->setType(TType(EbtFloat, EvqTemporary, 2));
vec2ComponentAndZero->setLoc(loc);
TIntermTyped* packOp = new TIntermUnary(EOpPackHalf2x16);
packOp->getAsUnaryNode()->setOperand(vec2ComponentAndZero);
packOp->setLoc(loc);
@ -5294,7 +5294,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
TIntermTyped* notinf = handleUnaryMath(loc, "!", EOpLogicalNot, isinf);
notinf->setType(boolType);
TIntermTyped* andNode = handleBinaryMath(loc, "and", EOpLogicalAnd, notnan, notinf);
andNode->setType(boolType);
@ -5678,7 +5678,7 @@ void HlslParseContext::addInputArgumentConversions(const TFunction& function, TI
// means take 'arguments' itself as the one argument.
TIntermTyped* arg = function.getParamCount() == 1
? arguments->getAsTyped()
: (aggregate ?
: (aggregate ?
aggregate->getSequence()[param]->getAsTyped() :
arguments->getAsTyped());
if (*function[param].type != arg->getType()) {
@ -5749,7 +5749,7 @@ void HlslParseContext::expandArguments(const TSourceLoc& loc, const TFunction& f
else if (args.size() > 1) {
if (function.getParamCount() + functionParamNumberOffset == 1) {
arguments = intermediate.makeAggregate(args.front());
std::for_each(args.begin() + 1, args.end(),
std::for_each(args.begin() + 1, args.end(),
[&](TIntermTyped* arg) {
arguments = intermediate.growAggregate(arguments, arg);
});
@ -5768,7 +5768,7 @@ void HlslParseContext::expandArguments(const TSourceLoc& loc, const TFunction& f
// means take 'arguments' itself as the one argument.
TIntermTyped* arg = function.getParamCount() == 1
? arguments->getAsTyped()
: (aggregate ?
: (aggregate ?
aggregate->getSequence()[param + functionParamNumberOffset]->getAsTyped() :
arguments->getAsTyped());
@ -8568,7 +8568,7 @@ TIntermTyped* HlslParseContext::convertArray(TIntermTyped* node, const TType& ty
// bump up to the next component to consume
const auto getNextComponent = [&]() {
TIntermTyped* component;
component = handleBracketDereference(node->getLoc(), constructee,
component = handleBracketDereference(node->getLoc(), constructee,
intermediate.addConstantUnion(constructeeElement, node->getLoc()));
if (component->isVector())
component = handleBracketDereference(node->getLoc(), component,
@ -9640,7 +9640,7 @@ bool HlslParseContext::setTextureReturnType(TSampler& sampler, const TType& retT
// Insert it in the vector that tracks struct return types.
sampler.structReturnIndex = unsigned(textureReturnStruct.size());
textureReturnStruct.push_back(members);
// Success!
return true;
}
@ -9688,7 +9688,7 @@ const TFunction* HlslParseContext::findPatchConstantFunction(const TSourceLoc& l
TVector<const TFunction*> candidateList;
bool builtIn;
symbolTable.findFunctionNameList(mangledName, candidateList, builtIn);
// We have to have one and only one, or we don't know which to pick: the patchconstantfunc does not
// allow any disambiguation of overloads.
if (candidateList.empty()) {
@ -9759,26 +9759,26 @@ void HlslParseContext::addPatchConstantInvocation()
return type.isSizedArray() && biType == EbvOutputPatch;
};
// We will perform these steps. Each is in a scoped block for separation: they could
// become separate functions to make addPatchConstantInvocation shorter.
//
//
// 1. Union the interfaces, and create built-ins for anything present in the PCF and
// declared as a built-in variable that isn't present in the entry point's signature.
//
// 2. Synthesizes a call to the patchconstfunction using built-in variables from either main,
// or the ones we created. Matching is based on built-in type. We may use synthesized
// variables from (1) above.
//
//
// 2B: Synthesize per control point invocations of wrapped entry point if the PCF requires them.
//
// 3. Create a return sequence: copy the return value (if any) from the PCF to a
// (non-sanitized) output variable. In case this may involve multiple copies, such as for
// an arrayed variable, a temporary copy of the PCF output is created to avoid multiple
// indirections into a complex R-value coming from the call to the PCF.
//
//
// 4. Create a barrier.
//
//
// 5/5B. Call the PCF inside an if test for (invocation id == 0).
TFunction* patchConstantFunctionPtr = const_cast<TFunction*>(findPatchConstantFunction(loc));
@ -9885,7 +9885,7 @@ void HlslParseContext::addPatchConstantInvocation()
} else {
// find which built-in it is
const TBuiltInVariable biType = patchConstantFunction[p].getDeclaredBuiltIn();
if (biType == EbvInputPatch && inputPatch == nullptr) {
error(loc, "unimplemented: PCF input patch without entry point input patch parameter", "", "");
return;
@ -9992,7 +9992,7 @@ void HlslParseContext::addPatchConstantInvocation()
element->setType(derefType);
element->setLoc(loc);
pcfCallSequence = intermediate.growAggregate(pcfCallSequence,
pcfCallSequence = intermediate.growAggregate(pcfCallSequence,
handleAssign(loc, EOpAssign, element, callReturn));
}
}
@ -10041,7 +10041,7 @@ void HlslParseContext::addPatchConstantInvocation()
pcfCallSequence = intermediate.growAggregate(pcfCallSequence, pcfCall);
}
// ================ Step 4: Barrier ================
// ================ Step 4: Barrier ================
TIntermTyped* barrier = new TIntermAggregate(EOpBarrier);
barrier->setLoc(loc);
barrier->setType(TType(EbtVoid));
@ -10113,7 +10113,7 @@ void HlslParseContext::finalizeAppendMethods()
// Patch append sequences, now that we know the stream output symbol.
for (auto append = gsAppends.begin(); append != gsAppends.end(); ++append) {
append->node->getSequence()[0] =
append->node->getSequence()[0] =
handleAssign(append->loc, EOpAssign,
intermediate.addSymbol(*gsStreamOutput, append->loc),
append->node->getSequence()[0]->getAsTyped());

View File

@ -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) { }

View File

@ -36,7 +36,7 @@
#ifndef _HLSLPARSEABLES_INCLUDED_
#define _HLSLPARSEABLES_INCLUDED_
#include "../glslang/MachineIndependent/Initialize.h"
#include "../MachineIndependent/Initialize.h"
namespace glslang {

View File

@ -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 {

View File

@ -41,7 +41,7 @@
#ifndef HLSLSCANCONTEXT_H_
#define HLSLSCANCONTEXT_H_
#include "../glslang/MachineIndependent/ParseHelper.h"
#include "../MachineIndependent/ParseHelper.h"
#include "hlslTokens.h"
namespace glslang {

View File

@ -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 */

View File

@ -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"

View File

@ -1,6 +1,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.

View File

@ -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.