diff options
author | John Kessenich <cepheus@frii.com> | 2020-06-11 08:30:03 -0600 |
---|---|---|
committer | Alan Baker <alanbaker@google.com> | 2021-01-25 15:54:52 -0500 |
commit | c739e0374861adb9bd9583ff4ab3782a42d8ed86 (patch) | |
tree | 9fb5f1cbd750278afcce579dde6f748a48f47b83 /glslang/Include/Types.h | |
parent | 6abdde3ce5119e8ca3dd4e5351aa3a70f25bb689 (diff) | |
download | glslang-c739e0374861adb9bd9583ff4ab3782a42d8ed86.tar.gz |
Implement GL_EXT_null_initializer
Adds null initializer syntax (empty braces)
Allows null initialization of shared variables
Diffstat (limited to 'glslang/Include/Types.h')
-rw-r--r-- | glslang/Include/Types.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index 696daf6d..603203db 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -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()) { |