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

View File

@@ -7,6 +7,27 @@ layout(local_size_z_id = 14) in; // ERROR, can't change this
void main()
{
gl_WorkGroupSize;
int i = { }; // ERROR, need an extension
}
layout(local_size_y_id = 19) in; // ERROR, already used: TODO not yet reported
shared float f = { }; // ERROR, need an extension
float g = { }; // ERROR, need an extension
#extension GL_EXT_null_initializer : enable
shared float f2 = { };
float g2 = { };
void foo()
{
int i = { };
float fa[] = { };
}
struct samp {
sampler2D s2D;
} sampVar = { };
atomic_uint a = { };