Web: Generalize _EXTENSIONS* in SPIR-V back-end.
About 50 fewer #ifdefs. About 14K smaller. Note, the base size is ill-defined due to optimizer settings (size vs. performance), compression, and target architecture. Some recent %'s are accidentally reported as 3X the real savings. Early %'s were accurate. What matters though is that each step got worthwhile gains, and what the final size ends up being.
This commit is contained in:
parent
b6d3ee5aca
commit
a28f7a75d1
11 changed files with 1188 additions and 1312 deletions
|
|
@ -1299,10 +1299,17 @@ public:
|
|||
bool isConstructor() const;
|
||||
bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; }
|
||||
bool isSampling() const { return op > EOpSamplingGuardBegin && op < EOpSamplingGuardEnd; }
|
||||
#ifdef GLSLANG_WEB
|
||||
bool isImage() const { return false; }
|
||||
bool isSparseTexture() const { return false; }
|
||||
bool isImageFootprint() const { return false; }
|
||||
bool isSparseImage() const { return false; }
|
||||
#else
|
||||
bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; }
|
||||
bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; }
|
||||
bool isImageFootprint() const { return op > EOpImageFootprintGuardBegin && op < EOpImageFootprintGuardEnd; }
|
||||
bool isSparseImage() const { return op == EOpSparseImageLoad; }
|
||||
#endif
|
||||
|
||||
void setOperationPrecision(TPrecisionQualifier p) { operationPrecision = p; }
|
||||
TPrecisionQualifier getOperationPrecision() const { return operationPrecision != EpqNone ?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue