Implement GL_EXT_null_initializer
Adds null initializer syntax (empty braces) Allows null initialization of shared variables
This commit is contained in:
parent
6abdde3ce5
commit
c739e03748
17 changed files with 2694 additions and 2355 deletions
|
|
@ -499,6 +499,7 @@ public:
|
|||
declaredBuiltIn = EbvNone;
|
||||
#ifndef GLSLANG_WEB
|
||||
noContraction = false;
|
||||
nullInit = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -512,6 +513,7 @@ public:
|
|||
clearMemory();
|
||||
specConstant = false;
|
||||
nonUniform = false;
|
||||
nullInit = false;
|
||||
clearLayout();
|
||||
}
|
||||
|
||||
|
|
@ -588,6 +590,8 @@ public:
|
|||
bool isNoContraction() const { return false; }
|
||||
void setNoContraction() { }
|
||||
bool isPervertexNV() const { return false; }
|
||||
void setNullInit() { }
|
||||
bool isNullInit() const { return false; }
|
||||
#else
|
||||
bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
|
||||
bool nopersp : 1;
|
||||
|
|
@ -609,6 +613,7 @@ public:
|
|||
bool subgroupcoherent : 1;
|
||||
bool shadercallcoherent : 1;
|
||||
bool nonprivate : 1;
|
||||
bool nullInit : 1;
|
||||
bool isWriteOnly() const { return writeonly; }
|
||||
bool isReadOnly() const { return readonly; }
|
||||
bool isRestrict() const { return restrict; }
|
||||
|
|
@ -644,6 +649,8 @@ public:
|
|||
bool isNoContraction() const { return noContraction; }
|
||||
void setNoContraction() { noContraction = true; }
|
||||
bool isPervertexNV() const { return pervertexNV; }
|
||||
void setNullInit() { nullInit = true; }
|
||||
bool isNullInit() const { return nullInit; }
|
||||
#endif
|
||||
|
||||
bool isPipeInput() const
|
||||
|
|
@ -2164,6 +2171,8 @@ public:
|
|||
appendStr(" specialization-constant");
|
||||
if (qualifier.nonUniform)
|
||||
appendStr(" nonuniform");
|
||||
if (qualifier.isNullInit())
|
||||
appendStr(" null-init");
|
||||
appendStr(" ");
|
||||
appendStr(getStorageQualifierString());
|
||||
if (isArray()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue