GLSL 4.6: Implement shader group vote.

This commit is contained in:
John Kessenich
2017-07-23 23:31:44 -06:00
parent 941f3bbd7a
commit 934d11b6db
10 changed files with 142 additions and 10 deletions

View File

@@ -15,8 +15,11 @@ ERROR: 0:41: 'gl_BaseVertex' : undeclared identifier
ERROR: 0:41: 'gl_BaseInstance' : undeclared identifier
ERROR: 0:41: 'gl_DrawID' : undeclared identifier
ERROR: 0:41: '=' : cannot convert from ' temp float' to ' temp int'
ERROR: 0:43: 'extraneous semicolon' : not supported for this version or the enabled extensions
ERROR: 17 compilation errors. No code generated.
ERROR: 0:44: 'anyInvocation' : no matching overloaded function found
ERROR: 0:45: 'allInvocations' : no matching overloaded function found
ERROR: 0:46: 'allInvocationsEqual' : no matching overloaded function found
ERROR: 0:48: 'extraneous semicolon' : not supported for this version or the enabled extensions
ERROR: 20 compilation errors. No code generated.
Shader version: 450
@@ -55,6 +58,12 @@ ERROR: node is still EOpNull!
0:38 0.000000
0:39 Constant:
0:39 0.000000
0:44 Constant:
0:44 0.000000
0:45 Constant:
0:45 0.000000
0:46 Constant:
0:46 0.000000
0:? Linker Objects
0:? 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance})
0:? 'outb' ( smooth out bool)

View File

@@ -9,6 +9,18 @@ Shader version: 460
0:12 's' ( smooth in structure{ global float f, global 4-component vector of float v})
0:12 Constant:
0:12 1 (const int)
0:14 move second child to first child ( temp bool)
0:14 'b1' ( temp bool)
0:14 anyInvocation ( global bool)
0:14 'b1' ( temp bool)
0:15 move second child to first child ( temp bool)
0:15 'b1' ( temp bool)
0:15 allInvocations ( global bool)
0:15 'b1' ( temp bool)
0:16 move second child to first child ( temp bool)
0:16 'b1' ( temp bool)
0:16 allInvocationsEqual ( global bool)
0:16 'b1' ( temp bool)
0:? Linker Objects
0:? 's' ( smooth in structure{ global float f, global 4-component vector of float v})
@@ -26,6 +38,18 @@ Shader version: 460
0:12 's' ( smooth in structure{ global float f, global 4-component vector of float v})
0:12 Constant:
0:12 1 (const int)
0:14 move second child to first child ( temp bool)
0:14 'b1' ( temp bool)
0:14 anyInvocation ( global bool)
0:14 'b1' ( temp bool)
0:15 move second child to first child ( temp bool)
0:15 'b1' ( temp bool)
0:15 allInvocations ( global bool)
0:15 'b1' ( temp bool)
0:16 move second child to first child ( temp bool)
0:16 'b1' ( temp bool)
0:16 allInvocationsEqual ( global bool)
0:16 'b1' ( temp bool)
0:? Linker Objects
0:? 's' ( smooth in structure{ global float f, global 4-component vector of float v})

View File

@@ -3,6 +3,19 @@ Shader version: 460
0:? Sequence
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:? Sequence
0:10 move second child to first child ( temp bool)
0:10 'b1' ( temp bool)
0:10 anyInvocation ( global bool)
0:10 'b1' ( temp bool)
0:11 move second child to first child ( temp bool)
0:11 'b1' ( temp bool)
0:11 allInvocations ( global bool)
0:11 'b1' ( temp bool)
0:12 move second child to first child ( temp bool)
0:12 'b1' ( temp bool)
0:12 allInvocationsEqual ( global bool)
0:12 'b1' ( temp bool)
0:? Linker Objects
0:? 'i' ( global int)
0:? 'f' ( global float)
@@ -17,6 +30,19 @@ Shader version: 460
0:? Sequence
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:? Sequence
0:10 move second child to first child ( temp bool)
0:10 'b1' ( temp bool)
0:10 anyInvocation ( global bool)
0:10 'b1' ( temp bool)
0:11 move second child to first child ( temp bool)
0:11 'b1' ( temp bool)
0:11 allInvocations ( global bool)
0:11 'b1' ( temp bool)
0:12 move second child to first child ( temp bool)
0:12 'b1' ( temp bool)
0:12 allInvocationsEqual ( global bool)
0:12 'b1' ( temp bool)
0:? Linker Objects
0:? 'i' ( global int)
0:? 'f' ( global float)

View File

@@ -0,0 +1,33 @@
spv.460.comp
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 15
Capability Shader
Capability SubgroupVoteKHR
Extension "SPV_KHR_subgroup_vote"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1
Source GLSL 460
Name 4 "main"
Name 8 "b1"
2: TypeVoid
3: TypeFunction 2
6: TypeBool
7: TypePointer Function 6(bool)
4(main): 2 Function None 3
5: Label
8(b1): 7(ptr) Variable Function
9: 6(bool) Load 8(b1)
10: 6(bool) SubgroupAnyKHR 9
Store 8(b1) 10
11: 6(bool) Load 8(b1)
12: 6(bool) SubgroupAllKHR 11
Store 8(b1) 12
13: 6(bool) Load 8(b1)
14: 6(bool) SubgroupAllEqualKHR 13
Store 8(b1) 14
Return
FunctionEnd