mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-23 19:29:44 +00:00
c739e03748
Adds null initializer syntax (empty braces) Allows null initialization of shared variables
33 lines
395 B
Plaintext
33 lines
395 B
Plaintext
#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
|