Web: Make switched methods all be non-virtual, more web-dependent code,
added a few more HLSL flag tests. This was mostly focused on the SPV generator. Saves about 17K.
This commit is contained in:
parent
d8834df992
commit
b9197c812e
19 changed files with 329 additions and 211 deletions
|
|
@ -527,7 +527,8 @@ __inline bool isTypeFloat(TBasicType type)
|
|||
}
|
||||
}
|
||||
|
||||
__inline int getTypeRank(TBasicType type) {
|
||||
__inline int getTypeRank(TBasicType type)
|
||||
{
|
||||
int res = -1;
|
||||
switch(type) {
|
||||
case EbtInt8:
|
||||
|
|
|
|||
|
|
@ -79,18 +79,27 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
bool ms : 1;
|
||||
bool image : 1; // image, combined should be false
|
||||
bool combined : 1; // true means texture is combined with a sampler, false means texture with no sampler
|
||||
bool sampler : 1; // true means a pure sampler, other fields should be clear()
|
||||
bool external : 1; // GL_OES_EGL_image_external
|
||||
bool yuv : 1; // GL_EXT_YUV_target
|
||||
#ifdef ENABLE_HLSL
|
||||
unsigned int vectorSize : 3; // vector return type size.
|
||||
|
||||
// Encapsulate getting members' vector sizes packed into the vectorSize bitfield.
|
||||
unsigned int getVectorSize() const { return vectorSize; }
|
||||
void clearReturnStruct() { structReturnIndex = noReturnStruct; }
|
||||
bool hasReturnStruct() const { return structReturnIndex != noReturnStruct; }
|
||||
unsigned getStructReturnIndex() const { return structReturnIndex; }
|
||||
|
||||
#ifdef GLSLANG_WEB
|
||||
static const unsigned structReturnIndexBits = 4; // number of index bits to use.
|
||||
static const unsigned structReturnSlots = (1<<structReturnIndexBits)-1; // number of valid values
|
||||
static const unsigned noReturnStruct = structReturnSlots; // value if no return struct type.
|
||||
|
||||
// Index into a language specific table of texture return structures.
|
||||
unsigned int structReturnIndex : structReturnIndexBits;
|
||||
#else
|
||||
unsigned int getVectorSize() const { return 4; }
|
||||
void clearReturnStruct() const { }
|
||||
bool hasReturnStruct() const { return false; }
|
||||
unsigned getStructReturnIndex() const { return 0; }
|
||||
#endif
|
||||
|
||||
#ifdef GLSLANG_WEB
|
||||
bool is1D() const { return false; }
|
||||
bool isBuffer() const { return false; }
|
||||
bool isRect() const { return false; }
|
||||
|
|
@ -105,18 +114,12 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
void setExternal(bool e) { }
|
||||
bool isYuv() const { return false; }
|
||||
#else
|
||||
bool sampler : 1; // true means a pure sampler, other fields should be clear()
|
||||
bool external : 1; // GL_OES_EGL_image_external
|
||||
bool yuv : 1; // GL_EXT_YUV_target
|
||||
// Some languages support structures as sample results. Storing the whole structure in the
|
||||
// TSampler is too large, so there is an index to a separate table.
|
||||
static const unsigned structReturnIndexBits = 4; // number of index bits to use.
|
||||
static const unsigned structReturnSlots = (1<<structReturnIndexBits)-1; // number of valid values
|
||||
static const unsigned noReturnStruct = structReturnSlots; // value if no return struct type.
|
||||
|
||||
// Index into a language specific table of texture return structures.
|
||||
unsigned int structReturnIndex : structReturnIndexBits;
|
||||
|
||||
void clearReturnStruct() { structReturnIndex = noReturnStruct; }
|
||||
bool hasReturnStruct() const { return structReturnIndex != noReturnStruct; }
|
||||
unsigned getStructReturnIndex() const { return structReturnIndex; }
|
||||
bool is1D() const { return dim == Esd1D; }
|
||||
bool isBuffer() const { return dim == EsdBuffer; }
|
||||
bool isRect() const { return dim == EsdRect; }
|
||||
|
|
@ -144,13 +147,17 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
ms = false;
|
||||
image = false;
|
||||
combined = false;
|
||||
#ifndef GLSLANG_WEB
|
||||
sampler = false;
|
||||
external = false;
|
||||
yuv = false;
|
||||
clearReturnStruct();
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_HLSL
|
||||
clearReturnStruct();
|
||||
// by default, returns a single vec4;
|
||||
vectorSize = 4;
|
||||
#endif
|
||||
}
|
||||
|
||||
// make a combined sampler and texture
|
||||
|
|
@ -188,6 +195,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
ms = m;
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
// make a subpass input attachment
|
||||
void setSubpass(TBasicType t, bool m = false)
|
||||
{
|
||||
|
|
@ -205,6 +213,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
sampler = true;
|
||||
shadow = s;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool operator==(const TSampler& right) const
|
||||
{
|
||||
|
|
@ -218,7 +227,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
isPureSampler() == right.isPureSampler() &&
|
||||
isExternal() == right.isExternal() &&
|
||||
isYuv() == right.isYuv() &&
|
||||
vectorSize == right.vectorSize &&
|
||||
getVectorSize() == right.getVectorSize() &&
|
||||
getStructReturnIndex() == right.getStructReturnIndex();
|
||||
}
|
||||
|
||||
|
|
@ -495,8 +504,10 @@ public:
|
|||
void clearInterstage()
|
||||
{
|
||||
clearInterpolation();
|
||||
#ifndef GLSLANG_WEB
|
||||
patch = false;
|
||||
sample = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void clearInterpolation()
|
||||
|
|
@ -552,17 +563,6 @@ public:
|
|||
bool centroid : 1;
|
||||
bool smooth : 1;
|
||||
bool flat : 1;
|
||||
#ifndef GLSLANG_WEB
|
||||
bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
|
||||
bool nopersp : 1;
|
||||
bool explicitInterp : 1;
|
||||
bool pervertexNV : 1;
|
||||
bool perPrimitiveNV : 1;
|
||||
bool perViewNV : 1;
|
||||
bool perTaskNV : 1;
|
||||
#endif
|
||||
bool patch : 1;
|
||||
bool sample : 1;
|
||||
bool coherent : 1;
|
||||
bool devicecoherent : 1;
|
||||
bool queuefamilycoherent : 1;
|
||||
|
|
@ -573,10 +573,12 @@ public:
|
|||
bool restrict : 1;
|
||||
bool readonly : 1;
|
||||
bool writeonly : 1;
|
||||
bool specConstant : 1; // having a constant_id is not sufficient: expressions have no id, but are still specConstant
|
||||
// having a constant_id is not sufficient: expressions have no id, but are still specConstant
|
||||
bool specConstant : 1;
|
||||
bool nonUniform : 1;
|
||||
|
||||
#ifdef GLSLANG_WEB
|
||||
bool isSample() const { return false; }
|
||||
bool isMemory() const { return false; }
|
||||
bool isMemoryQualifierImageAndSSBOOnly() const { return false; }
|
||||
bool bufferReferenceNeedsVulkanMemoryModel() const { return false; }
|
||||
|
|
@ -588,6 +590,16 @@ public:
|
|||
void setNoContraction() { }
|
||||
bool isPervertexNV() const { return false; }
|
||||
#else
|
||||
bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
|
||||
bool nopersp : 1;
|
||||
bool explicitInterp : 1;
|
||||
bool pervertexNV : 1;
|
||||
bool perPrimitiveNV : 1;
|
||||
bool perViewNV : 1;
|
||||
bool perTaskNV : 1;
|
||||
bool patch : 1;
|
||||
bool sample : 1;
|
||||
bool isSample() const { return sample; }
|
||||
bool isMemory() const
|
||||
{
|
||||
return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly || nonprivate;
|
||||
|
|
@ -1592,9 +1604,9 @@ public:
|
|||
virtual TIntermTyped* getOuterArrayNode() const { return arraySizes->getOuterNode(); }
|
||||
virtual int getCumulativeArraySize() const { return arraySizes->getCumulativeSize(); }
|
||||
#ifdef GLSLANG_WEB
|
||||
virtual bool isArrayOfArrays() const { return false; }
|
||||
bool isArrayOfArrays() const { return false; }
|
||||
#else
|
||||
virtual bool isArrayOfArrays() const { return arraySizes != nullptr && arraySizes->getNumDims() > 1; }
|
||||
bool isArrayOfArrays() const { return arraySizes != nullptr && arraySizes->getNumDims() > 1; }
|
||||
#endif
|
||||
virtual int getImplicitArraySize() const { return arraySizes->getImplicitSize(); }
|
||||
virtual const TArraySizes* getArraySizes() const { return arraySizes; }
|
||||
|
|
@ -1646,11 +1658,11 @@ public:
|
|||
virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); }
|
||||
virtual bool isParameterized() const { return typeParameters != nullptr; }
|
||||
#ifdef GLSLANG_WEB
|
||||
virtual bool isCoopMat() const { return false; }
|
||||
virtual bool isReference() const { return false; }
|
||||
bool isCoopMat() const { return false; }
|
||||
bool isReference() const { return false; }
|
||||
#else
|
||||
virtual bool isCoopMat() const { return coopmat; }
|
||||
virtual bool isReference() const { return getBasicType() == EbtReference; }
|
||||
bool isCoopMat() const { return coopmat; }
|
||||
bool isReference() const { return getBasicType() == EbtReference; }
|
||||
#endif
|
||||
|
||||
// return true if this type contains any subtype which satisfies the given predicate.
|
||||
|
|
@ -1733,39 +1745,39 @@ public:
|
|||
}
|
||||
|
||||
#ifdef GLSLANG_WEB
|
||||
virtual bool containsDouble() const { return false; }
|
||||
virtual bool contains16BitFloat() const { return false; }
|
||||
virtual bool contains64BitInt() const { return false; }
|
||||
virtual bool contains16BitInt() const { return false; }
|
||||
virtual bool contains8BitInt() const { return false; }
|
||||
virtual bool containsCoopMat() const { return false; }
|
||||
virtual bool containsReference() const { return false; }
|
||||
bool containsDouble() const { return false; }
|
||||
bool contains16BitFloat() const { return false; }
|
||||
bool contains64BitInt() const { return false; }
|
||||
bool contains16BitInt() const { return false; }
|
||||
bool contains8BitInt() const { return false; }
|
||||
bool containsCoopMat() const { return false; }
|
||||
bool containsReference() const { return false; }
|
||||
#else
|
||||
virtual bool containsDouble() const
|
||||
bool containsDouble() const
|
||||
{
|
||||
return containsBasicType(EbtDouble);
|
||||
}
|
||||
virtual bool contains16BitFloat() const
|
||||
bool contains16BitFloat() const
|
||||
{
|
||||
return containsBasicType(EbtFloat16);
|
||||
}
|
||||
virtual bool contains64BitInt() const
|
||||
bool contains64BitInt() const
|
||||
{
|
||||
return containsBasicType(EbtInt64) || containsBasicType(EbtUint64);
|
||||
}
|
||||
virtual bool contains16BitInt() const
|
||||
bool contains16BitInt() const
|
||||
{
|
||||
return containsBasicType(EbtInt16) || containsBasicType(EbtUint16);
|
||||
}
|
||||
virtual bool contains8BitInt() const
|
||||
bool contains8BitInt() const
|
||||
{
|
||||
return containsBasicType(EbtInt8) || containsBasicType(EbtUint8);
|
||||
}
|
||||
virtual bool containsCoopMat() const
|
||||
bool containsCoopMat() const
|
||||
{
|
||||
return contains([](const TType* t) { return t->coopmat; } );
|
||||
}
|
||||
virtual bool containsReference() const
|
||||
bool containsReference() const
|
||||
{
|
||||
return containsBasicType(EbtReference);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1354,10 +1354,6 @@ public:
|
|||
case EOpTexture:
|
||||
case EOpSparseTexture:
|
||||
break;
|
||||
case EOpTextureClamp:
|
||||
case EOpSparseTextureClamp:
|
||||
cracked.lodClamp = true;
|
||||
break;
|
||||
case EOpTextureProj:
|
||||
cracked.proj = true;
|
||||
break;
|
||||
|
|
@ -1369,11 +1365,6 @@ public:
|
|||
case EOpSparseTextureOffset:
|
||||
cracked.offset = true;
|
||||
break;
|
||||
case EOpTextureOffsetClamp:
|
||||
case EOpSparseTextureOffsetClamp:
|
||||
cracked.offset = true;
|
||||
cracked.lodClamp = true;
|
||||
break;
|
||||
case EOpTextureFetch:
|
||||
case EOpSparseTextureFetch:
|
||||
cracked.fetch = true;
|
||||
|
|
@ -1409,11 +1400,6 @@ public:
|
|||
case EOpSparseTextureGrad:
|
||||
cracked.grad = true;
|
||||
break;
|
||||
case EOpTextureGradClamp:
|
||||
case EOpSparseTextureGradClamp:
|
||||
cracked.grad = true;
|
||||
cracked.lodClamp = true;
|
||||
break;
|
||||
case EOpTextureGradOffset:
|
||||
case EOpSparseTextureGradOffset:
|
||||
cracked.grad = true;
|
||||
|
|
@ -1428,6 +1414,21 @@ public:
|
|||
cracked.offset = true;
|
||||
cracked.proj = true;
|
||||
break;
|
||||
#ifndef GLSLANG_WEB
|
||||
case EOpTextureClamp:
|
||||
case EOpSparseTextureClamp:
|
||||
cracked.lodClamp = true;
|
||||
break;
|
||||
case EOpTextureOffsetClamp:
|
||||
case EOpSparseTextureOffsetClamp:
|
||||
cracked.offset = true;
|
||||
cracked.lodClamp = true;
|
||||
break;
|
||||
case EOpTextureGradClamp:
|
||||
case EOpSparseTextureGradClamp:
|
||||
cracked.grad = true;
|
||||
cracked.lodClamp = true;
|
||||
break;
|
||||
case EOpTextureGradOffsetClamp:
|
||||
case EOpSparseTextureGradOffsetClamp:
|
||||
cracked.grad = true;
|
||||
|
|
@ -1497,6 +1498,7 @@ public:
|
|||
case EOpSubpassLoadMS:
|
||||
cracked.subpass = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,13 +153,13 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
|||
case EvqConst: message = "can't modify a const"; break;
|
||||
case EvqConstReadOnly: message = "can't modify a const"; break;
|
||||
case EvqUniform: message = "can't modify a uniform"; break;
|
||||
#ifndef GLSLANG_WEB
|
||||
case EvqBuffer:
|
||||
if (node->getQualifier().readonly)
|
||||
message = "can't modify a readonly buffer";
|
||||
if (node->getQualifier().isShaderRecordNV())
|
||||
message = "can't modify a shaderrecordnv qualified buffer";
|
||||
break;
|
||||
#ifndef GLSLANG_WEB
|
||||
case EvqHitAttrNV:
|
||||
if (language != EShLangIntersectNV)
|
||||
message = "cannot modify hitAttributeNV in this stage";
|
||||
|
|
|
|||
|
|
@ -1147,6 +1147,7 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
|
|||
error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", "");
|
||||
}
|
||||
TQualifier& argQualifier = arg->getAsTyped()->getQualifier();
|
||||
#ifndef GLSLANG_WEB
|
||||
if (argQualifier.isMemory()) {
|
||||
const char* message = "argument cannot drop memory qualifier when passed to formal parameter";
|
||||
if (argQualifier.volatil && ! formalQualifier.volatil)
|
||||
|
|
@ -1176,7 +1177,7 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
|
|||
argQualifier.getFormat() != ElfNone))
|
||||
error(arguments->getLoc(), "image formats must match", "format", "");
|
||||
}
|
||||
|
||||
#endif
|
||||
if (builtIn && arg->getAsTyped()->getType().contains16BitFloat())
|
||||
requireFloat16Arithmetic(arguments->getLoc(), "built-in function", "float16 types can only be in uniform block or buffer storage");
|
||||
if (builtIn && arg->getAsTyped()->getType().contains16BitInt())
|
||||
|
|
@ -7507,7 +7508,7 @@ void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier&
|
|||
error(loc, "cannot use interpolation qualifiers on an interface block", "flat/smooth/noperspective", "");
|
||||
if (qualifier.centroid)
|
||||
error(loc, "cannot use centroid qualifier on an interface block", "centroid", "");
|
||||
if (qualifier.sample)
|
||||
if (qualifier.isSample())
|
||||
error(loc, "cannot use sample qualifier on an interface block", "sample", "");
|
||||
if (qualifier.invariant)
|
||||
error(loc, "cannot use invariant qualifier on an interface block", "invariant", "");
|
||||
|
|
|
|||
|
|
@ -538,13 +538,14 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
|||
if (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid ||
|
||||
symbol.getQualifier().smooth != unitSymbol.getQualifier().smooth ||
|
||||
symbol.getQualifier().flat != unitSymbol.getQualifier().flat ||
|
||||
symbol.getQualifier().sample != unitSymbol.getQualifier().sample ||
|
||||
symbol.getQualifier().patch != unitSymbol.getQualifier().patch ||
|
||||
symbol.getQualifier().isSample()!= unitSymbol.getQualifier().isSample() ||
|
||||
symbol.getQualifier().isPatch() != unitSymbol.getQualifier().isPatch() ||
|
||||
symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective()) {
|
||||
error(infoSink, "Interpolation and auxiliary storage qualifiers must match:");
|
||||
writeTypeComparison = true;
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
// Memory...
|
||||
if (symbol.getQualifier().coherent != unitSymbol.getQualifier().coherent ||
|
||||
symbol.getQualifier().devicecoherent != unitSymbol.getQualifier().devicecoherent ||
|
||||
|
|
@ -559,6 +560,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
|||
error(infoSink, "Memory qualifiers must match:");
|
||||
writeTypeComparison = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Layouts...
|
||||
// TODO: 4.4 enhanced layouts: Generalize to include offset/align: current spec
|
||||
|
|
@ -608,9 +610,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
|
|||
warn(infoSink, "Entry point not found");
|
||||
}
|
||||
|
||||
if (getNumPushConstants() > 1)
|
||||
error(infoSink, "Only one push_constant block is allowed per stage");
|
||||
|
||||
// recursion and missing body checking
|
||||
checkCallGraphCycles(infoSink);
|
||||
checkCallGraphBodies(infoSink, keepUncalled);
|
||||
|
|
@ -619,6 +618,9 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
|
|||
inOutLocationCheck(infoSink);
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if (getNumPushConstants() > 1)
|
||||
error(infoSink, "Only one push_constant block is allowed per stage");
|
||||
|
||||
// invocations
|
||||
if (invocations == TQualifier::layoutNotSet)
|
||||
invocations = 1;
|
||||
|
|
|
|||
|
|
@ -481,6 +481,8 @@ public:
|
|||
bool usingVulkanMemoryModel() const { return false; }
|
||||
bool usingPhysicalStorageBuffer() const { return false; }
|
||||
bool usingVariablePointers() const { return false; }
|
||||
unsigned getXfbStride(int buffer) const { return 0; }
|
||||
bool hasLayoutDerivativeModeNone() const { return false; }
|
||||
#else
|
||||
void output(TInfoSink&, bool tree);
|
||||
|
||||
|
|
@ -544,6 +546,7 @@ public:
|
|||
}
|
||||
bool getAutoMapLocations() const { return autoMapLocations; }
|
||||
|
||||
#ifdef ENABLE_HLSL
|
||||
void setFlattenUniformArrays(bool flatten)
|
||||
{
|
||||
flattenUniformArrays = flatten;
|
||||
|
|
@ -551,6 +554,7 @@ public:
|
|||
processes.addProcess("flatten-uniform-arrays");
|
||||
}
|
||||
bool getFlattenUniformArrays() const { return flattenUniformArrays; }
|
||||
#endif
|
||||
void setNoStorageFormat(bool b)
|
||||
{
|
||||
useUnknownFormat = b;
|
||||
|
|
@ -576,12 +580,14 @@ public:
|
|||
}
|
||||
bool usingVariablePointers() const { return useVariablePointers; }
|
||||
|
||||
#ifdef ENABLE_HLSL
|
||||
template<class T> T addCounterBufferName(const T& name) const { return name + implicitCounterName; }
|
||||
bool hasCounterBufferName(const TString& name) const {
|
||||
size_t len = strlen(implicitCounterName);
|
||||
return name.size() > len &&
|
||||
name.compare(name.size() - len, len, implicitCounterName) == 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { textureSamplerTransformMode = mode; }
|
||||
int getNumPushConstants() const { return numPushConstants; }
|
||||
|
|
@ -703,6 +709,7 @@ public:
|
|||
void setGeoPassthroughEXT() { geoPassthroughEXT = true; }
|
||||
bool getGeoPassthroughEXT() const { return geoPassthroughEXT; }
|
||||
void setLayoutDerivativeMode(ComputeDerivativeMode mode) { computeDerivativeMode = mode; }
|
||||
bool hasLayoutDerivativeModeNone() const { return computeDerivativeMode != LayoutDerivativeNone; }
|
||||
ComputeDerivativeMode getLayoutDerivativeModeNone() const { return computeDerivativeMode; }
|
||||
bool setPrimitives(int m)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -68,30 +68,30 @@ public:
|
|||
virtual void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc);
|
||||
#ifdef GLSLANG_WEB
|
||||
bool isEsProfile() const { return true; }
|
||||
virtual void initializeExtensionBehavior() { }
|
||||
virtual void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc) { }
|
||||
virtual void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc) { }
|
||||
virtual void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[],
|
||||
void initializeExtensionBehavior() { }
|
||||
void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc) { }
|
||||
void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc) { }
|
||||
void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[],
|
||||
const char* featureDesc) { }
|
||||
virtual void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[],
|
||||
void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[],
|
||||
const char* featureDesc) { }
|
||||
virtual TExtensionBehavior getExtensionBehavior(const char*) { return EBhMissing; }
|
||||
virtual bool extensionTurnedOn(const char* const extension) { return false; }
|
||||
virtual bool extensionsTurnedOn(int numExtensions, const char* const extensions[]) { return false; }
|
||||
virtual void updateExtensionBehavior(int line, const char* const extension, const char* behavior) { }
|
||||
virtual void updateExtensionBehavior(const char* const extension, TExtensionBehavior) { }
|
||||
virtual void checkExtensionStage(const TSourceLoc&, const char* const extension) { }
|
||||
virtual void fullIntegerCheck(const TSourceLoc&, const char* op) { }
|
||||
virtual void doubleCheck(const TSourceLoc&, const char* op) { }
|
||||
virtual bool float16Arithmetic() { return false; }
|
||||
virtual void requireFloat16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
|
||||
virtual bool int16Arithmetic() { return false; }
|
||||
virtual void requireInt16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
|
||||
virtual bool int8Arithmetic() { return false; }
|
||||
virtual void requireInt8Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
|
||||
virtual void int64Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
|
||||
virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
|
||||
virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
|
||||
TExtensionBehavior getExtensionBehavior(const char*) { return EBhMissing; }
|
||||
bool extensionTurnedOn(const char* const extension) { return false; }
|
||||
bool extensionsTurnedOn(int numExtensions, const char* const extensions[]) { return false; }
|
||||
void updateExtensionBehavior(int line, const char* const extension, const char* behavior) { }
|
||||
void updateExtensionBehavior(const char* const extension, TExtensionBehavior) { }
|
||||
void checkExtensionStage(const TSourceLoc&, const char* const extension) { }
|
||||
void fullIntegerCheck(const TSourceLoc&, const char* op) { }
|
||||
void doubleCheck(const TSourceLoc&, const char* op) { }
|
||||
bool float16Arithmetic() { return false; }
|
||||
void requireFloat16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
|
||||
bool int16Arithmetic() { return false; }
|
||||
void requireInt16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
|
||||
bool int8Arithmetic() { return false; }
|
||||
void requireInt8Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
|
||||
void int64Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
|
||||
void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
|
||||
void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
|
||||
#else
|
||||
bool isEsProfile() const { return profile == EEsProfile; }
|
||||
virtual void initializeExtensionBehavior();
|
||||
|
|
|
|||
|
|
@ -1085,6 +1085,7 @@ void TReflection::buildAttributeReflection(EShLanguage stage, const TIntermediat
|
|||
// build counter block index associations for buffers
|
||||
void TReflection::buildCounterIndices(const TIntermediate& intermediate)
|
||||
{
|
||||
#ifdef ENABLE_HLSL
|
||||
// search for ones that have counters
|
||||
for (int i = 0; i < int(indexToUniformBlock.size()); ++i) {
|
||||
const TString counterName(intermediate.addCounterBufferName(indexToUniformBlock[i].name).c_str());
|
||||
|
|
@ -1093,6 +1094,7 @@ void TReflection::buildCounterIndices(const TIntermediate& intermediate)
|
|||
if (index >= 0)
|
||||
indexToUniformBlock[i].counterIndex = index;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// build Shader Stages mask for all uniforms
|
||||
|
|
|
|||
|
|
@ -434,8 +434,8 @@ public:
|
|||
void setInvertY(bool invert);
|
||||
#ifdef ENABLE_HLSL
|
||||
void setHlslIoMapping(bool hlslIoMap);
|
||||
#endif
|
||||
void setFlattenUniformArrays(bool flatten);
|
||||
#endif
|
||||
void setNoStorageFormat(bool useUnknownFormat);
|
||||
void setNanMinMaxClamp(bool nanMinMaxClamp);
|
||||
void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue