Skip to content
Snippets Groups Projects
Commit dd56173d authored by John Kessenich's avatar John Kessenich
Browse files

GLSL: Disallow 'shared' in nested scopes.

This implements Khronos-private specification bug 16130.
parent c5f2ab96
No related branches found
No related tags found
No related merge requests found
#version 450 core
layout(local_size_x = 0) in; // ERROR, 0 not allowed
\ No newline at end of file
layout(local_size_x = 0) in; // ERROR, 0 not allowed
void main()
{
shared float f; // ERROR shared must be global
}
450.comp
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
local_size = (1, 1, 1)
ERROR: node is still EOpNull!
0:3 Function Definition: main( ( global void)
0:3 Function Parameters:
0:? Linker Objects
Linked compute stage:
ERROR: Linking compute stage: Missing entry point: Each stage requires one entry point
Shader version: 450
local_size = (1, 1, 1)
ERROR: node is still EOpNull!
0:3 Function Definition: main( ( global void)
0:3 Function Parameters:
0:? Linker Objects
......@@ -1231,6 +1231,7 @@ storage_qualifier
$$.qualifier.storage = EvqBuffer;
}
| SHARED {
parseContext.globalCheck($1.loc, "shared");
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
parseContext.requireStage($1.loc, EShLangCompute, "shared");
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment