forked from KhronosGroup/glslang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement GL_EXT_terminate_invocation (KhronosGroup#2454)
* Implement GL_EXT_terminate_invocation. * terminateInvocation: declare the SPV extension * Update test results for spirv-tools and bison version bumps Co-authored-by: John Kessenich <cepheus@frii.com>
- Loading branch information
1 parent
383eaf3
commit 74e8f05
Showing
26 changed files
with
6,176 additions
and
5,799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
spv.terminate.frag | ||
// Module Version 10000 | ||
// Generated by (magic number): 8000a | ||
// Id's are bound by 7 | ||
|
||
Capability Shader | ||
Extension "SPV_KHR_terminate_invocation" | ||
1: ExtInstImport "GLSL.std.450" | ||
MemoryModel Logical GLSL450 | ||
EntryPoint Fragment 4 "main" | ||
ExecutionMode 4 OriginUpperLeft | ||
Source GLSL 400 | ||
SourceExtension "GL_EXT_terminate_invocation" | ||
Name 4 "main" | ||
2: TypeVoid | ||
3: TypeFunction 2 | ||
4(main): 2 Function None 3 | ||
5: Label | ||
TerminateInvocation | ||
FunctionEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
terminate.frag | ||
ERROR: 0:3: 'terminateInvocation' : undeclared identifier | ||
ERROR: 0:9: '' : syntax error, unexpected TERMINATE_INVOCATION, expecting COMMA or SEMICOLON | ||
ERROR: 2 compilation errors. No code generated. | ||
|
||
|
||
Shader version: 400 | ||
Requested GL_EXT_terminate_invocation | ||
ERROR: node is still EOpNull! | ||
0:3 Function Definition: foo( ( global void) | ||
0:3 Function Parameters: | ||
0:3 Sequence | ||
0:3 'terminateInvocation' ( temp float) | ||
0:? Linker Objects | ||
|
||
|
||
Linked fragment stage: | ||
|
||
|
||
Shader version: 400 | ||
Requested GL_EXT_terminate_invocation | ||
ERROR: node is still EOpNull! | ||
0:? Linker Objects | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
terminate.vert | ||
ERROR: 0:3: 'terminateInvocation' : undeclared identifier | ||
ERROR: 0:9: 'terminateInvocation' : not supported in this stage: vertex | ||
ERROR: 2 compilation errors. No code generated. | ||
|
||
|
||
Shader version: 400 | ||
Requested GL_EXT_terminate_invocation | ||
ERROR: node is still EOpNull! | ||
0:3 Function Definition: foo( ( global void) | ||
0:3 Function Parameters: | ||
0:3 Sequence | ||
0:3 'terminateInvocation' ( temp float) | ||
0:7 Function Definition: main( ( global void) | ||
0:7 Function Parameters: | ||
0:9 Sequence | ||
0:9 Branch: TerminateInvocation | ||
0:? Linker Objects | ||
0:? 'gl_VertexID' ( gl_VertexId int VertexId) | ||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) | ||
|
||
|
||
Linked vertex stage: | ||
|
||
|
||
Shader version: 400 | ||
Requested GL_EXT_terminate_invocation | ||
ERROR: node is still EOpNull! | ||
0:7 Function Definition: main( ( global void) | ||
0:7 Function Parameters: | ||
0:9 Sequence | ||
0:9 Branch: TerminateInvocation | ||
0:? Linker Objects | ||
0:? 'gl_VertexID' ( gl_VertexId int VertexId) | ||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#version 400 | ||
|
||
#extension GL_EXT_terminate_invocation : enable | ||
|
||
void main() | ||
{ | ||
terminateInvocation; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#version 400 | ||
|
||
void foo() { terminateInvocation; } // ERROR: identifier undeclared | ||
|
||
#extension GL_EXT_terminate_invocation : enable | ||
|
||
void main() | ||
{ | ||
int terminateInvocation; // syntax ERROR | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#version 400 | ||
|
||
void foo() { terminateInvocation; } // ERROR: identifier undeclared | ||
|
||
#extension GL_EXT_terminate_invocation : enable | ||
|
||
void main() | ||
{ | ||
terminateInvocation; // ERROR: wrong stage | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.