Web: Reclaim more space and make all work w/wo GLSLANG_WEB.

This commit is contained in:
John Kessenich 2019-10-21 06:55:11 -06:00
parent e5eee8fb03
commit f8d1d7442b
13 changed files with 8983 additions and 2103 deletions

View file

@ -147,6 +147,7 @@ struct TOffsetRange {
TRange offset;
};
#ifndef GLSLANG_WEB
// Things that need to be tracked per xfb buffer.
struct TXfbBuffer {
TXfbBuffer() : stride(TQualifier::layoutXfbStrideEnd), implicitStride(0), contains64BitType(false),
@ -158,6 +159,7 @@ struct TXfbBuffer {
bool contains32BitType;
bool contains16BitType;
};
#endif
// Track a set of strings describing how the module was processed.
// Using the form:
@ -465,7 +467,23 @@ public:
bool usingStorageBuffer() const { return useStorageBuffer; }
void setDepthReplacing() { depthReplacing = true; }
bool isDepthReplacing() const { return depthReplacing; }
bool setLocalSize(int dim, int size)
{
if (localSizeNotDefault[dim])
return size == localSize[dim];
localSizeNotDefault[dim] = true;
localSize[dim] = size;
return true;
}
unsigned int getLocalSize(int dim) const { return localSize[dim]; }
bool setLocalSizeSpecId(int dim, int id)
{
if (localSizeSpecId[dim] != TQualifier::layoutNotSet)
return id == localSizeSpecId[dim];
localSizeSpecId[dim] = id;
return true;
}
int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; }
#ifdef GLSLANG_WEB
void output(TInfoSink&, bool tree) { }
@ -492,23 +510,7 @@ public:
bool usingVariablePointers() const { return false; }
unsigned getXfbStride(int buffer) const { return 0; }
bool hasLayoutDerivativeModeNone() const { return false; }
bool setLocalSize(int dim, int size)
{
if (localSizeNotDefault[dim])
return size == localSize[dim];
localSizeNotDefault[dim] = true;
localSize[dim] = size;
return true;
}
unsigned int getLocalSize(int dim) const { return localSize[dim]; }
bool setLocalSizeSpecId(int dim, int id)
{
if (localSizeSpecId[dim] != TQualifier::layoutNotSet)
return id == localSizeSpecId[dim];
localSizeSpecId[dim] = id;
return true;
}
int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; }
ComputeDerivativeMode getLayoutDerivativeModeNone() const { return LayoutDerivativeNone; }
#else
void output(TInfoSink&, bool tree);
@ -756,7 +758,7 @@ public:
void setBinaryDoubleOutput() { binaryDoubleOutput = true; }
bool getBinaryDoubleOutput() { return binaryDoubleOutput; }
#endif
#endif // GLSLANG_WEB
#ifdef ENABLE_HLSL
void setHlslFunctionality1() { hlslFunctionality1 = true; }