Require l-value patch-out indexing to be gl_InvocationID.

Also, generally allow ES variable indexing of in/out blocks.
This commit is contained in:
John Kessenich
2015-11-28 15:19:11 -07:00
parent 989df85dcd
commit 1be8063e01
16 changed files with 354 additions and 196 deletions

View File

@@ -7,12 +7,12 @@ Linked tessellation control stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 90
// Id's are bound by 93
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 52 76 80 81 84 85 88 89
EntryPoint TessellationControl 4 "main" 52 79 83 84 87 88 91 92
ExecutionMode 4 OutputVertices 4
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
@@ -37,16 +37,16 @@ Linked tessellation control stage:
MemberName 48(gl_PerVertex) 1 "gl_PointSize"
MemberName 48(gl_PerVertex) 2 "gl_ClipDistance"
Name 52 "gl_out"
Name 63 "gl_TessLevelOuter"
Name 70 "gl_TessLevelInner"
Name 75 "outa"
Name 76 "patchOut"
Name 80 "inb"
Name 81 "ind"
Name 84 "ivla"
Name 85 "ivlb"
Name 88 "ovla"
Name 89 "ovlb"
Name 66 "gl_TessLevelOuter"
Name 73 "gl_TessLevelInner"
Name 78 "outa"
Name 79 "patchOut"
Name 83 "inb"
Name 84 "ind"
Name 87 "ivla"
Name 88 "ivlb"
Name 91 "ovla"
Name 92 "ovlb"
MemberDecorate 19(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 19(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 19(gl_PerVertex) 2 BuiltIn ClipDistance
@@ -58,15 +58,15 @@ Linked tessellation control stage:
MemberDecorate 48(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 48(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 48(gl_PerVertex) Block
Decorate 63(gl_TessLevelOuter) Patch
Decorate 63(gl_TessLevelOuter) BuiltIn TessLevelOuter
Decorate 70(gl_TessLevelInner) Patch
Decorate 70(gl_TessLevelInner) BuiltIn TessLevelInner
Decorate 76(patchOut) Patch
Decorate 84(ivla) Location 3
Decorate 85(ivlb) Location 4
Decorate 88(ovla) Location 3
Decorate 89(ovlb) Location 4
Decorate 66(gl_TessLevelOuter) Patch
Decorate 66(gl_TessLevelOuter) BuiltIn TessLevelOuter
Decorate 73(gl_TessLevelInner) Patch
Decorate 73(gl_TessLevelInner) BuiltIn TessLevelInner
Decorate 79(patchOut) Patch
Decorate 87(ivla) Location 3
Decorate 88(ivlb) Location 4
Decorate 91(ovla) Location 3
Decorate 92(ovlb) Location 4
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@@ -100,35 +100,35 @@ Linked tessellation control stage:
50: TypeArray 48(gl_PerVertex) 49
51: TypePointer Output 50
52(gl_out): 51(ptr) Variable Output
54: TypePointer Output 15(fvec4)
57: TypePointer Output 14(float)
61: TypeArray 14(float) 49
62: TypePointer Output 61
63(gl_TessLevelOuter): 62(ptr) Variable Output
64: 10(int) Constant 3
65: 14(float) Constant 1078774989
67: 6(int) Constant 2
68: TypeArray 14(float) 67
69: TypePointer Output 68
70(gl_TessLevelInner): 69(ptr) Variable Output
71: 14(float) Constant 1067869798
73: TypeArray 10(int) 49
74: TypePointer Private 73
75(outa): 74(ptr) Variable Private
76(patchOut): 54(ptr) Variable Output
77: TypeVector 14(float) 2
78: TypeArray 77(fvec2) 20
79: TypePointer Input 78
80(inb): 79(ptr) Variable Input
81(ind): 79(ptr) Variable Input
82: TypeArray 15(fvec4) 20
83: TypePointer Input 82
84(ivla): 83(ptr) Variable Input
85(ivlb): 83(ptr) Variable Input
86: TypeArray 15(fvec4) 49
87: TypePointer Output 86
88(ovla): 87(ptr) Variable Output
89(ovlb): 87(ptr) Variable Output
55: TypePointer Output 15(fvec4)
59: TypePointer Output 14(float)
64: TypeArray 14(float) 49
65: TypePointer Output 64
66(gl_TessLevelOuter): 65(ptr) Variable Output
67: 10(int) Constant 3
68: 14(float) Constant 1078774989
70: 6(int) Constant 2
71: TypeArray 14(float) 70
72: TypePointer Output 71
73(gl_TessLevelInner): 72(ptr) Variable Output
74: 14(float) Constant 1067869798
76: TypeArray 10(int) 49
77: TypePointer Private 76
78(outa): 77(ptr) Variable Private
79(patchOut): 55(ptr) Variable Output
80: TypeVector 14(float) 2
81: TypeArray 80(fvec2) 20
82: TypePointer Input 81
83(inb): 82(ptr) Variable Input
84(ind): 82(ptr) Variable Input
85: TypeArray 15(fvec4) 20
86: TypePointer Input 85
87(ivla): 86(ptr) Variable Input
88(ivlb): 86(ptr) Variable Input
89: TypeArray 15(fvec4) 49
90: TypePointer Output 89
91(ovla): 90(ptr) Variable Output
92(ovlb): 90(ptr) Variable Output
4(main): 2 Function None 3
5: Label
12(a): 11(ptr) Variable Function
@@ -156,18 +156,21 @@ Linked tessellation control stage:
Store 42(pid) 44
47: 10(int) Load 46(gl_InvocationID)
Store 45(iid) 47
53: 15(fvec4) Load 17(p)
55: 54(ptr) AccessChain 52(gl_out) 24 25
Store 55 53
56: 14(float) Load 30(ps)
58: 57(ptr) AccessChain 52(gl_out) 24 24
Store 58 56
59: 14(float) Load 34(cd)
60: 57(ptr) AccessChain 52(gl_out) 24 35 24
Store 60 59
66: 57(ptr) AccessChain 63(gl_TessLevelOuter) 64
Store 66 65
72: 57(ptr) AccessChain 70(gl_TessLevelInner) 24
Store 72 71
53: 10(int) Load 46(gl_InvocationID)
54: 15(fvec4) Load 17(p)
56: 55(ptr) AccessChain 52(gl_out) 53 25
Store 56 54
57: 10(int) Load 46(gl_InvocationID)
58: 14(float) Load 30(ps)
60: 59(ptr) AccessChain 52(gl_out) 57 24
Store 60 58
61: 10(int) Load 46(gl_InvocationID)
62: 14(float) Load 34(cd)
63: 59(ptr) AccessChain 52(gl_out) 61 35 24
Store 63 62
69: 59(ptr) AccessChain 66(gl_TessLevelOuter) 67
Store 69 68
75: 59(ptr) AccessChain 73(gl_TessLevelInner) 24
Store 75 74
Return
FunctionEnd