GLSL: Disallow 'shared' in nested scopes.
This implements Khronos-private specification bug 16130.
This commit is contained in:
parent
c5f2ab965f
commit
dd56173d04
@ -1,2 +1,6 @@
|
|||||||
#version 450 core
|
#version 450 core
|
||||||
layout(local_size_x = 0) in; // ERROR, 0 not allowed
|
layout(local_size_x = 0) in; // ERROR, 0 not allowed
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
shared float f; // ERROR shared must be global
|
||||||
|
}
|
||||||
|
@ -1,20 +1,24 @@
|
|||||||
450.comp
|
450.comp
|
||||||
ERROR: 0:2: 'local_size_x' : must be at least 1
|
ERROR: 0:2: 'local_size_x' : must be at least 1
|
||||||
ERROR: 1 compilation errors. No code generated.
|
ERROR: 0:5: 'shared' : not allowed in nested scope
|
||||||
|
ERROR: 2 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 450
|
Shader version: 450
|
||||||
local_size = (1, 1, 1)
|
local_size = (1, 1, 1)
|
||||||
ERROR: node is still EOpNull!
|
ERROR: node is still EOpNull!
|
||||||
|
0:3 Function Definition: main( ( global void)
|
||||||
|
0:3 Function Parameters:
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
|
|
||||||
|
|
||||||
Linked compute stage:
|
Linked compute stage:
|
||||||
|
|
||||||
ERROR: Linking compute stage: Missing entry point: Each stage requires one entry point
|
|
||||||
|
|
||||||
Shader version: 450
|
Shader version: 450
|
||||||
local_size = (1, 1, 1)
|
local_size = (1, 1, 1)
|
||||||
ERROR: node is still EOpNull!
|
ERROR: node is still EOpNull!
|
||||||
|
0:3 Function Definition: main( ( global void)
|
||||||
|
0:3 Function Parameters:
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
|
|
||||||
|
@ -1231,6 +1231,7 @@ storage_qualifier
|
|||||||
$$.qualifier.storage = EvqBuffer;
|
$$.qualifier.storage = EvqBuffer;
|
||||||
}
|
}
|
||||||
| SHARED {
|
| SHARED {
|
||||||
|
parseContext.globalCheck($1.loc, "shared");
|
||||||
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
|
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
|
||||||
parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
|
parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
|
||||||
parseContext.requireStage($1.loc, EShLangCompute, "shared");
|
parseContext.requireStage($1.loc, EShLangCompute, "shared");
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user