Implement GL_EXT_null_initializer

Adds null initializer syntax (empty braces)
Allows null initialization of shared variables
This commit is contained in:
John Kessenich
2020-06-11 08:30:03 -06:00
committed by Alan Baker
parent 6abdde3ce5
commit c739e03748
17 changed files with 2694 additions and 2355 deletions

32
Test/spv.nullInit.comp Normal file
View File

@@ -0,0 +1,32 @@
#version 460
#extension GL_EXT_null_initializer : enable
#ifdef GL_EXT_null_initializer
struct S {
vec3[4] v;
int a;
};
struct T {
int b;
S s;
};
shared float f = { };
shared T t1 = { };
shared T t2 = { };
shared S s = { };
shared float g = { };
shared int i = { };
void main()
{
S local = { };
++local.a;
}
S global = { };
#endif