diff --git a/Test/baseResults/hlsl.color.hull.tesc.out b/Test/baseResults/hlsl.color.hull.tesc.out index c5be8e401e..e0aca87678 100644 --- a/Test/baseResults/hlsl.color.hull.tesc.out +++ b/Test/baseResults/hlsl.color.hull.tesc.out @@ -89,23 +89,108 @@ triangle order = cw 0:63 Function Definition: main( ( temp void) 0:63 Function Parameters: 0:? Sequence -0:63 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'patch' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Sequence +0:63 move second child to first child ( temp 3-component vector of float) +0:63 position: direct index for structure ( temp 3-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 0 (const int) +0:63 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.position' (layout( location=0) in 3-element array of 3-component vector of float) +0:63 Constant: +0:63 0 (const int) +0:63 move second child to first child ( temp 4-component vector of float) +0:63 color: direct index for structure ( temp 4-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 direct index (layout( location=1) in 4-component vector of float) +0:? 'patch.color' (layout( location=1) in 3-element array of 4-component vector of float) +0:63 Constant: +0:63 0 (const int) +0:63 move second child to first child ( temp 3-component vector of float) +0:63 position: direct index for structure ( temp 3-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 0 (const int) +0:63 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.position' (layout( location=0) in 3-element array of 3-component vector of float) +0:63 Constant: +0:63 1 (const int) +0:63 move second child to first child ( temp 4-component vector of float) +0:63 color: direct index for structure ( temp 4-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 direct index (layout( location=1) in 4-component vector of float) +0:? 'patch.color' (layout( location=1) in 3-element array of 4-component vector of float) +0:63 Constant: +0:63 1 (const int) +0:63 move second child to first child ( temp 3-component vector of float) +0:63 position: direct index for structure ( temp 3-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 2 (const int) +0:63 Constant: +0:63 0 (const int) +0:63 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.position' (layout( location=0) in 3-element array of 3-component vector of float) +0:63 Constant: +0:63 2 (const int) +0:63 move second child to first child ( temp 4-component vector of float) +0:63 color: direct index for structure ( temp 4-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 2 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 direct index (layout( location=1) in 4-component vector of float) +0:? 'patch.color' (layout( location=1) in 3-element array of 4-component vector of float) +0:63 Constant: +0:63 2 (const int) 0:63 move second child to first child ( temp uint) 0:? 'pointId' ( temp uint) 0:? 'pointId' ( in uint InvocationID) 0:63 move second child to first child ( temp uint) 0:? 'patchId' ( temp uint) 0:? 'patchId' ( in uint PrimitiveID) -0:63 move second child to first child ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:63 indirect index (layout( location=0) out structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'pointId' ( in uint InvocationID) -0:63 Function Call: @main(struct-HullInputType-vf3-vf41[3];u1;u1; ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'pointId' ( temp uint) -0:? 'patchId' ( temp uint) +0:63 Sequence +0:63 move second child to first child ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 'flattenTemp' ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Function Call: @main(struct-HullInputType-vf3-vf41[3];u1;u1; ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'pointId' ( temp uint) +0:? 'patchId' ( temp uint) +0:63 move second child to first child ( temp 3-component vector of float) +0:63 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.position' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'pointId' ( in uint InvocationID) +0:63 position: direct index for structure ( temp 3-component vector of float) +0:63 'flattenTemp' ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 0 (const int) +0:63 move second child to first child ( temp 4-component vector of float) +0:63 indirect index (layout( location=1) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=1) out 3-element array of 4-component vector of float) +0:? 'pointId' ( in uint InvocationID) +0:63 color: direct index for structure ( temp 4-component vector of float) +0:63 'flattenTemp' ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 1 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -168,8 +253,10 @@ triangle order = cw 0:? 1 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( binding=0 row_major std140) uniform block{layout( row_major std140) uniform float tessellationAmount, layout( row_major std140) uniform 3-component vector of float padding}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'patch' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? '@entryPointOutput.position' (layout( location=0) out 3-element array of 3-component vector of float) +0:? '@entryPointOutput.color' (layout( location=1) out 3-element array of 4-component vector of float) +0:? 'patch.position' (layout( location=0) in 3-element array of 3-component vector of float) +0:? 'patch.color' (layout( location=1) in 3-element array of 4-component vector of float) 0:? 'pointId' ( in uint InvocationID) 0:? 'patchId' ( in uint PrimitiveID) 0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) @@ -269,23 +356,108 @@ triangle order = cw 0:63 Function Definition: main( ( temp void) 0:63 Function Parameters: 0:? Sequence -0:63 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'patch' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Sequence +0:63 move second child to first child ( temp 3-component vector of float) +0:63 position: direct index for structure ( temp 3-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 0 (const int) +0:63 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.position' (layout( location=0) in 3-element array of 3-component vector of float) +0:63 Constant: +0:63 0 (const int) +0:63 move second child to first child ( temp 4-component vector of float) +0:63 color: direct index for structure ( temp 4-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 direct index (layout( location=1) in 4-component vector of float) +0:? 'patch.color' (layout( location=1) in 3-element array of 4-component vector of float) +0:63 Constant: +0:63 0 (const int) +0:63 move second child to first child ( temp 3-component vector of float) +0:63 position: direct index for structure ( temp 3-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 0 (const int) +0:63 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.position' (layout( location=0) in 3-element array of 3-component vector of float) +0:63 Constant: +0:63 1 (const int) +0:63 move second child to first child ( temp 4-component vector of float) +0:63 color: direct index for structure ( temp 4-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 direct index (layout( location=1) in 4-component vector of float) +0:? 'patch.color' (layout( location=1) in 3-element array of 4-component vector of float) +0:63 Constant: +0:63 1 (const int) +0:63 move second child to first child ( temp 3-component vector of float) +0:63 position: direct index for structure ( temp 3-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 2 (const int) +0:63 Constant: +0:63 0 (const int) +0:63 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.position' (layout( location=0) in 3-element array of 3-component vector of float) +0:63 Constant: +0:63 2 (const int) +0:63 move second child to first child ( temp 4-component vector of float) +0:63 color: direct index for structure ( temp 4-component vector of float) +0:63 direct index ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 2 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 direct index (layout( location=1) in 4-component vector of float) +0:? 'patch.color' (layout( location=1) in 3-element array of 4-component vector of float) +0:63 Constant: +0:63 2 (const int) 0:63 move second child to first child ( temp uint) 0:? 'pointId' ( temp uint) 0:? 'pointId' ( in uint InvocationID) 0:63 move second child to first child ( temp uint) 0:? 'patchId' ( temp uint) 0:? 'patchId' ( in uint PrimitiveID) -0:63 move second child to first child ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:63 indirect index (layout( location=0) out structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'pointId' ( in uint InvocationID) -0:63 Function Call: @main(struct-HullInputType-vf3-vf41[3];u1;u1; ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'pointId' ( temp uint) -0:? 'patchId' ( temp uint) +0:63 Sequence +0:63 move second child to first child ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 'flattenTemp' ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Function Call: @main(struct-HullInputType-vf3-vf41[3];u1;u1; ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? 'pointId' ( temp uint) +0:? 'patchId' ( temp uint) +0:63 move second child to first child ( temp 3-component vector of float) +0:63 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.position' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'pointId' ( in uint InvocationID) +0:63 position: direct index for structure ( temp 3-component vector of float) +0:63 'flattenTemp' ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 0 (const int) +0:63 move second child to first child ( temp 4-component vector of float) +0:63 indirect index (layout( location=1) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=1) out 3-element array of 4-component vector of float) +0:? 'pointId' ( in uint InvocationID) +0:63 color: direct index for structure ( temp 4-component vector of float) +0:63 'flattenTemp' ( temp structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:63 Constant: +0:63 1 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -348,8 +520,10 @@ triangle order = cw 0:? 1 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( binding=0 row_major std140) uniform block{layout( row_major std140) uniform float tessellationAmount, layout( row_major std140) uniform 3-component vector of float padding}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) -0:? 'patch' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float position, temp 4-component vector of float color}) +0:? '@entryPointOutput.position' (layout( location=0) out 3-element array of 3-component vector of float) +0:? '@entryPointOutput.color' (layout( location=1) out 3-element array of 4-component vector of float) +0:? 'patch.position' (layout( location=0) in 3-element array of 3-component vector of float) +0:? 'patch.color' (layout( location=1) in 3-element array of 4-component vector of float) 0:? 'pointId' ( in uint InvocationID) 0:? 'patchId' ( in uint PrimitiveID) 0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) @@ -357,12 +531,12 @@ triangle order = cw // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 127 +// Id's are bound by 159 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 72 76 79 83 110 123 + EntryPoint TessellationControl 4 "main" 73 80 99 102 113 120 142 155 ExecutionMode 4 OutputVertices 3 ExecutionMode 4 Triangles ExecutionMode 4 SpacingEqual @@ -392,33 +566,38 @@ triangle order = cw Name 35 "" Name 56 "output" Name 70 "patch" - Name 72 "patch" - Name 74 "pointId" - Name 76 "pointId" - Name 78 "patchId" - Name 79 "patchId" - Name 83 "@entryPointOutput" - Name 85 "param" - Name 87 "param" - Name 89 "param" - Name 102 "@patchConstantResult" - Name 103 "param" + Name 73 "patch.position" + Name 80 "patch.color" + Name 97 "pointId" + Name 99 "pointId" + Name 101 "patchId" + Name 102 "patchId" + Name 104 "flattenTemp" Name 105 "param" - Name 110 "@patchConstantOutput.edges" - Name 123 "@patchConstantOutput.inside" + Name 107 "param" + Name 109 "param" + Name 113 "@entryPointOutput.position" + Name 120 "@entryPointOutput.color" + Name 134 "@patchConstantResult" + Name 135 "param" + Name 137 "param" + Name 142 "@patchConstantOutput.edges" + Name 155 "@patchConstantOutput.inside" MemberDecorate 33(TessellationBuffer) 0 Offset 0 MemberDecorate 33(TessellationBuffer) 1 Offset 4 Decorate 33(TessellationBuffer) Block Decorate 35 DescriptorSet 0 Decorate 35 Binding 0 - Decorate 72(patch) Location 0 - Decorate 76(pointId) BuiltIn InvocationId - Decorate 79(patchId) BuiltIn PrimitiveId - Decorate 83(@entryPointOutput) Location 0 - Decorate 110(@patchConstantOutput.edges) Patch - Decorate 110(@patchConstantOutput.edges) BuiltIn TessLevelOuter - Decorate 123(@patchConstantOutput.inside) Patch - Decorate 123(@patchConstantOutput.inside) BuiltIn TessLevelInner + Decorate 73(patch.position) Location 0 + Decorate 80(patch.color) Location 1 + Decorate 99(pointId) BuiltIn InvocationId + Decorate 102(patchId) BuiltIn PrimitiveId + Decorate 113(@entryPointOutput.position) Location 0 + Decorate 120(@entryPointOutput.color) Location 1 + Decorate 142(@patchConstantOutput.edges) Patch + Decorate 142(@patchConstantOutput.edges) BuiltIn TessLevelOuter + Decorate 155(@patchConstantOutput.inside) Patch + Decorate 155(@patchConstantOutput.inside) BuiltIn TessLevelInner 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -448,83 +627,122 @@ triangle order = cw 55: TypePointer Function 22(HullOutputType) 58: TypePointer Function 7(fvec3) 63: TypePointer Function 8(fvec4) - 71: TypePointer Input 12 - 72(patch): 71(ptr) Variable Input - 75: TypePointer Input 10(int) - 76(pointId): 75(ptr) Variable Input - 79(patchId): 75(ptr) Variable Input - 81: TypeArray 22(HullOutputType) 11 - 82: TypePointer Output 81 -83(@entryPointOutput): 82(ptr) Variable Output - 92: TypePointer Output 22(HullOutputType) - 94: 10(int) Constant 2 - 95: 10(int) Constant 4 - 96: 10(int) Constant 0 - 98: TypeBool - 108: TypeArray 6(float) 95 - 109: TypePointer Output 108 -110(@patchConstantOutput.edges): 109(ptr) Variable Output - 113: TypePointer Output 6(float) - 121: TypeArray 6(float) 94 - 122: TypePointer Output 121 -123(@patchConstantOutput.inside): 122(ptr) Variable Output + 71: TypeArray 7(fvec3) 11 + 72: TypePointer Input 71 +73(patch.position): 72(ptr) Variable Input + 74: TypePointer Input 7(fvec3) + 78: TypeArray 8(fvec4) 11 + 79: TypePointer Input 78 + 80(patch.color): 79(ptr) Variable Input + 81: TypePointer Input 8(fvec4) + 98: TypePointer Input 10(int) + 99(pointId): 98(ptr) Variable Input + 102(patchId): 98(ptr) Variable Input + 112: TypePointer Output 71 +113(@entryPointOutput.position): 112(ptr) Variable Output + 117: TypePointer Output 7(fvec3) + 119: TypePointer Output 78 +120(@entryPointOutput.color): 119(ptr) Variable Output + 124: TypePointer Output 8(fvec4) + 126: 10(int) Constant 2 + 127: 10(int) Constant 4 + 128: 10(int) Constant 0 + 130: TypeBool + 140: TypeArray 6(float) 127 + 141: TypePointer Output 140 +142(@patchConstantOutput.edges): 141(ptr) Variable Output + 145: TypePointer Output 6(float) + 153: TypeArray 6(float) 126 + 154: TypePointer Output 153 +155(@patchConstantOutput.inside): 154(ptr) Variable Output 4(main): 2 Function None 3 5: Label 70(patch): 13(ptr) Variable Function - 74(pointId): 14(ptr) Variable Function - 78(patchId): 14(ptr) Variable Function - 85(param): 13(ptr) Variable Function - 87(param): 14(ptr) Variable Function - 89(param): 14(ptr) Variable Function -102(@patchConstantResult): 29(ptr) Variable Function - 103(param): 13(ptr) Variable Function - 105(param): 14(ptr) Variable Function - 73: 12 Load 72(patch) - Store 70(patch) 73 - 77: 10(int) Load 76(pointId) - Store 74(pointId) 77 - 80: 10(int) Load 79(patchId) - Store 78(patchId) 80 - 84: 10(int) Load 76(pointId) - 86: 12 Load 70(patch) - Store 85(param) 86 - 88: 10(int) Load 74(pointId) - Store 87(param) 88 - 90: 10(int) Load 78(patchId) - Store 89(param) 90 - 91:22(HullOutputType) FunctionCall 27(@main(struct-HullInputType-vf3-vf41[3];u1;u1;) 85(param) 87(param) 89(param) - 93: 92(ptr) AccessChain 83(@entryPointOutput) 84 - Store 93 91 - ControlBarrier 94 95 96 - 97: 10(int) Load 76(pointId) - 99: 98(bool) IEqual 97 32 - SelectionMerge 101 None - BranchConditional 99 100 101 - 100: Label - 104: 12 Load 70(patch) - Store 103(param) 104 - 106: 10(int) Load 79(patchId) - Store 105(param) 106 - 107:16(ConstantOutputType) FunctionCall 20(ColorPatchConstantFunction(struct-HullInputType-vf3-vf41[3];u1;) 103(param) 105(param) - Store 102(@patchConstantResult) 107 - 111: 39(ptr) AccessChain 102(@patchConstantResult) 32 32 - 112: 6(float) Load 111 - 114: 113(ptr) AccessChain 110(@patchConstantOutput.edges) 32 - Store 114 112 - 115: 39(ptr) AccessChain 102(@patchConstantResult) 32 41 - 116: 6(float) Load 115 - 117: 113(ptr) AccessChain 110(@patchConstantOutput.edges) 41 - Store 117 116 - 118: 39(ptr) AccessChain 102(@patchConstantResult) 32 45 - 119: 6(float) Load 118 - 120: 113(ptr) AccessChain 110(@patchConstantOutput.edges) 45 - Store 120 119 - 124: 39(ptr) AccessChain 102(@patchConstantResult) 41 - 125: 6(float) Load 124 - 126: 113(ptr) AccessChain 123(@patchConstantOutput.inside) 32 - Store 126 125 - Branch 101 - 101: Label + 97(pointId): 14(ptr) Variable Function + 101(patchId): 14(ptr) Variable Function +104(flattenTemp): 55(ptr) Variable Function + 105(param): 13(ptr) Variable Function + 107(param): 14(ptr) Variable Function + 109(param): 14(ptr) Variable Function +134(@patchConstantResult): 29(ptr) Variable Function + 135(param): 13(ptr) Variable Function + 137(param): 14(ptr) Variable Function + 75: 74(ptr) AccessChain 73(patch.position) 32 + 76: 7(fvec3) Load 75 + 77: 58(ptr) AccessChain 70(patch) 32 32 + Store 77 76 + 82: 81(ptr) AccessChain 80(patch.color) 32 + 83: 8(fvec4) Load 82 + 84: 63(ptr) AccessChain 70(patch) 32 41 + Store 84 83 + 85: 74(ptr) AccessChain 73(patch.position) 41 + 86: 7(fvec3) Load 85 + 87: 58(ptr) AccessChain 70(patch) 41 32 + Store 87 86 + 88: 81(ptr) AccessChain 80(patch.color) 41 + 89: 8(fvec4) Load 88 + 90: 63(ptr) AccessChain 70(patch) 41 41 + Store 90 89 + 91: 74(ptr) AccessChain 73(patch.position) 45 + 92: 7(fvec3) Load 91 + 93: 58(ptr) AccessChain 70(patch) 45 32 + Store 93 92 + 94: 81(ptr) AccessChain 80(patch.color) 45 + 95: 8(fvec4) Load 94 + 96: 63(ptr) AccessChain 70(patch) 45 41 + Store 96 95 + 100: 10(int) Load 99(pointId) + Store 97(pointId) 100 + 103: 10(int) Load 102(patchId) + Store 101(patchId) 103 + 106: 12 Load 70(patch) + Store 105(param) 106 + 108: 10(int) Load 97(pointId) + Store 107(param) 108 + 110: 10(int) Load 101(patchId) + Store 109(param) 110 + 111:22(HullOutputType) FunctionCall 27(@main(struct-HullInputType-vf3-vf41[3];u1;u1;) 105(param) 107(param) 109(param) + Store 104(flattenTemp) 111 + 114: 10(int) Load 99(pointId) + 115: 58(ptr) AccessChain 104(flattenTemp) 32 + 116: 7(fvec3) Load 115 + 118: 117(ptr) AccessChain 113(@entryPointOutput.position) 114 + Store 118 116 + 121: 10(int) Load 99(pointId) + 122: 63(ptr) AccessChain 104(flattenTemp) 41 + 123: 8(fvec4) Load 122 + 125: 124(ptr) AccessChain 120(@entryPointOutput.color) 121 + Store 125 123 + ControlBarrier 126 127 128 + 129: 10(int) Load 99(pointId) + 131: 130(bool) IEqual 129 32 + SelectionMerge 133 None + BranchConditional 131 132 133 + 132: Label + 136: 12 Load 70(patch) + Store 135(param) 136 + 138: 10(int) Load 102(patchId) + Store 137(param) 138 + 139:16(ConstantOutputType) FunctionCall 20(ColorPatchConstantFunction(struct-HullInputType-vf3-vf41[3];u1;) 135(param) 137(param) + Store 134(@patchConstantResult) 139 + 143: 39(ptr) AccessChain 134(@patchConstantResult) 32 32 + 144: 6(float) Load 143 + 146: 145(ptr) AccessChain 142(@patchConstantOutput.edges) 32 + Store 146 144 + 147: 39(ptr) AccessChain 134(@patchConstantResult) 32 41 + 148: 6(float) Load 147 + 149: 145(ptr) AccessChain 142(@patchConstantOutput.edges) 41 + Store 149 148 + 150: 39(ptr) AccessChain 134(@patchConstantResult) 32 45 + 151: 6(float) Load 150 + 152: 145(ptr) AccessChain 142(@patchConstantOutput.edges) 45 + Store 152 151 + 156: 39(ptr) AccessChain 134(@patchConstantResult) 41 + 157: 6(float) Load 156 + 158: 145(ptr) AccessChain 155(@patchConstantOutput.inside) 32 + Store 158 157 + Branch 133 + 133: Label Return FunctionEnd 20(ColorPatchConstantFunction(struct-HullInputType-vf3-vf41[3];u1;):16(ConstantOutputType) Function None 17 diff --git a/Test/baseResults/hlsl.domain.1.tese.out b/Test/baseResults/hlsl.domain.1.tese.out index 0b7b27564c..3a6acdea0b 100644 --- a/Test/baseResults/hlsl.domain.1.tese.out +++ b/Test/baseResults/hlsl.domain.1.tese.out @@ -56,9 +56,79 @@ triangle order = none 0:22 Function Definition: main( ( temp void) 0:22 Function Parameters: 0:? Sequence -0:22 move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Sequence +0:22 move second child to first child ( temp 4-component vector of float) +0:22 pos: direct index for structure ( temp 4-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:22 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:22 Constant: +0:22 0 (const int) +0:22 move second child to first child ( temp 3-component vector of float) +0:22 norm: direct index for structure ( temp 3-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 1 (const int) +0:22 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:22 Constant: +0:22 0 (const int) +0:22 move second child to first child ( temp 4-component vector of float) +0:22 pos: direct index for structure ( temp 4-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 1 (const int) +0:22 Constant: +0:22 0 (const int) +0:22 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:22 Constant: +0:22 1 (const int) +0:22 move second child to first child ( temp 3-component vector of float) +0:22 norm: direct index for structure ( temp 3-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 1 (const int) +0:22 Constant: +0:22 1 (const int) +0:22 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:22 Constant: +0:22 1 (const int) +0:22 move second child to first child ( temp 4-component vector of float) +0:22 pos: direct index for structure ( temp 4-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 2 (const int) +0:22 Constant: +0:22 0 (const int) +0:22 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:22 Constant: +0:22 2 (const int) +0:22 move second child to first child ( temp 3-component vector of float) +0:22 norm: direct index for structure ( temp 3-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 2 (const int) +0:22 Constant: +0:22 1 (const int) +0:22 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:22 Constant: +0:22 2 (const int) 0:22 move second child to first child ( temp float) 0:? 'f' ( temp float) 0:? 'f' (layout( location=2) patch in float) @@ -134,7 +204,8 @@ triangle order = none 0:? Linker Objects 0:? '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) 0:? 'f' (layout( location=2) patch in float) 0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 0:? 'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter) @@ -201,9 +272,79 @@ triangle order = none 0:22 Function Definition: main( ( temp void) 0:22 Function Parameters: 0:? Sequence -0:22 move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Sequence +0:22 move second child to first child ( temp 4-component vector of float) +0:22 pos: direct index for structure ( temp 4-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:22 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:22 Constant: +0:22 0 (const int) +0:22 move second child to first child ( temp 3-component vector of float) +0:22 norm: direct index for structure ( temp 3-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 1 (const int) +0:22 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:22 Constant: +0:22 0 (const int) +0:22 move second child to first child ( temp 4-component vector of float) +0:22 pos: direct index for structure ( temp 4-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 1 (const int) +0:22 Constant: +0:22 0 (const int) +0:22 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:22 Constant: +0:22 1 (const int) +0:22 move second child to first child ( temp 3-component vector of float) +0:22 norm: direct index for structure ( temp 3-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 1 (const int) +0:22 Constant: +0:22 1 (const int) +0:22 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:22 Constant: +0:22 1 (const int) +0:22 move second child to first child ( temp 4-component vector of float) +0:22 pos: direct index for structure ( temp 4-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 2 (const int) +0:22 Constant: +0:22 0 (const int) +0:22 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:22 Constant: +0:22 2 (const int) +0:22 move second child to first child ( temp 3-component vector of float) +0:22 norm: direct index for structure ( temp 3-component vector of float) +0:22 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:22 Constant: +0:22 2 (const int) +0:22 Constant: +0:22 1 (const int) +0:22 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:22 Constant: +0:22 2 (const int) 0:22 move second child to first child ( temp float) 0:? 'f' ( temp float) 0:? 'f' (layout( location=2) patch in float) @@ -279,7 +420,8 @@ triangle order = none 0:? Linker Objects 0:? '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) 0:? 'f' (layout( location=2) patch in float) 0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 0:? 'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter) @@ -287,12 +429,12 @@ triangle order = none // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 103 +// Id's are bound by 125 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationEvaluation 4 "main" 54 58 62 68 82 96 100 + EntryPoint TessellationEvaluation 4 "main" 55 62 82 85 91 104 118 122 ExecutionMode 4 Triangles Source HLSL 500 Name 4 "main" @@ -312,31 +454,33 @@ triangle order = none Name 23 "pcf_data" Name 27 "o" Name 52 "i" - Name 54 "i" - Name 56 "f" - Name 58 "f" - Name 60 "tesscoord" - Name 62 "tesscoord" - Name 64 "pcf_data" - Name 68 "pcf_data.flTessFactor" - Name 82 "pcf_data.flInsideTessFactor" - Name 86 "flattenTemp" - Name 88 "param" - Name 90 "param" - Name 92 "param" - Name 96 "@entryPointOutput.pos" - Name 100 "@entryPointOutput.norm" - Decorate 54(i) Location 0 - Decorate 58(f) Patch - Decorate 58(f) Location 2 - Decorate 62(tesscoord) Patch - Decorate 62(tesscoord) BuiltIn TessCoord - Decorate 68(pcf_data.flTessFactor) Patch - Decorate 68(pcf_data.flTessFactor) BuiltIn TessLevelOuter - Decorate 82(pcf_data.flInsideTessFactor) Patch - Decorate 82(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner - Decorate 96(@entryPointOutput.pos) Location 0 - Decorate 100(@entryPointOutput.norm) Location 1 + Name 55 "i.pos" + Name 62 "i.norm" + Name 80 "f" + Name 82 "f" + Name 84 "tesscoord" + Name 85 "tesscoord" + Name 87 "pcf_data" + Name 91 "pcf_data.flTessFactor" + Name 104 "pcf_data.flInsideTessFactor" + Name 108 "flattenTemp" + Name 110 "param" + Name 112 "param" + Name 114 "param" + Name 118 "@entryPointOutput.pos" + Name 122 "@entryPointOutput.norm" + Decorate 55(i.pos) Location 0 + Decorate 62(i.norm) Location 1 + Decorate 82(f) Patch + Decorate 82(f) Location 2 + Decorate 85(tesscoord) Patch + Decorate 85(tesscoord) BuiltIn TessCoord + Decorate 91(pcf_data.flTessFactor) Patch + Decorate 91(pcf_data.flTessFactor) BuiltIn TessLevelOuter + Decorate 104(pcf_data.flInsideTessFactor) Patch + Decorate 104(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner + Decorate 118(@entryPointOutput.pos) Location 0 + Decorate 122(@entryPointOutput.norm) Location 1 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -361,72 +505,99 @@ triangle order = none 40: 28(int) Constant 1 42: 10(int) Constant 1 51: TypePointer Function 12 - 53: TypePointer Input 12 - 54(i): 53(ptr) Variable Input - 57: TypePointer Input 6(float) - 58(f): 57(ptr) Variable Input - 61: TypePointer Input 8(fvec3) - 62(tesscoord): 61(ptr) Variable Input - 65: 10(int) Constant 4 - 66: TypeArray 6(float) 65 - 67: TypePointer Input 66 -68(pcf_data.flTessFactor): 67(ptr) Variable Input - 75: 28(int) Constant 2 - 79: 10(int) Constant 2 - 80: TypeArray 6(float) 79 - 81: TypePointer Input 80 -82(pcf_data.flInsideTessFactor): 81(ptr) Variable Input - 95: TypePointer Output 7(fvec4) -96(@entryPointOutput.pos): 95(ptr) Variable Output - 99: TypePointer Output 8(fvec3) -100(@entryPointOutput.norm): 99(ptr) Variable Output + 53: TypeArray 7(fvec4) 11 + 54: TypePointer Input 53 + 55(i.pos): 54(ptr) Variable Input + 56: TypePointer Input 7(fvec4) + 60: TypeArray 8(fvec3) 11 + 61: TypePointer Input 60 + 62(i.norm): 61(ptr) Variable Input + 63: TypePointer Input 8(fvec3) + 73: 28(int) Constant 2 + 81: TypePointer Input 6(float) + 82(f): 81(ptr) Variable Input + 85(tesscoord): 63(ptr) Variable Input + 88: 10(int) Constant 4 + 89: TypeArray 6(float) 88 + 90: TypePointer Input 89 +91(pcf_data.flTessFactor): 90(ptr) Variable Input + 101: 10(int) Constant 2 + 102: TypeArray 6(float) 101 + 103: TypePointer Input 102 +104(pcf_data.flInsideTessFactor): 103(ptr) Variable Input + 117: TypePointer Output 7(fvec4) +118(@entryPointOutput.pos): 117(ptr) Variable Output + 121: TypePointer Output 8(fvec3) +122(@entryPointOutput.norm): 121(ptr) Variable Output 4(main): 2 Function None 3 5: Label 52(i): 51(ptr) Variable Function - 56(f): 13(ptr) Variable Function - 60(tesscoord): 14(ptr) Variable Function - 64(pcf_data): 17(ptr) Variable Function - 86(flattenTemp): 26(ptr) Variable Function - 88(param): 13(ptr) Variable Function - 90(param): 14(ptr) Variable Function - 92(param): 17(ptr) Variable Function - 55: 12 Load 54(i) - Store 52(i) 55 - 59: 6(float) Load 58(f) - Store 56(f) 59 - 63: 8(fvec3) Load 62(tesscoord) - Store 60(tesscoord) 63 - 69: 57(ptr) AccessChain 68(pcf_data.flTessFactor) 29 - 70: 6(float) Load 69 - 71: 13(ptr) AccessChain 64(pcf_data) 29 29 - Store 71 70 - 72: 57(ptr) AccessChain 68(pcf_data.flTessFactor) 40 - 73: 6(float) Load 72 - 74: 13(ptr) AccessChain 64(pcf_data) 29 40 - Store 74 73 - 76: 57(ptr) AccessChain 68(pcf_data.flTessFactor) 75 - 77: 6(float) Load 76 - 78: 13(ptr) AccessChain 64(pcf_data) 29 75 - Store 78 77 - 83: 57(ptr) AccessChain 82(pcf_data.flInsideTessFactor) 29 - 84: 6(float) Load 83 - 85: 13(ptr) AccessChain 64(pcf_data) 40 - Store 85 84 - 87: 12 Load 52(i) - 89: 6(float) Load 56(f) - Store 88(param) 89 - 91: 8(fvec3) Load 60(tesscoord) - Store 90(param) 91 - 93:16(pcf_in_t) Load 64(pcf_data) - Store 92(param) 93 - 94: 18(gs_in_t) FunctionCall 24(@main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11;) 87 88(param) 90(param) 92(param) - Store 86(flattenTemp) 94 - 97: 38(ptr) AccessChain 86(flattenTemp) 29 - 98: 7(fvec4) Load 97 - Store 96(@entryPointOutput.pos) 98 - 101: 14(ptr) AccessChain 86(flattenTemp) 40 - 102: 8(fvec3) Load 101 - Store 100(@entryPointOutput.norm) 102 + 80(f): 13(ptr) Variable Function + 84(tesscoord): 14(ptr) Variable Function + 87(pcf_data): 17(ptr) Variable Function +108(flattenTemp): 26(ptr) Variable Function + 110(param): 13(ptr) Variable Function + 112(param): 14(ptr) Variable Function + 114(param): 17(ptr) Variable Function + 57: 56(ptr) AccessChain 55(i.pos) 29 + 58: 7(fvec4) Load 57 + 59: 38(ptr) AccessChain 52(i) 29 29 + Store 59 58 + 64: 63(ptr) AccessChain 62(i.norm) 29 + 65: 8(fvec3) Load 64 + 66: 14(ptr) AccessChain 52(i) 29 40 + Store 66 65 + 67: 56(ptr) AccessChain 55(i.pos) 40 + 68: 7(fvec4) Load 67 + 69: 38(ptr) AccessChain 52(i) 40 29 + Store 69 68 + 70: 63(ptr) AccessChain 62(i.norm) 40 + 71: 8(fvec3) Load 70 + 72: 14(ptr) AccessChain 52(i) 40 40 + Store 72 71 + 74: 56(ptr) AccessChain 55(i.pos) 73 + 75: 7(fvec4) Load 74 + 76: 38(ptr) AccessChain 52(i) 73 29 + Store 76 75 + 77: 63(ptr) AccessChain 62(i.norm) 73 + 78: 8(fvec3) Load 77 + 79: 14(ptr) AccessChain 52(i) 73 40 + Store 79 78 + 83: 6(float) Load 82(f) + Store 80(f) 83 + 86: 8(fvec3) Load 85(tesscoord) + Store 84(tesscoord) 86 + 92: 81(ptr) AccessChain 91(pcf_data.flTessFactor) 29 + 93: 6(float) Load 92 + 94: 13(ptr) AccessChain 87(pcf_data) 29 29 + Store 94 93 + 95: 81(ptr) AccessChain 91(pcf_data.flTessFactor) 40 + 96: 6(float) Load 95 + 97: 13(ptr) AccessChain 87(pcf_data) 29 40 + Store 97 96 + 98: 81(ptr) AccessChain 91(pcf_data.flTessFactor) 73 + 99: 6(float) Load 98 + 100: 13(ptr) AccessChain 87(pcf_data) 29 73 + Store 100 99 + 105: 81(ptr) AccessChain 104(pcf_data.flInsideTessFactor) 29 + 106: 6(float) Load 105 + 107: 13(ptr) AccessChain 87(pcf_data) 40 + Store 107 106 + 109: 12 Load 52(i) + 111: 6(float) Load 80(f) + Store 110(param) 111 + 113: 8(fvec3) Load 84(tesscoord) + Store 112(param) 113 + 115:16(pcf_in_t) Load 87(pcf_data) + Store 114(param) 115 + 116: 18(gs_in_t) FunctionCall 24(@main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11;) 109 110(param) 112(param) 114(param) + Store 108(flattenTemp) 116 + 119: 38(ptr) AccessChain 108(flattenTemp) 29 + 120: 7(fvec4) Load 119 + Store 118(@entryPointOutput.pos) 120 + 123: 14(ptr) AccessChain 108(flattenTemp) 40 + 124: 8(fvec3) Load 123 + Store 122(@entryPointOutput.norm) 124 Return FunctionEnd 24(@main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11;): 18(gs_in_t) Function None 19 diff --git a/Test/baseResults/hlsl.domain.2.tese.out b/Test/baseResults/hlsl.domain.2.tese.out index e6ec924af8..677f136104 100644 --- a/Test/baseResults/hlsl.domain.2.tese.out +++ b/Test/baseResults/hlsl.domain.2.tese.out @@ -105,9 +105,79 @@ triangle order = none 0:25 Constant: 0:25 2 (const int) 0:? 'pcf_data.foo' (layout( location=2) patch in float) -0:25 move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Sequence +0:25 move second child to first child ( temp 4-component vector of float) +0:25 pos: direct index for structure ( temp 4-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:25 Constant: +0:25 0 (const int) +0:25 move second child to first child ( temp 3-component vector of float) +0:25 norm: direct index for structure ( temp 3-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:25 Constant: +0:25 0 (const int) +0:25 move second child to first child ( temp 4-component vector of float) +0:25 pos: direct index for structure ( temp 4-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 1 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:25 Constant: +0:25 1 (const int) +0:25 move second child to first child ( temp 3-component vector of float) +0:25 norm: direct index for structure ( temp 3-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 1 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:25 Constant: +0:25 1 (const int) +0:25 move second child to first child ( temp 4-component vector of float) +0:25 pos: direct index for structure ( temp 4-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 2 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:25 Constant: +0:25 2 (const int) +0:25 move second child to first child ( temp 3-component vector of float) +0:25 norm: direct index for structure ( temp 3-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 2 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:25 Constant: +0:25 2 (const int) 0:25 move second child to first child ( temp 3-component vector of float) 0:? 'tesscoord' ( temp 3-component vector of float) 0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) @@ -133,7 +203,8 @@ triangle order = none 0:? Linker Objects 0:? '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) 0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 0:? 'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter) 0:? 'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) @@ -249,9 +320,79 @@ triangle order = none 0:25 Constant: 0:25 2 (const int) 0:? 'pcf_data.foo' (layout( location=2) patch in float) -0:25 move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Sequence +0:25 move second child to first child ( temp 4-component vector of float) +0:25 pos: direct index for structure ( temp 4-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:25 Constant: +0:25 0 (const int) +0:25 move second child to first child ( temp 3-component vector of float) +0:25 norm: direct index for structure ( temp 3-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:25 Constant: +0:25 0 (const int) +0:25 move second child to first child ( temp 4-component vector of float) +0:25 pos: direct index for structure ( temp 4-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 1 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:25 Constant: +0:25 1 (const int) +0:25 move second child to first child ( temp 3-component vector of float) +0:25 norm: direct index for structure ( temp 3-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 1 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:25 Constant: +0:25 1 (const int) +0:25 move second child to first child ( temp 4-component vector of float) +0:25 pos: direct index for structure ( temp 4-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 2 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:25 Constant: +0:25 2 (const int) +0:25 move second child to first child ( temp 3-component vector of float) +0:25 norm: direct index for structure ( temp 3-component vector of float) +0:25 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:25 Constant: +0:25 2 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) +0:25 Constant: +0:25 2 (const int) 0:25 move second child to first child ( temp 3-component vector of float) 0:? 'tesscoord' ( temp 3-component vector of float) 0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) @@ -277,7 +418,8 @@ triangle order = none 0:? Linker Objects 0:? '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i.pos' (layout( location=0) in 3-element array of 4-component vector of float) +0:? 'i.norm' (layout( location=1) in 3-element array of 3-component vector of float) 0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 0:? 'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter) 0:? 'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) @@ -285,12 +427,12 @@ triangle order = none // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 98 +// Id's are bound by 120 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationEvaluation 4 "main" 52 67 71 77 81 91 95 + EntryPoint TessellationEvaluation 4 "main" 52 67 71 78 85 103 113 117 ExecutionMode 4 Triangles Source HLSL 500 Name 4 "main" @@ -314,25 +456,27 @@ triangle order = none Name 67 "pcf_data.flInsideTessFactor" Name 71 "pcf_data.foo" Name 75 "i" - Name 77 "i" - Name 79 "tesscoord" - Name 81 "tesscoord" - Name 83 "flattenTemp" - Name 85 "param" - Name 87 "param" - Name 91 "@entryPointOutput.pos" - Name 95 "@entryPointOutput.norm" + Name 78 "i.pos" + Name 85 "i.norm" + Name 102 "tesscoord" + Name 103 "tesscoord" + Name 105 "flattenTemp" + Name 107 "param" + Name 109 "param" + Name 113 "@entryPointOutput.pos" + Name 117 "@entryPointOutput.norm" Decorate 52(pcf_data.flTessFactor) Patch Decorate 52(pcf_data.flTessFactor) BuiltIn TessLevelOuter Decorate 67(pcf_data.flInsideTessFactor) Patch Decorate 67(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner Decorate 71(pcf_data.foo) Patch Decorate 71(pcf_data.foo) Location 2 - Decorate 77(i) Location 0 - Decorate 81(tesscoord) Patch - Decorate 81(tesscoord) BuiltIn TessCoord - Decorate 91(@entryPointOutput.pos) Location 0 - Decorate 95(@entryPointOutput.norm) Location 1 + Decorate 78(i.pos) Location 0 + Decorate 85(i.norm) Location 1 + Decorate 103(tesscoord) Patch + Decorate 103(tesscoord) BuiltIn TessCoord + Decorate 113(@entryPointOutput.pos) Location 0 + Decorate 117(@entryPointOutput.norm) Location 1 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -368,22 +512,27 @@ triangle order = none 67(pcf_data.flInsideTessFactor): 66(ptr) Variable Input 71(pcf_data.foo): 53(ptr) Variable Input 74: TypePointer Function 15 - 76: TypePointer Input 15 - 77(i): 76(ptr) Variable Input - 80: TypePointer Input 13(fvec3) - 81(tesscoord): 80(ptr) Variable Input - 90: TypePointer Output 12(fvec4) -91(@entryPointOutput.pos): 90(ptr) Variable Output - 94: TypePointer Output 13(fvec3) -95(@entryPointOutput.norm): 94(ptr) Variable Output + 76: TypeArray 12(fvec4) 8 + 77: TypePointer Input 76 + 78(i.pos): 77(ptr) Variable Input + 79: TypePointer Input 12(fvec4) + 83: TypeArray 13(fvec3) 8 + 84: TypePointer Input 83 + 85(i.norm): 84(ptr) Variable Input + 86: TypePointer Input 13(fvec3) + 103(tesscoord): 86(ptr) Variable Input + 112: TypePointer Output 12(fvec4) +113(@entryPointOutput.pos): 112(ptr) Variable Output + 116: TypePointer Output 13(fvec3) +117(@entryPointOutput.norm): 116(ptr) Variable Output 4(main): 2 Function None 3 5: Label 48(pcf_data): 11(ptr) Variable Function 75(i): 74(ptr) Variable Function - 79(tesscoord): 16(ptr) Variable Function - 83(flattenTemp): 24(ptr) Variable Function - 85(param): 11(ptr) Variable Function - 87(param): 16(ptr) Variable Function + 102(tesscoord): 16(ptr) Variable Function +105(flattenTemp): 24(ptr) Variable Function + 107(param): 11(ptr) Variable Function + 109(param): 16(ptr) Variable Function 54: 53(ptr) AccessChain 52(pcf_data.flTessFactor) 27 55: 6(float) Load 54 56: 30(ptr) AccessChain 48(pcf_data) 27 27 @@ -403,23 +552,45 @@ triangle order = none 72: 6(float) Load 71(pcf_data.foo) 73: 30(ptr) AccessChain 48(pcf_data) 60 Store 73 72 - 78: 15 Load 77(i) - Store 75(i) 78 - 82: 13(fvec3) Load 81(tesscoord) - Store 79(tesscoord) 82 - 84: 15 Load 75(i) - 86:10(pcf_in_t) Load 48(pcf_data) - Store 85(param) 86 - 88: 13(fvec3) Load 79(tesscoord) - Store 87(param) 88 - 89: 17(gs_in_t) FunctionCall 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;) 85(param) 84 87(param) - Store 83(flattenTemp) 89 - 92: 35(ptr) AccessChain 83(flattenTemp) 27 - 93: 12(fvec4) Load 92 - Store 91(@entryPointOutput.pos) 93 - 96: 16(ptr) AccessChain 83(flattenTemp) 37 - 97: 13(fvec3) Load 96 - Store 95(@entryPointOutput.norm) 97 + 80: 79(ptr) AccessChain 78(i.pos) 27 + 81: 12(fvec4) Load 80 + 82: 35(ptr) AccessChain 75(i) 27 27 + Store 82 81 + 87: 86(ptr) AccessChain 85(i.norm) 27 + 88: 13(fvec3) Load 87 + 89: 16(ptr) AccessChain 75(i) 27 37 + Store 89 88 + 90: 79(ptr) AccessChain 78(i.pos) 37 + 91: 12(fvec4) Load 90 + 92: 35(ptr) AccessChain 75(i) 37 27 + Store 92 91 + 93: 86(ptr) AccessChain 85(i.norm) 37 + 94: 13(fvec3) Load 93 + 95: 16(ptr) AccessChain 75(i) 37 37 + Store 95 94 + 96: 79(ptr) AccessChain 78(i.pos) 60 + 97: 12(fvec4) Load 96 + 98: 35(ptr) AccessChain 75(i) 60 27 + Store 98 97 + 99: 86(ptr) AccessChain 85(i.norm) 60 + 100: 13(fvec3) Load 99 + 101: 16(ptr) AccessChain 75(i) 60 37 + Store 101 100 + 104: 13(fvec3) Load 103(tesscoord) + Store 102(tesscoord) 104 + 106: 15 Load 75(i) + 108:10(pcf_in_t) Load 48(pcf_data) + Store 107(param) 108 + 110: 13(fvec3) Load 102(tesscoord) + Store 109(param) 110 + 111: 17(gs_in_t) FunctionCall 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;) 107(param) 106 109(param) + Store 105(flattenTemp) 111 + 114: 35(ptr) AccessChain 105(flattenTemp) 27 + 115: 12(fvec4) Load 114 + Store 113(@entryPointOutput.pos) 115 + 118: 16(ptr) AccessChain 105(flattenTemp) 37 + 119: 13(fvec3) Load 118 + Store 117(@entryPointOutput.norm) 119 Return FunctionEnd 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;): 17(gs_in_t) Function None 18 diff --git a/Test/baseResults/hlsl.domain.3.tese.out b/Test/baseResults/hlsl.domain.3.tese.out index 4b8584c9d6..7a6ef1b6d0 100644 --- a/Test/baseResults/hlsl.domain.3.tese.out +++ b/Test/baseResults/hlsl.domain.3.tese.out @@ -49,9 +49,55 @@ triangle order = none 0:24 Function Definition: main( ( temp void) 0:24 Function Parameters: 0:? Sequence -0:24 move second child to first child ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Sequence +0:24 move second child to first child ( temp 4-component vector of float) +0:24 pos: direct index for structure ( temp 4-component vector of float) +0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 0 (const int) +0:24 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 2-element array of 4-component vector of float) +0:24 Constant: +0:24 0 (const int) +0:24 move second child to first child ( temp 3-component vector of float) +0:24 norm: direct index for structure ( temp 3-component vector of float) +0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 1 (const int) +0:24 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 2-element array of 3-component vector of float) +0:24 Constant: +0:24 0 (const int) +0:24 move second child to first child ( temp 4-component vector of float) +0:24 pos: direct index for structure ( temp 4-component vector of float) +0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Constant: +0:24 1 (const int) +0:24 Constant: +0:24 0 (const int) +0:24 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 2-element array of 4-component vector of float) +0:24 Constant: +0:24 1 (const int) +0:24 move second child to first child ( temp 3-component vector of float) +0:24 norm: direct index for structure ( temp 3-component vector of float) +0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Constant: +0:24 1 (const int) +0:24 Constant: +0:24 1 (const int) +0:24 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 2-element array of 3-component vector of float) +0:24 Constant: +0:24 1 (const int) 0:24 move second child to first child ( temp 2-component vector of float) 0:? 'tesscoord' ( temp 2-component vector of float) 0:? Construct vec2 ( temp 2-component vector of float) @@ -124,7 +170,8 @@ triangle order = none 0:? Linker Objects 0:? '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float) -0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i.pos' (layout( location=0) in 2-element array of 4-component vector of float) +0:? 'i.norm' (layout( location=1) in 2-element array of 3-component vector of float) 0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 0:? 'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter) 0:? 'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) @@ -183,9 +230,55 @@ triangle order = none 0:24 Function Definition: main( ( temp void) 0:24 Function Parameters: 0:? Sequence -0:24 move second child to first child ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) -0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Sequence +0:24 move second child to first child ( temp 4-component vector of float) +0:24 pos: direct index for structure ( temp 4-component vector of float) +0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 0 (const int) +0:24 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 2-element array of 4-component vector of float) +0:24 Constant: +0:24 0 (const int) +0:24 move second child to first child ( temp 3-component vector of float) +0:24 norm: direct index for structure ( temp 3-component vector of float) +0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 1 (const int) +0:24 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 2-element array of 3-component vector of float) +0:24 Constant: +0:24 0 (const int) +0:24 move second child to first child ( temp 4-component vector of float) +0:24 pos: direct index for structure ( temp 4-component vector of float) +0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Constant: +0:24 1 (const int) +0:24 Constant: +0:24 0 (const int) +0:24 direct index (layout( location=0) in 4-component vector of float) +0:? 'i.pos' (layout( location=0) in 2-element array of 4-component vector of float) +0:24 Constant: +0:24 1 (const int) +0:24 move second child to first child ( temp 3-component vector of float) +0:24 norm: direct index for structure ( temp 3-component vector of float) +0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:24 Constant: +0:24 1 (const int) +0:24 Constant: +0:24 1 (const int) +0:24 direct index (layout( location=1) in 3-component vector of float) +0:? 'i.norm' (layout( location=1) in 2-element array of 3-component vector of float) +0:24 Constant: +0:24 1 (const int) 0:24 move second child to first child ( temp 2-component vector of float) 0:? 'tesscoord' ( temp 2-component vector of float) 0:? Construct vec2 ( temp 2-component vector of float) @@ -258,19 +351,20 @@ triangle order = none 0:? Linker Objects 0:? '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float) -0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) +0:? 'i.pos' (layout( location=0) in 2-element array of 4-component vector of float) +0:? 'i.norm' (layout( location=1) in 2-element array of 3-component vector of float) 0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 0:? 'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter) 0:? 'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 100 +// Id's are bound by 116 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationEvaluation 4 "main" 54 58 67 81 93 97 + EntryPoint TessellationEvaluation 4 "main" 55 62 74 83 97 109 113 ExecutionMode 4 Isolines Source HLSL 500 Name 4 "main" @@ -289,26 +383,28 @@ triangle order = none Name 23 "pcf_data" Name 27 "o" Name 52 "i" - Name 54 "i" - Name 56 "tesscoord" - Name 58 "tesscoord" - Name 63 "pcf_data" - Name 67 "pcf_data.flTessFactor" - Name 81 "pcf_data.flInsideTessFactor" - Name 85 "flattenTemp" - Name 87 "param" - Name 89 "param" - Name 93 "@entryPointOutput.pos" - Name 97 "@entryPointOutput.norm" - Decorate 54(i) Location 0 - Decorate 58(tesscoord) Patch - Decorate 58(tesscoord) BuiltIn TessCoord - Decorate 67(pcf_data.flTessFactor) Patch - Decorate 67(pcf_data.flTessFactor) BuiltIn TessLevelOuter - Decorate 81(pcf_data.flInsideTessFactor) Patch - Decorate 81(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner - Decorate 93(@entryPointOutput.pos) Location 0 - Decorate 97(@entryPointOutput.norm) Location 1 + Name 55 "i.pos" + Name 62 "i.norm" + Name 73 "tesscoord" + Name 74 "tesscoord" + Name 79 "pcf_data" + Name 83 "pcf_data.flTessFactor" + Name 97 "pcf_data.flInsideTessFactor" + Name 101 "flattenTemp" + Name 103 "param" + Name 105 "param" + Name 109 "@entryPointOutput.pos" + Name 113 "@entryPointOutput.norm" + Decorate 55(i.pos) Location 0 + Decorate 62(i.norm) Location 1 + Decorate 74(tesscoord) Patch + Decorate 74(tesscoord) BuiltIn TessCoord + Decorate 83(pcf_data.flTessFactor) Patch + Decorate 83(pcf_data.flTessFactor) BuiltIn TessLevelOuter + Decorate 97(pcf_data.flInsideTessFactor) Patch + Decorate 97(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner + Decorate 109(@entryPointOutput.pos) Location 0 + Decorate 113(@entryPointOutput.norm) Location 1 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -336,67 +432,86 @@ triangle order = none 41: 10(int) Constant 1 46: TypePointer Function 8(fvec3) 51: TypePointer Function 12 - 53: TypePointer Input 12 - 54(i): 53(ptr) Variable Input - 57: TypePointer Input 8(fvec3) - 58(tesscoord): 57(ptr) Variable Input - 64: 10(int) Constant 4 - 65: TypeArray 6(float) 64 - 66: TypePointer Input 65 -67(pcf_data.flTessFactor): 66(ptr) Variable Input - 68: TypePointer Input 6(float) - 75: 28(int) Constant 2 - 79: TypeArray 6(float) 11 - 80: TypePointer Input 79 -81(pcf_data.flInsideTessFactor): 80(ptr) Variable Input - 92: TypePointer Output 7(fvec4) -93(@entryPointOutput.pos): 92(ptr) Variable Output - 96: TypePointer Output 8(fvec3) -97(@entryPointOutput.norm): 96(ptr) Variable Output + 53: TypeArray 7(fvec4) 11 + 54: TypePointer Input 53 + 55(i.pos): 54(ptr) Variable Input + 56: TypePointer Input 7(fvec4) + 60: TypeArray 8(fvec3) 11 + 61: TypePointer Input 60 + 62(i.norm): 61(ptr) Variable Input + 63: TypePointer Input 8(fvec3) + 74(tesscoord): 63(ptr) Variable Input + 80: 10(int) Constant 4 + 81: TypeArray 6(float) 80 + 82: TypePointer Input 81 +83(pcf_data.flTessFactor): 82(ptr) Variable Input + 84: TypePointer Input 6(float) + 91: 28(int) Constant 2 + 95: TypeArray 6(float) 11 + 96: TypePointer Input 95 +97(pcf_data.flInsideTessFactor): 96(ptr) Variable Input + 108: TypePointer Output 7(fvec4) +109(@entryPointOutput.pos): 108(ptr) Variable Output + 112: TypePointer Output 8(fvec3) +113(@entryPointOutput.norm): 112(ptr) Variable Output 4(main): 2 Function None 3 5: Label 52(i): 51(ptr) Variable Function - 56(tesscoord): 14(ptr) Variable Function - 63(pcf_data): 18(ptr) Variable Function - 85(flattenTemp): 26(ptr) Variable Function - 87(param): 14(ptr) Variable Function - 89(param): 18(ptr) Variable Function - 55: 12 Load 54(i) - Store 52(i) 55 - 59: 8(fvec3) Load 58(tesscoord) - 60: 6(float) CompositeExtract 59 0 - 61: 6(float) CompositeExtract 59 1 - 62: 13(fvec2) CompositeConstruct 60 61 - Store 56(tesscoord) 62 - 69: 68(ptr) AccessChain 67(pcf_data.flTessFactor) 29 - 70: 6(float) Load 69 - 71: 32(ptr) AccessChain 63(pcf_data) 29 29 - Store 71 70 - 72: 68(ptr) AccessChain 67(pcf_data.flTessFactor) 39 - 73: 6(float) Load 72 - 74: 32(ptr) AccessChain 63(pcf_data) 29 39 - Store 74 73 - 76: 68(ptr) AccessChain 67(pcf_data.flTessFactor) 75 - 77: 6(float) Load 76 - 78: 32(ptr) AccessChain 63(pcf_data) 29 75 - Store 78 77 - 82: 68(ptr) AccessChain 81(pcf_data.flInsideTessFactor) 29 - 83: 6(float) Load 82 - 84: 32(ptr) AccessChain 63(pcf_data) 39 - Store 84 83 - 86: 12 Load 52(i) - 88: 13(fvec2) Load 56(tesscoord) - Store 87(param) 88 - 90:17(pcf_in_t) Load 63(pcf_data) - Store 89(param) 90 - 91: 19(gs_in_t) FunctionCall 24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;) 86 87(param) 89(param) - Store 85(flattenTemp) 91 - 94: 37(ptr) AccessChain 85(flattenTemp) 29 - 95: 7(fvec4) Load 94 - Store 93(@entryPointOutput.pos) 95 - 98: 46(ptr) AccessChain 85(flattenTemp) 39 - 99: 8(fvec3) Load 98 - Store 97(@entryPointOutput.norm) 99 + 73(tesscoord): 14(ptr) Variable Function + 79(pcf_data): 18(ptr) Variable Function +101(flattenTemp): 26(ptr) Variable Function + 103(param): 14(ptr) Variable Function + 105(param): 18(ptr) Variable Function + 57: 56(ptr) AccessChain 55(i.pos) 29 + 58: 7(fvec4) Load 57 + 59: 37(ptr) AccessChain 52(i) 29 29 + Store 59 58 + 64: 63(ptr) AccessChain 62(i.norm) 29 + 65: 8(fvec3) Load 64 + 66: 46(ptr) AccessChain 52(i) 29 39 + Store 66 65 + 67: 56(ptr) AccessChain 55(i.pos) 39 + 68: 7(fvec4) Load 67 + 69: 37(ptr) AccessChain 52(i) 39 29 + Store 69 68 + 70: 63(ptr) AccessChain 62(i.norm) 39 + 71: 8(fvec3) Load 70 + 72: 46(ptr) AccessChain 52(i) 39 39 + Store 72 71 + 75: 8(fvec3) Load 74(tesscoord) + 76: 6(float) CompositeExtract 75 0 + 77: 6(float) CompositeExtract 75 1 + 78: 13(fvec2) CompositeConstruct 76 77 + Store 73(tesscoord) 78 + 85: 84(ptr) AccessChain 83(pcf_data.flTessFactor) 29 + 86: 6(float) Load 85 + 87: 32(ptr) AccessChain 79(pcf_data) 29 29 + Store 87 86 + 88: 84(ptr) AccessChain 83(pcf_data.flTessFactor) 39 + 89: 6(float) Load 88 + 90: 32(ptr) AccessChain 79(pcf_data) 29 39 + Store 90 89 + 92: 84(ptr) AccessChain 83(pcf_data.flTessFactor) 91 + 93: 6(float) Load 92 + 94: 32(ptr) AccessChain 79(pcf_data) 29 91 + Store 94 93 + 98: 84(ptr) AccessChain 97(pcf_data.flInsideTessFactor) 29 + 99: 6(float) Load 98 + 100: 32(ptr) AccessChain 79(pcf_data) 39 + Store 100 99 + 102: 12 Load 52(i) + 104: 13(fvec2) Load 73(tesscoord) + Store 103(param) 104 + 106:17(pcf_in_t) Load 79(pcf_data) + Store 105(param) 106 + 107: 19(gs_in_t) FunctionCall 24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;) 102 103(param) 105(param) + Store 101(flattenTemp) 107 + 110: 37(ptr) AccessChain 101(flattenTemp) 29 + 111: 7(fvec4) Load 110 + Store 109(@entryPointOutput.pos) 111 + 114: 46(ptr) AccessChain 101(flattenTemp) 39 + 115: 8(fvec3) Load 114 + Store 113(@entryPointOutput.norm) 115 Return FunctionEnd 24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;): 19(gs_in_t) Function None 20 diff --git a/Test/baseResults/hlsl.gs-hs-mix.tesc.out b/Test/baseResults/hlsl.gs-hs-mix.tesc.out index ffa96b1b1b..65bc44b6b1 100644 --- a/Test/baseResults/hlsl.gs-hs-mix.tesc.out +++ b/Test/baseResults/hlsl.gs-hs-mix.tesc.out @@ -135,19 +135,93 @@ triangle order = ccw 0:61 Function Definition: HSMain( ( temp void) 0:61 Function Parameters: 0:? Sequence -0:61 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) -0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) -0:? 'patch' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Sequence +0:61 move second child to first child ( temp 3-component vector of float) +0:61 PositionWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 0 (const int) +0:61 Constant: +0:61 0 (const int) +0:61 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.PositionWS' (layout( location=0) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 0 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 NormalWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 0 (const int) +0:61 Constant: +0:61 1 (const int) +0:61 direct index (layout( location=1) in 3-component vector of float) +0:? 'patch.NormalWS' (layout( location=1) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 0 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 PositionWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 1 (const int) +0:61 Constant: +0:61 0 (const int) +0:61 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.PositionWS' (layout( location=0) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 1 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 NormalWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 1 (const int) +0:61 Constant: +0:61 1 (const int) +0:61 direct index (layout( location=1) in 3-component vector of float) +0:? 'patch.NormalWS' (layout( location=1) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 1 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 PositionWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 2 (const int) +0:61 Constant: +0:61 0 (const int) +0:61 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.PositionWS' (layout( location=0) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 2 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 NormalWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 2 (const int) +0:61 Constant: +0:61 1 (const int) +0:61 direct index (layout( location=1) in 3-component vector of float) +0:? 'patch.NormalWS' (layout( location=1) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 2 (const int) 0:61 move second child to first child ( temp uint) 0:? 'id' ( temp uint) 0:? 'id' ( in uint InvocationID) -0:61 move second child to first child ( temp structure{ temp 3-component vector of float PositionWS}) -0:61 indirect index (layout( location=0) out structure{ temp 3-component vector of float PositionWS}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float PositionWS}) -0:? 'id' ( in uint InvocationID) -0:61 Function Call: @HSMain(struct-HSInput-vf3-vf31[3];u1; ( temp structure{ temp 3-component vector of float PositionWS}) -0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) -0:? 'id' ( temp uint) +0:61 Sequence +0:61 move second child to first child ( temp 3-component vector of float) +0:61 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.PositionWS' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'id' ( in uint InvocationID) +0:61 PositionWS: direct index for structure ( temp 3-component vector of float) +0:61 Function Call: @HSMain(struct-HSInput-vf3-vf31[3];u1; ( temp structure{ temp 3-component vector of float PositionWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'id' ( temp uint) +0:61 Constant: +0:61 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -207,13 +281,31 @@ triangle order = ccw 0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) 0:? Constant: 0:? 1 (const int) -0:? move second child to first child ( temp 3-element array of 3-component vector of float) -0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) -0:? '@patchConstantOutput' (layout( location=1) patch out structure{ temp 3-element array of 3-component vector of float NormalWS}) +0:? move second child to first child ( temp 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[0]' (layout( location=1) patch out 3-component vector of float) +0:? direct index ( temp 3-component vector of float) +0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) +0:? Constant: +0:? 2 (const int) 0:? Constant: 0:? 0 (const int) -0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) -0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) +0:? move second child to first child ( temp 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[1]' (layout( location=2) patch out 3-component vector of float) +0:? direct index ( temp 3-component vector of float) +0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) +0:? Constant: +0:? 2 (const int) +0:? Constant: +0:? 1 (const int) +0:? move second child to first child ( temp 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[2]' (layout( location=3) patch out 3-component vector of float) +0:? direct index ( temp 3-component vector of float) +0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) +0:? Constant: +0:? 2 (const int) 0:? Constant: 0:? 2 (const int) 0:84 Function Definition: GSMain(struct-GSVertexInput-vf3-vf31[3];struct-GSVertexOutput-vf41; ( temp void) @@ -388,12 +480,15 @@ triangle order = ccw 0:118 0.000000 0:? Linker Objects 0:? 'anon@0' (layout( binding=0 row_major std140) uniform block{layout( row_major std140) uniform 4X4 matrix of float model_view_matrix, layout( row_major std140) uniform 4X4 matrix of float proj_matrix, layout( row_major std140) uniform 4X4 matrix of float model_view_proj_matrix, layout( row_major std140) uniform 3X3 matrix of float normal_matrix, layout( row_major std140) uniform 3-component vector of float color, layout( row_major std140) uniform 3-component vector of float view_dir, layout( row_major std140) uniform 3-component vector of float tess_factor}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float PositionWS}) -0:? 'patch' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? '@entryPointOutput.PositionWS' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'patch.PositionWS' (layout( location=0) in 3-element array of 3-component vector of float) +0:? 'patch.NormalWS' (layout( location=1) in 3-element array of 3-component vector of float) 0:? 'id' ( in uint InvocationID) 0:? '@patchConstantOutput.EdgeTessFactor' ( patch out 4-element array of float TessLevelOuter) 0:? '@patchConstantOutput.InsideTessFactor' ( patch out 2-element array of float TessLevelInner) -0:? '@patchConstantOutput' (layout( location=1) patch out structure{ temp 3-element array of 3-component vector of float NormalWS}) +0:? '@patchConstantOutput.NormalWS[0]' (layout( location=1) patch out 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[1]' (layout( location=2) patch out 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[2]' (layout( location=3) patch out 3-component vector of float) Linked tessellation control stage: @@ -535,19 +630,93 @@ triangle order = ccw 0:61 Function Definition: HSMain( ( temp void) 0:61 Function Parameters: 0:? Sequence -0:61 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) -0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) -0:? 'patch' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Sequence +0:61 move second child to first child ( temp 3-component vector of float) +0:61 PositionWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 0 (const int) +0:61 Constant: +0:61 0 (const int) +0:61 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.PositionWS' (layout( location=0) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 0 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 NormalWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 0 (const int) +0:61 Constant: +0:61 1 (const int) +0:61 direct index (layout( location=1) in 3-component vector of float) +0:? 'patch.NormalWS' (layout( location=1) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 0 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 PositionWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 1 (const int) +0:61 Constant: +0:61 0 (const int) +0:61 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.PositionWS' (layout( location=0) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 1 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 NormalWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 1 (const int) +0:61 Constant: +0:61 1 (const int) +0:61 direct index (layout( location=1) in 3-component vector of float) +0:? 'patch.NormalWS' (layout( location=1) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 1 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 PositionWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 2 (const int) +0:61 Constant: +0:61 0 (const int) +0:61 direct index (layout( location=0) in 3-component vector of float) +0:? 'patch.PositionWS' (layout( location=0) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 2 (const int) +0:61 move second child to first child ( temp 3-component vector of float) +0:61 NormalWS: direct index for structure ( temp 3-component vector of float) +0:61 direct index ( temp structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:61 Constant: +0:61 2 (const int) +0:61 Constant: +0:61 1 (const int) +0:61 direct index (layout( location=1) in 3-component vector of float) +0:? 'patch.NormalWS' (layout( location=1) in 3-element array of 3-component vector of float) +0:61 Constant: +0:61 2 (const int) 0:61 move second child to first child ( temp uint) 0:? 'id' ( temp uint) 0:? 'id' ( in uint InvocationID) -0:61 move second child to first child ( temp structure{ temp 3-component vector of float PositionWS}) -0:61 indirect index (layout( location=0) out structure{ temp 3-component vector of float PositionWS}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float PositionWS}) -0:? 'id' ( in uint InvocationID) -0:61 Function Call: @HSMain(struct-HSInput-vf3-vf31[3];u1; ( temp structure{ temp 3-component vector of float PositionWS}) -0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) -0:? 'id' ( temp uint) +0:61 Sequence +0:61 move second child to first child ( temp 3-component vector of float) +0:61 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.PositionWS' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'id' ( in uint InvocationID) +0:61 PositionWS: direct index for structure ( temp 3-component vector of float) +0:61 Function Call: @HSMain(struct-HSInput-vf3-vf31[3];u1; ( temp structure{ temp 3-component vector of float PositionWS}) +0:? 'patch' ( temp 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? 'id' ( temp uint) +0:61 Constant: +0:61 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -607,13 +776,31 @@ triangle order = ccw 0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) 0:? Constant: 0:? 1 (const int) -0:? move second child to first child ( temp 3-element array of 3-component vector of float) -0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) -0:? '@patchConstantOutput' (layout( location=1) patch out structure{ temp 3-element array of 3-component vector of float NormalWS}) +0:? move second child to first child ( temp 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[0]' (layout( location=1) patch out 3-component vector of float) +0:? direct index ( temp 3-component vector of float) +0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) +0:? Constant: +0:? 2 (const int) 0:? Constant: 0:? 0 (const int) -0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) -0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) +0:? move second child to first child ( temp 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[1]' (layout( location=2) patch out 3-component vector of float) +0:? direct index ( temp 3-component vector of float) +0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) +0:? Constant: +0:? 2 (const int) +0:? Constant: +0:? 1 (const int) +0:? move second child to first child ( temp 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[2]' (layout( location=3) patch out 3-component vector of float) +0:? direct index ( temp 3-component vector of float) +0:? NormalWS: direct index for structure ( temp 3-element array of 3-component vector of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float EdgeTessFactor, temp float InsideTessFactor, temp 3-element array of 3-component vector of float NormalWS}) +0:? Constant: +0:? 2 (const int) 0:? Constant: 0:? 2 (const int) 0:84 Function Definition: GSMain(struct-GSVertexInput-vf3-vf31[3];struct-GSVertexOutput-vf41; ( temp void) @@ -788,21 +975,24 @@ triangle order = ccw 0:118 0.000000 0:? Linker Objects 0:? 'anon@0' (layout( binding=0 row_major std140) uniform block{layout( row_major std140) uniform 4X4 matrix of float model_view_matrix, layout( row_major std140) uniform 4X4 matrix of float proj_matrix, layout( row_major std140) uniform 4X4 matrix of float model_view_proj_matrix, layout( row_major std140) uniform 3X3 matrix of float normal_matrix, layout( row_major std140) uniform 3-component vector of float color, layout( row_major std140) uniform 3-component vector of float view_dir, layout( row_major std140) uniform 3-component vector of float tess_factor}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float PositionWS}) -0:? 'patch' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float PositionWS, temp 3-component vector of float NormalWS}) +0:? '@entryPointOutput.PositionWS' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'patch.PositionWS' (layout( location=0) in 3-element array of 3-component vector of float) +0:? 'patch.NormalWS' (layout( location=1) in 3-element array of 3-component vector of float) 0:? 'id' ( in uint InvocationID) 0:? '@patchConstantOutput.EdgeTessFactor' ( patch out 4-element array of float TessLevelOuter) 0:? '@patchConstantOutput.InsideTessFactor' ( patch out 2-element array of float TessLevelInner) -0:? '@patchConstantOutput' (layout( location=1) patch out structure{ temp 3-element array of 3-component vector of float NormalWS}) +0:? '@patchConstantOutput.NormalWS[0]' (layout( location=1) patch out 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[1]' (layout( location=2) patch out 3-component vector of float) +0:? '@patchConstantOutput.NormalWS[2]' (layout( location=3) patch out 3-component vector of float) // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 216 +// Id's are bound by 236 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "HSMain" 97 101 105 126 139 145 + EntryPoint TessellationControl 4 "HSMain" 97 102 120 123 145 158 162 165 168 ExecutionMode 4 OutputVertices 3 ExecutionMode 4 Triangles ExecutionMode 4 SpacingFractionalOdd @@ -846,26 +1036,27 @@ triangle order = ccw Name 56 "result" Name 87 "output" Name 95 "patch" - Name 97 "patch" - Name 99 "id" - Name 101 "id" - Name 105 "@entryPointOutput" - Name 107 "param" - Name 109 "param" - Name 120 "@patchConstantResult" - Name 121 "param" - Name 126 "@patchConstantOutput.EdgeTessFactor" - Name 139 "@patchConstantOutput.InsideTessFactor" - Name 143 "HSTrianglePatchConstant" - MemberName 143(HSTrianglePatchConstant) 0 "NormalWS" - Name 145 "@patchConstantOutput" - Name 151 "P0" - Name 154 "P1" - Name 157 "P2" - Name 174 "Q0" - Name 184 "Q1" - Name 193 "Q2" - Name 202 "vertex" + Name 97 "patch.PositionWS" + Name 102 "patch.NormalWS" + Name 118 "id" + Name 120 "id" + Name 123 "@entryPointOutput.PositionWS" + Name 125 "param" + Name 127 "param" + Name 139 "@patchConstantResult" + Name 140 "param" + Name 145 "@patchConstantOutput.EdgeTessFactor" + Name 158 "@patchConstantOutput.InsideTessFactor" + Name 162 "@patchConstantOutput.NormalWS[0]" + Name 165 "@patchConstantOutput.NormalWS[1]" + Name 168 "@patchConstantOutput.NormalWS[2]" + Name 171 "P0" + Name 174 "P1" + Name 177 "P2" + Name 194 "Q0" + Name 204 "Q1" + Name 213 "Q2" + Name 222 "vertex" MemberDecorate 42(UniformBlock0) 0 RowMajor MemberDecorate 42(UniformBlock0) 0 Offset 0 MemberDecorate 42(UniformBlock0) 0 MatrixStride 16 @@ -884,16 +1075,20 @@ triangle order = ccw Decorate 42(UniformBlock0) Block Decorate 44 DescriptorSet 0 Decorate 44 Binding 0 - Decorate 97(patch) Location 0 - Decorate 101(id) BuiltIn InvocationId - Decorate 105(@entryPointOutput) Location 0 - Decorate 126(@patchConstantOutput.EdgeTessFactor) Patch - Decorate 126(@patchConstantOutput.EdgeTessFactor) BuiltIn TessLevelOuter - Decorate 139(@patchConstantOutput.InsideTessFactor) Patch - Decorate 139(@patchConstantOutput.InsideTessFactor) BuiltIn TessLevelInner - MemberDecorate 143(HSTrianglePatchConstant) 0 Patch - Decorate 145(@patchConstantOutput) Patch - Decorate 145(@patchConstantOutput) Location 1 + Decorate 97(patch.PositionWS) Location 0 + Decorate 102(patch.NormalWS) Location 1 + Decorate 120(id) BuiltIn InvocationId + Decorate 123(@entryPointOutput.PositionWS) Location 0 + Decorate 145(@patchConstantOutput.EdgeTessFactor) Patch + Decorate 145(@patchConstantOutput.EdgeTessFactor) BuiltIn TessLevelOuter + Decorate 158(@patchConstantOutput.InsideTessFactor) Patch + Decorate 158(@patchConstantOutput.InsideTessFactor) BuiltIn TessLevelInner + Decorate 162(@patchConstantOutput.NormalWS[0]) Patch + Decorate 162(@patchConstantOutput.NormalWS[0]) Location 1 + Decorate 165(@patchConstantOutput.NormalWS[1]) Patch + Decorate 165(@patchConstantOutput.NormalWS[1]) Location 2 + Decorate 168(@patchConstantOutput.NormalWS[2]) Patch + Decorate 168(@patchConstantOutput.NormalWS[2]) Location 3 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -937,84 +1132,111 @@ triangle order = ccw 67: 45(int) Constant 2 68: 9(int) Constant 2 86: TypePointer Function 21(HSOutput) - 96: TypePointer Input 11 - 97(patch): 96(ptr) Variable Input - 100: TypePointer Input 9(int) - 101(id): 100(ptr) Variable Input - 103: TypeArray 21(HSOutput) 10 - 104: TypePointer Output 103 -105(@entryPointOutput): 104(ptr) Variable Output - 112: TypePointer Output 21(HSOutput) - 114: 9(int) Constant 4 - 116: TypeBool - 124: TypeArray 6(float) 114 - 125: TypePointer Output 124 -126(@patchConstantOutput.EdgeTessFactor): 125(ptr) Variable Output - 129: TypePointer Output 6(float) - 137: TypeArray 6(float) 68 - 138: TypePointer Output 137 -139(@patchConstantOutput.InsideTessFactor): 138(ptr) Variable Output -143(HSTrianglePatchConstant): TypeStruct 14 - 144: TypePointer Output 143(HSTrianglePatchConstant) -145(@patchConstantOutput): 144(ptr) Variable Output - 146: TypePointer Function 14 - 149: TypePointer Output 14 - 160: 6(float) Constant 981668463 - 173: TypePointer Function 30(fvec4) - 180: TypePointer Uniform 40 - 205: 6(float) Constant 0 + 96: TypePointer Input 14 +97(patch.PositionWS): 96(ptr) Variable Input + 98: TypePointer Input 7(fvec3) +102(patch.NormalWS): 96(ptr) Variable Input + 119: TypePointer Input 9(int) + 120(id): 119(ptr) Variable Input + 122: TypePointer Output 14 +123(@entryPointOutput.PositionWS): 122(ptr) Variable Output + 131: TypePointer Output 7(fvec3) + 133: 9(int) Constant 4 + 135: TypeBool + 143: TypeArray 6(float) 133 + 144: TypePointer Output 143 +145(@patchConstantOutput.EdgeTessFactor): 144(ptr) Variable Output + 148: TypePointer Output 6(float) + 156: TypeArray 6(float) 68 + 157: TypePointer Output 156 +158(@patchConstantOutput.InsideTessFactor): 157(ptr) Variable Output +162(@patchConstantOutput.NormalWS[0]): 131(ptr) Variable Output +165(@patchConstantOutput.NormalWS[1]): 131(ptr) Variable Output +168(@patchConstantOutput.NormalWS[2]): 131(ptr) Variable Output + 180: 6(float) Constant 981668463 + 193: TypePointer Function 30(fvec4) + 200: TypePointer Uniform 40 + 225: 6(float) Constant 0 4(HSMain): 2 Function None 3 5: Label 95(patch): 12(ptr) Variable Function - 99(id): 20(ptr) Variable Function - 107(param): 12(ptr) Variable Function - 109(param): 20(ptr) Variable Function -120(@patchConstantResult): 55(ptr) Variable Function - 121(param): 12(ptr) Variable Function - 98: 11 Load 97(patch) - Store 95(patch) 98 - 102: 9(int) Load 101(id) - Store 99(id) 102 - 106: 9(int) Load 101(id) - 108: 11 Load 95(patch) - Store 107(param) 108 - 110: 9(int) Load 99(id) - Store 109(param) 110 - 111:21(HSOutput) FunctionCall 25(@HSMain(struct-HSInput-vf3-vf31[3];u1;) 107(param) 109(param) - 113: 112(ptr) AccessChain 105(@entryPointOutput) 106 - Store 113 111 - ControlBarrier 68 114 58 - 115: 9(int) Load 101(id) - 117: 116(bool) IEqual 115 57 - SelectionMerge 119 None - BranchConditional 117 118 119 - 118: Label - 122: 11 Load 95(patch) - Store 121(param) 122 - 123:15(HSTrianglePatchConstant) FunctionCall 18(HSPatchConstant(struct-HSInput-vf3-vf31[3];) 121(param) - Store 120(@patchConstantResult) 123 - 127: 50(ptr) AccessChain 120(@patchConstantResult) 57 57 - 128: 6(float) Load 127 - 130: 129(ptr) AccessChain 126(@patchConstantOutput.EdgeTessFactor) 57 - Store 130 128 - 131: 50(ptr) AccessChain 120(@patchConstantResult) 57 62 - 132: 6(float) Load 131 - 133: 129(ptr) AccessChain 126(@patchConstantOutput.EdgeTessFactor) 62 - Store 133 132 - 134: 50(ptr) AccessChain 120(@patchConstantResult) 57 67 - 135: 6(float) Load 134 - 136: 129(ptr) AccessChain 126(@patchConstantOutput.EdgeTessFactor) 67 - Store 136 135 - 140: 50(ptr) AccessChain 120(@patchConstantResult) 62 - 141: 6(float) Load 140 - 142: 129(ptr) AccessChain 139(@patchConstantOutput.InsideTessFactor) 57 - Store 142 141 - 147: 146(ptr) AccessChain 120(@patchConstantResult) 67 - 148: 14 Load 147 - 150: 149(ptr) AccessChain 145(@patchConstantOutput) 57 - Store 150 148 - Branch 119 - 119: Label + 118(id): 20(ptr) Variable Function + 125(param): 12(ptr) Variable Function + 127(param): 20(ptr) Variable Function +139(@patchConstantResult): 55(ptr) Variable Function + 140(param): 12(ptr) Variable Function + 99: 98(ptr) AccessChain 97(patch.PositionWS) 57 + 100: 7(fvec3) Load 99 + 101: 38(ptr) AccessChain 95(patch) 57 57 + Store 101 100 + 103: 98(ptr) AccessChain 102(patch.NormalWS) 57 + 104: 7(fvec3) Load 103 + 105: 38(ptr) AccessChain 95(patch) 57 62 + Store 105 104 + 106: 98(ptr) AccessChain 97(patch.PositionWS) 62 + 107: 7(fvec3) Load 106 + 108: 38(ptr) AccessChain 95(patch) 62 57 + Store 108 107 + 109: 98(ptr) AccessChain 102(patch.NormalWS) 62 + 110: 7(fvec3) Load 109 + 111: 38(ptr) AccessChain 95(patch) 62 62 + Store 111 110 + 112: 98(ptr) AccessChain 97(patch.PositionWS) 67 + 113: 7(fvec3) Load 112 + 114: 38(ptr) AccessChain 95(patch) 67 57 + Store 114 113 + 115: 98(ptr) AccessChain 102(patch.NormalWS) 67 + 116: 7(fvec3) Load 115 + 117: 38(ptr) AccessChain 95(patch) 67 62 + Store 117 116 + 121: 9(int) Load 120(id) + Store 118(id) 121 + 124: 9(int) Load 120(id) + 126: 11 Load 95(patch) + Store 125(param) 126 + 128: 9(int) Load 118(id) + Store 127(param) 128 + 129:21(HSOutput) FunctionCall 25(@HSMain(struct-HSInput-vf3-vf31[3];u1;) 125(param) 127(param) + 130: 7(fvec3) CompositeExtract 129 0 + 132: 131(ptr) AccessChain 123(@entryPointOutput.PositionWS) 124 + Store 132 130 + ControlBarrier 68 133 58 + 134: 9(int) Load 120(id) + 136: 135(bool) IEqual 134 57 + SelectionMerge 138 None + BranchConditional 136 137 138 + 137: Label + 141: 11 Load 95(patch) + Store 140(param) 141 + 142:15(HSTrianglePatchConstant) FunctionCall 18(HSPatchConstant(struct-HSInput-vf3-vf31[3];) 140(param) + Store 139(@patchConstantResult) 142 + 146: 50(ptr) AccessChain 139(@patchConstantResult) 57 57 + 147: 6(float) Load 146 + 149: 148(ptr) AccessChain 145(@patchConstantOutput.EdgeTessFactor) 57 + Store 149 147 + 150: 50(ptr) AccessChain 139(@patchConstantResult) 57 62 + 151: 6(float) Load 150 + 152: 148(ptr) AccessChain 145(@patchConstantOutput.EdgeTessFactor) 62 + Store 152 151 + 153: 50(ptr) AccessChain 139(@patchConstantResult) 57 67 + 154: 6(float) Load 153 + 155: 148(ptr) AccessChain 145(@patchConstantOutput.EdgeTessFactor) 67 + Store 155 154 + 159: 50(ptr) AccessChain 139(@patchConstantResult) 62 + 160: 6(float) Load 159 + 161: 148(ptr) AccessChain 158(@patchConstantOutput.InsideTessFactor) 57 + Store 161 160 + 163: 38(ptr) AccessChain 139(@patchConstantResult) 67 57 + 164: 7(fvec3) Load 163 + Store 162(@patchConstantOutput.NormalWS[0]) 164 + 166: 38(ptr) AccessChain 139(@patchConstantResult) 67 62 + 167: 7(fvec3) Load 166 + Store 165(@patchConstantOutput.NormalWS[1]) 167 + 169: 38(ptr) AccessChain 139(@patchConstantResult) 67 67 + 170: 7(fvec3) Load 169 + Store 168(@patchConstantOutput.NormalWS[2]) 170 + Branch 138 + 138: Label Return FunctionEnd 18(HSPatchConstant(struct-HSInput-vf3-vf31[3];):15(HSTrianglePatchConstant) Function None 16 @@ -1076,81 +1298,81 @@ triangle order = ccw 34(input): 29(ptr) FunctionParameter 35(output): 32(ptr) FunctionParameter 37: Label - 151(P0): 38(ptr) Variable Function - 154(P1): 38(ptr) Variable Function - 157(P2): 38(ptr) Variable Function - 174(Q0): 173(ptr) Variable Function - 184(Q1): 173(ptr) Variable Function - 193(Q2): 173(ptr) Variable Function - 202(vertex): 32(ptr) Variable Function - 152: 38(ptr) AccessChain 34(input) 57 57 - 153: 7(fvec3) Load 152 - Store 151(P0) 153 - 155: 38(ptr) AccessChain 34(input) 62 57 - 156: 7(fvec3) Load 155 - Store 154(P1) 156 - 158: 38(ptr) AccessChain 34(input) 67 57 - 159: 7(fvec3) Load 158 - Store 157(P2) 159 - 161: 50(ptr) AccessChain 151(P0) 68 - 162: 6(float) Load 161 - 163: 6(float) FAdd 162 160 - 164: 50(ptr) AccessChain 151(P0) 68 - Store 164 163 - 165: 50(ptr) AccessChain 154(P1) 68 - 166: 6(float) Load 165 - 167: 6(float) FAdd 166 160 - 168: 50(ptr) AccessChain 154(P1) 68 - Store 168 167 - 169: 50(ptr) AccessChain 157(P2) 68 - 170: 6(float) Load 169 - 171: 6(float) FAdd 170 160 - 172: 50(ptr) AccessChain 157(P2) 68 - Store 172 171 - 175: 7(fvec3) Load 151(P0) - 176: 6(float) CompositeExtract 175 0 - 177: 6(float) CompositeExtract 175 1 - 178: 6(float) CompositeExtract 175 2 - 179: 30(fvec4) CompositeConstruct 176 177 178 54 - 181: 180(ptr) AccessChain 44 62 - 182: 40 Load 181 - 183: 30(fvec4) VectorTimesMatrix 179 182 - Store 174(Q0) 183 - 185: 7(fvec3) Load 154(P1) - 186: 6(float) CompositeExtract 185 0 - 187: 6(float) CompositeExtract 185 1 - 188: 6(float) CompositeExtract 185 2 - 189: 30(fvec4) CompositeConstruct 186 187 188 54 - 190: 180(ptr) AccessChain 44 62 - 191: 40 Load 190 - 192: 30(fvec4) VectorTimesMatrix 189 191 - Store 184(Q1) 192 - 194: 7(fvec3) Load 157(P2) - 195: 6(float) CompositeExtract 194 0 - 196: 6(float) CompositeExtract 194 1 - 197: 6(float) CompositeExtract 194 2 - 198: 30(fvec4) CompositeConstruct 195 196 197 54 - 199: 180(ptr) AccessChain 44 62 - 200: 40 Load 199 - 201: 30(fvec4) VectorTimesMatrix 198 200 - Store 193(Q2) 201 - 203: 30(fvec4) Load 174(Q0) - 204: 173(ptr) AccessChain 202(vertex) 57 - Store 204 203 - 206: 30(fvec4) Load 184(Q1) - 207: 173(ptr) AccessChain 202(vertex) 57 - Store 207 206 - 208: 30(fvec4) Load 184(Q1) - 209: 173(ptr) AccessChain 202(vertex) 57 - Store 209 208 - 210: 30(fvec4) Load 193(Q2) - 211: 173(ptr) AccessChain 202(vertex) 57 - Store 211 210 - 212: 30(fvec4) Load 193(Q2) - 213: 173(ptr) AccessChain 202(vertex) 57 - Store 213 212 - 214: 30(fvec4) Load 174(Q0) - 215: 173(ptr) AccessChain 202(vertex) 57 - Store 215 214 + 171(P0): 38(ptr) Variable Function + 174(P1): 38(ptr) Variable Function + 177(P2): 38(ptr) Variable Function + 194(Q0): 193(ptr) Variable Function + 204(Q1): 193(ptr) Variable Function + 213(Q2): 193(ptr) Variable Function + 222(vertex): 32(ptr) Variable Function + 172: 38(ptr) AccessChain 34(input) 57 57 + 173: 7(fvec3) Load 172 + Store 171(P0) 173 + 175: 38(ptr) AccessChain 34(input) 62 57 + 176: 7(fvec3) Load 175 + Store 174(P1) 176 + 178: 38(ptr) AccessChain 34(input) 67 57 + 179: 7(fvec3) Load 178 + Store 177(P2) 179 + 181: 50(ptr) AccessChain 171(P0) 68 + 182: 6(float) Load 181 + 183: 6(float) FAdd 182 180 + 184: 50(ptr) AccessChain 171(P0) 68 + Store 184 183 + 185: 50(ptr) AccessChain 174(P1) 68 + 186: 6(float) Load 185 + 187: 6(float) FAdd 186 180 + 188: 50(ptr) AccessChain 174(P1) 68 + Store 188 187 + 189: 50(ptr) AccessChain 177(P2) 68 + 190: 6(float) Load 189 + 191: 6(float) FAdd 190 180 + 192: 50(ptr) AccessChain 177(P2) 68 + Store 192 191 + 195: 7(fvec3) Load 171(P0) + 196: 6(float) CompositeExtract 195 0 + 197: 6(float) CompositeExtract 195 1 + 198: 6(float) CompositeExtract 195 2 + 199: 30(fvec4) CompositeConstruct 196 197 198 54 + 201: 200(ptr) AccessChain 44 62 + 202: 40 Load 201 + 203: 30(fvec4) VectorTimesMatrix 199 202 + Store 194(Q0) 203 + 205: 7(fvec3) Load 174(P1) + 206: 6(float) CompositeExtract 205 0 + 207: 6(float) CompositeExtract 205 1 + 208: 6(float) CompositeExtract 205 2 + 209: 30(fvec4) CompositeConstruct 206 207 208 54 + 210: 200(ptr) AccessChain 44 62 + 211: 40 Load 210 + 212: 30(fvec4) VectorTimesMatrix 209 211 + Store 204(Q1) 212 + 214: 7(fvec3) Load 177(P2) + 215: 6(float) CompositeExtract 214 0 + 216: 6(float) CompositeExtract 214 1 + 217: 6(float) CompositeExtract 214 2 + 218: 30(fvec4) CompositeConstruct 215 216 217 54 + 219: 200(ptr) AccessChain 44 62 + 220: 40 Load 219 + 221: 30(fvec4) VectorTimesMatrix 218 220 + Store 213(Q2) 221 + 223: 30(fvec4) Load 194(Q0) + 224: 193(ptr) AccessChain 222(vertex) 57 + Store 224 223 + 226: 30(fvec4) Load 204(Q1) + 227: 193(ptr) AccessChain 222(vertex) 57 + Store 227 226 + 228: 30(fvec4) Load 204(Q1) + 229: 193(ptr) AccessChain 222(vertex) 57 + Store 229 228 + 230: 30(fvec4) Load 213(Q2) + 231: 193(ptr) AccessChain 222(vertex) 57 + Store 231 230 + 232: 30(fvec4) Load 213(Q2) + 233: 193(ptr) AccessChain 222(vertex) 57 + Store 233 232 + 234: 30(fvec4) Load 194(Q0) + 235: 193(ptr) AccessChain 222(vertex) 57 + Store 235 234 Return FunctionEnd diff --git a/Test/baseResults/hlsl.hull.1.tesc.out b/Test/baseResults/hlsl.hull.1.tesc.out index ca4417d7cd..d2fc2572f7 100644 --- a/Test/baseResults/hlsl.hull.1.tesc.out +++ b/Test/baseResults/hlsl.hull.1.tesc.out @@ -25,19 +25,69 @@ vertex spacing = equal_spacing 0:26 Function Definition: main( ( temp void) 0:26 Function Parameters: 0:? Sequence -0:26 move second child to first child ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 1 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 1 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 2 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 3 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 3 (const int) 0:26 move second child to first child ( temp uint) 0:? 'm_cpid' ( temp uint) 0:? 'm_cpid' ( in uint InvocationID) -0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'm_cpid' ( in uint InvocationID) -0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'm_cpid' ( temp uint) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'm_cpid' ( in uint InvocationID) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:? 'm_cpid' ( temp uint) +0:26 Constant: +0:26 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -103,8 +153,8 @@ vertex spacing = equal_spacing 0:38 Branch: Return with expression 0:38 'output' ( temp structure{ temp 2-element array of float edges}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) 0:? 'm_cpid' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) 0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) @@ -139,19 +189,69 @@ vertex spacing = equal_spacing 0:26 Function Definition: main( ( temp void) 0:26 Function Parameters: 0:? Sequence -0:26 move second child to first child ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 1 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 1 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 2 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 3 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 3 (const int) 0:26 move second child to first child ( temp uint) 0:? 'm_cpid' ( temp uint) 0:? 'm_cpid' ( in uint InvocationID) -0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'm_cpid' ( in uint InvocationID) -0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'm_cpid' ( temp uint) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'm_cpid' ( in uint InvocationID) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:? 'm_cpid' ( temp uint) +0:26 Constant: +0:26 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -217,20 +317,20 @@ vertex spacing = equal_spacing 0:38 Branch: Return with expression 0:38 'output' ( temp structure{ temp 2-element array of float edges}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) 0:? 'm_cpid' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) 0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 89 +// Id's are bound by 104 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 40 44 48 65 71 + EntryPoint TessellationControl 4 "main" 41 60 63 81 87 ExecutionMode 4 OutputVertices 4 ExecutionMode 4 Isolines ExecutionMode 4 SpacingEqual @@ -249,23 +349,23 @@ vertex spacing = equal_spacing Name 24 "pid" Name 28 "output" Name 38 "ip" - Name 40 "ip" - Name 42 "m_cpid" - Name 44 "m_cpid" - Name 48 "@entryPointOutput" - Name 50 "param" - Name 52 "param" - Name 64 "@patchConstantResult" - Name 65 "pid" - Name 66 "param" - Name 71 "@patchConstantOutput.edges" - Name 81 "output" - Decorate 40(ip) Location 0 - Decorate 44(m_cpid) BuiltIn InvocationId - Decorate 48(@entryPointOutput) Location 0 - Decorate 65(pid) BuiltIn PrimitiveId - Decorate 71(@patchConstantOutput.edges) Patch - Decorate 71(@patchConstantOutput.edges) BuiltIn TessLevelOuter + Name 41 "ip.cpoint" + Name 58 "m_cpid" + Name 60 "m_cpid" + Name 63 "@entryPointOutput.cpoint" + Name 65 "param" + Name 67 "param" + Name 80 "@patchConstantResult" + Name 81 "pid" + Name 82 "param" + Name 87 "@patchConstantOutput.edges" + Name 96 "output" + Decorate 41(ip.cpoint) Location 0 + Decorate 60(m_cpid) BuiltIn InvocationId + Decorate 63(@entryPointOutput.cpoint) Location 0 + Decorate 81(pid) BuiltIn PrimitiveId + Decorate 87(@patchConstantOutput.edges) Patch + Decorate 87(@patchConstantOutput.edges) BuiltIn TessLevelOuter 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -286,66 +386,84 @@ vertex spacing = equal_spacing 29: TypeInt 32 1 30: 29(int) Constant 0 31: TypePointer Function 7(fvec3) - 39: TypePointer Input 11 - 40(ip): 39(ptr) Variable Input - 43: TypePointer Input 9(int) - 44(m_cpid): 43(ptr) Variable Input - 46: TypeArray 14(HS_OUT) 10 - 47: TypePointer Output 46 -48(@entryPointOutput): 47(ptr) Variable Output - 55: TypePointer Output 14(HS_OUT) - 57: 9(int) Constant 0 - 59: TypeBool - 63: TypePointer Function 22(HS_CONSTANT_OUT) - 65(pid): 43(ptr) Variable Input - 69: TypeArray 6(float) 10 - 70: TypePointer Output 69 -71(@patchConstantOutput.edges): 70(ptr) Variable Output - 72: TypePointer Function 6(float) - 75: TypePointer Output 6(float) - 77: 29(int) Constant 1 - 82: 6(float) Constant 1073741824 - 84: 6(float) Constant 1090519040 + 39: TypeArray 7(fvec3) 10 + 40: TypePointer Input 39 + 41(ip.cpoint): 40(ptr) Variable Input + 42: TypePointer Input 7(fvec3) + 46: 29(int) Constant 1 + 50: 29(int) Constant 2 + 54: 29(int) Constant 3 + 59: TypePointer Input 9(int) + 60(m_cpid): 59(ptr) Variable Input + 62: TypePointer Output 39 +63(@entryPointOutput.cpoint): 62(ptr) Variable Output + 71: TypePointer Output 7(fvec3) + 73: 9(int) Constant 0 + 75: TypeBool + 79: TypePointer Function 22(HS_CONSTANT_OUT) + 81(pid): 59(ptr) Variable Input + 85: TypeArray 6(float) 10 + 86: TypePointer Output 85 +87(@patchConstantOutput.edges): 86(ptr) Variable Output + 88: TypePointer Function 6(float) + 91: TypePointer Output 6(float) + 97: 6(float) Constant 1073741824 + 99: 6(float) Constant 1090519040 4(main): 2 Function None 3 5: Label 38(ip): 12(ptr) Variable Function - 42(m_cpid): 13(ptr) Variable Function - 50(param): 12(ptr) Variable Function - 52(param): 13(ptr) Variable Function -64(@patchConstantResult): 63(ptr) Variable Function - 66(param): 13(ptr) Variable Function - 41: 11 Load 40(ip) - Store 38(ip) 41 - 45: 9(int) Load 44(m_cpid) - Store 42(m_cpid) 45 - 49: 9(int) Load 44(m_cpid) - 51: 11 Load 38(ip) - Store 50(param) 51 - 53: 9(int) Load 42(m_cpid) - Store 52(param) 53 - 54: 14(HS_OUT) FunctionCall 18(@main(struct-VS_OUT-vf31[4];u1;) 50(param) 52(param) - 56: 55(ptr) AccessChain 48(@entryPointOutput) 49 - Store 56 54 - ControlBarrier 20 10 57 - 58: 9(int) Load 44(m_cpid) - 60: 59(bool) IEqual 58 30 - SelectionMerge 62 None - BranchConditional 60 61 62 - 61: Label - 67: 9(int) Load 65(pid) - Store 66(param) 67 - 68:22(HS_CONSTANT_OUT) FunctionCall 25(PCF(u1;) 66(param) - Store 64(@patchConstantResult) 68 - 73: 72(ptr) AccessChain 64(@patchConstantResult) 30 30 - 74: 6(float) Load 73 - 76: 75(ptr) AccessChain 71(@patchConstantOutput.edges) 30 - Store 76 74 - 78: 72(ptr) AccessChain 64(@patchConstantResult) 30 77 - 79: 6(float) Load 78 - 80: 75(ptr) AccessChain 71(@patchConstantOutput.edges) 77 - Store 80 79 - Branch 62 - 62: Label + 58(m_cpid): 13(ptr) Variable Function + 65(param): 12(ptr) Variable Function + 67(param): 13(ptr) Variable Function +80(@patchConstantResult): 79(ptr) Variable Function + 82(param): 13(ptr) Variable Function + 43: 42(ptr) AccessChain 41(ip.cpoint) 30 + 44: 7(fvec3) Load 43 + 45: 31(ptr) AccessChain 38(ip) 30 30 + Store 45 44 + 47: 42(ptr) AccessChain 41(ip.cpoint) 46 + 48: 7(fvec3) Load 47 + 49: 31(ptr) AccessChain 38(ip) 46 30 + Store 49 48 + 51: 42(ptr) AccessChain 41(ip.cpoint) 50 + 52: 7(fvec3) Load 51 + 53: 31(ptr) AccessChain 38(ip) 50 30 + Store 53 52 + 55: 42(ptr) AccessChain 41(ip.cpoint) 54 + 56: 7(fvec3) Load 55 + 57: 31(ptr) AccessChain 38(ip) 54 30 + Store 57 56 + 61: 9(int) Load 60(m_cpid) + Store 58(m_cpid) 61 + 64: 9(int) Load 60(m_cpid) + 66: 11 Load 38(ip) + Store 65(param) 66 + 68: 9(int) Load 58(m_cpid) + Store 67(param) 68 + 69: 14(HS_OUT) FunctionCall 18(@main(struct-VS_OUT-vf31[4];u1;) 65(param) 67(param) + 70: 7(fvec3) CompositeExtract 69 0 + 72: 71(ptr) AccessChain 63(@entryPointOutput.cpoint) 64 + Store 72 70 + ControlBarrier 20 10 73 + 74: 9(int) Load 60(m_cpid) + 76: 75(bool) IEqual 74 30 + SelectionMerge 78 None + BranchConditional 76 77 78 + 77: Label + 83: 9(int) Load 81(pid) + Store 82(param) 83 + 84:22(HS_CONSTANT_OUT) FunctionCall 25(PCF(u1;) 82(param) + Store 80(@patchConstantResult) 84 + 89: 88(ptr) AccessChain 80(@patchConstantResult) 30 30 + 90: 6(float) Load 89 + 92: 91(ptr) AccessChain 87(@patchConstantOutput.edges) 30 + Store 92 90 + 93: 88(ptr) AccessChain 80(@patchConstantResult) 30 46 + 94: 6(float) Load 93 + 95: 91(ptr) AccessChain 87(@patchConstantOutput.edges) 46 + Store 95 94 + Branch 78 + 78: Label Return FunctionEnd 18(@main(struct-VS_OUT-vf31[4];u1;): 14(HS_OUT) Function None 15 @@ -363,11 +481,11 @@ vertex spacing = equal_spacing 25(PCF(u1;):22(HS_CONSTANT_OUT) Function None 23 24(pid): 13(ptr) FunctionParameter 26: Label - 81(output): 63(ptr) Variable Function - 83: 72(ptr) AccessChain 81(output) 30 30 - Store 83 82 - 85: 72(ptr) AccessChain 81(output) 30 77 - Store 85 84 - 86:22(HS_CONSTANT_OUT) Load 81(output) - ReturnValue 86 + 96(output): 79(ptr) Variable Function + 98: 88(ptr) AccessChain 96(output) 30 30 + Store 98 97 + 100: 88(ptr) AccessChain 96(output) 30 46 + Store 100 99 + 101:22(HS_CONSTANT_OUT) Load 96(output) + ReturnValue 101 FunctionEnd diff --git a/Test/baseResults/hlsl.hull.2.tesc.out b/Test/baseResults/hlsl.hull.2.tesc.out index 70fc4f1ea8..69b35adb94 100644 --- a/Test/baseResults/hlsl.hull.2.tesc.out +++ b/Test/baseResults/hlsl.hull.2.tesc.out @@ -24,15 +24,65 @@ vertex spacing = equal_spacing 0:26 Function Definition: main( ( temp void) 0:26 Function Parameters: 0:? Sequence -0:26 move second child to first child ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) -0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'InvocationId' ( in uint InvocationID) -0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 1 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 1 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 2 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 3 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 3 (const int) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'InvocationId' ( in uint InvocationID) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -100,8 +150,8 @@ vertex spacing = equal_spacing 0:38 Branch: Return with expression 0:38 'output' ( temp structure{ temp 2-element array of float edges}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) 0:? 'InvocationId' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) 0:? 'pos' ( in 4-component vector of float Position) @@ -136,15 +186,65 @@ vertex spacing = equal_spacing 0:26 Function Definition: main( ( temp void) 0:26 Function Parameters: 0:? Sequence -0:26 move second child to first child ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) -0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'InvocationId' ( in uint InvocationID) -0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 1 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 1 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 2 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 3 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 3 (const int) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'InvocationId' ( in uint InvocationID) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -212,8 +312,8 @@ vertex spacing = equal_spacing 0:38 Branch: Return with expression 0:38 'output' ( temp structure{ temp 2-element array of float edges}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) 0:? 'InvocationId' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) 0:? 'pos' ( in 4-component vector of float Position) @@ -221,12 +321,12 @@ vertex spacing = equal_spacing // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 91 +// Id's are bound by 106 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 42 46 48 63 65 73 + EntryPoint TessellationControl 4 "main" 43 61 63 79 81 89 ExecutionMode 4 OutputVertices 4 ExecutionMode 4 Isolines ExecutionMode 4 SpacingEqual @@ -245,24 +345,24 @@ vertex spacing = equal_spacing Name 26 "pos" Name 30 "output" Name 40 "ip" - Name 42 "ip" - Name 46 "@entryPointOutput" - Name 48 "InvocationId" - Name 50 "param" - Name 62 "@patchConstantResult" - Name 63 "pid" - Name 65 "pos" - Name 66 "param" - Name 68 "param" - Name 73 "@patchConstantOutput.edges" - Name 83 "output" - Decorate 42(ip) Location 0 - Decorate 46(@entryPointOutput) Location 0 - Decorate 48(InvocationId) BuiltIn InvocationId - Decorate 63(pid) BuiltIn PrimitiveId - Decorate 65(pos) BuiltIn Position - Decorate 73(@patchConstantOutput.edges) Patch - Decorate 73(@patchConstantOutput.edges) BuiltIn TessLevelOuter + Name 43 "ip.cpoint" + Name 61 "@entryPointOutput.cpoint" + Name 63 "InvocationId" + Name 65 "param" + Name 78 "@patchConstantResult" + Name 79 "pid" + Name 81 "pos" + Name 82 "param" + Name 84 "param" + Name 89 "@patchConstantOutput.edges" + Name 98 "output" + Decorate 43(ip.cpoint) Location 0 + Decorate 61(@entryPointOutput.cpoint) Location 0 + Decorate 63(InvocationId) BuiltIn InvocationId + Decorate 79(pid) BuiltIn PrimitiveId + Decorate 81(pos) BuiltIn Position + Decorate 89(@patchConstantOutput.edges) Patch + Decorate 89(@patchConstantOutput.edges) BuiltIn TessLevelOuter 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -285,65 +385,83 @@ vertex spacing = equal_spacing 31: TypeInt 32 1 32: 31(int) Constant 0 33: TypePointer Function 7(fvec3) - 41: TypePointer Input 11 - 42(ip): 41(ptr) Variable Input - 44: TypeArray 13(HS_OUT) 10 - 45: TypePointer Output 44 -46(@entryPointOutput): 45(ptr) Variable Output - 47: TypePointer Input 9(int) -48(InvocationId): 47(ptr) Variable Input - 53: TypePointer Output 13(HS_OUT) - 55: 9(int) Constant 0 - 57: TypeBool - 61: TypePointer Function 23(HS_CONSTANT_OUT) - 63(pid): 47(ptr) Variable Input - 64: TypePointer Input 19(fvec4) - 65(pos): 64(ptr) Variable Input - 71: TypeArray 6(float) 10 - 72: TypePointer Output 71 -73(@patchConstantOutput.edges): 72(ptr) Variable Output - 74: TypePointer Function 6(float) - 77: TypePointer Output 6(float) - 79: 31(int) Constant 1 - 84: 6(float) Constant 1073741824 - 86: 6(float) Constant 1090519040 + 41: TypeArray 7(fvec3) 10 + 42: TypePointer Input 41 + 43(ip.cpoint): 42(ptr) Variable Input + 44: TypePointer Input 7(fvec3) + 48: 31(int) Constant 1 + 52: 31(int) Constant 2 + 56: 31(int) Constant 3 + 60: TypePointer Output 41 +61(@entryPointOutput.cpoint): 60(ptr) Variable Output + 62: TypePointer Input 9(int) +63(InvocationId): 62(ptr) Variable Input + 69: TypePointer Output 7(fvec3) + 71: 9(int) Constant 0 + 73: TypeBool + 77: TypePointer Function 23(HS_CONSTANT_OUT) + 79(pid): 62(ptr) Variable Input + 80: TypePointer Input 19(fvec4) + 81(pos): 80(ptr) Variable Input + 87: TypeArray 6(float) 10 + 88: TypePointer Output 87 +89(@patchConstantOutput.edges): 88(ptr) Variable Output + 90: TypePointer Function 6(float) + 93: TypePointer Output 6(float) + 99: 6(float) Constant 1073741824 + 101: 6(float) Constant 1090519040 4(main): 2 Function None 3 5: Label 40(ip): 12(ptr) Variable Function - 50(param): 12(ptr) Variable Function -62(@patchConstantResult): 61(ptr) Variable Function - 66(param): 18(ptr) Variable Function - 68(param): 20(ptr) Variable Function - 43: 11 Load 42(ip) - Store 40(ip) 43 - 49: 9(int) Load 48(InvocationId) - 51: 11 Load 40(ip) - Store 50(param) 51 - 52: 13(HS_OUT) FunctionCall 16(@main(struct-VS_OUT-vf31[4];) 50(param) - 54: 53(ptr) AccessChain 46(@entryPointOutput) 49 - Store 54 52 - ControlBarrier 21 10 55 - 56: 9(int) Load 48(InvocationId) - 58: 57(bool) IEqual 56 32 - SelectionMerge 60 None - BranchConditional 58 59 60 - 59: Label - 67: 9(int) Load 63(pid) - Store 66(param) 67 - 69: 19(fvec4) Load 65(pos) - Store 68(param) 69 - 70:23(HS_CONSTANT_OUT) FunctionCall 27(PCF(u1;vf4;) 66(param) 68(param) - Store 62(@patchConstantResult) 70 - 75: 74(ptr) AccessChain 62(@patchConstantResult) 32 32 - 76: 6(float) Load 75 - 78: 77(ptr) AccessChain 73(@patchConstantOutput.edges) 32 - Store 78 76 - 80: 74(ptr) AccessChain 62(@patchConstantResult) 32 79 - 81: 6(float) Load 80 - 82: 77(ptr) AccessChain 73(@patchConstantOutput.edges) 79 - Store 82 81 - Branch 60 - 60: Label + 65(param): 12(ptr) Variable Function +78(@patchConstantResult): 77(ptr) Variable Function + 82(param): 18(ptr) Variable Function + 84(param): 20(ptr) Variable Function + 45: 44(ptr) AccessChain 43(ip.cpoint) 32 + 46: 7(fvec3) Load 45 + 47: 33(ptr) AccessChain 40(ip) 32 32 + Store 47 46 + 49: 44(ptr) AccessChain 43(ip.cpoint) 48 + 50: 7(fvec3) Load 49 + 51: 33(ptr) AccessChain 40(ip) 48 32 + Store 51 50 + 53: 44(ptr) AccessChain 43(ip.cpoint) 52 + 54: 7(fvec3) Load 53 + 55: 33(ptr) AccessChain 40(ip) 52 32 + Store 55 54 + 57: 44(ptr) AccessChain 43(ip.cpoint) 56 + 58: 7(fvec3) Load 57 + 59: 33(ptr) AccessChain 40(ip) 56 32 + Store 59 58 + 64: 9(int) Load 63(InvocationId) + 66: 11 Load 40(ip) + Store 65(param) 66 + 67: 13(HS_OUT) FunctionCall 16(@main(struct-VS_OUT-vf31[4];) 65(param) + 68: 7(fvec3) CompositeExtract 67 0 + 70: 69(ptr) AccessChain 61(@entryPointOutput.cpoint) 64 + Store 70 68 + ControlBarrier 21 10 71 + 72: 9(int) Load 63(InvocationId) + 74: 73(bool) IEqual 72 32 + SelectionMerge 76 None + BranchConditional 74 75 76 + 75: Label + 83: 9(int) Load 79(pid) + Store 82(param) 83 + 85: 19(fvec4) Load 81(pos) + Store 84(param) 85 + 86:23(HS_CONSTANT_OUT) FunctionCall 27(PCF(u1;vf4;) 82(param) 84(param) + Store 78(@patchConstantResult) 86 + 91: 90(ptr) AccessChain 78(@patchConstantResult) 32 32 + 92: 6(float) Load 91 + 94: 93(ptr) AccessChain 89(@patchConstantOutput.edges) 32 + Store 94 92 + 95: 90(ptr) AccessChain 78(@patchConstantResult) 32 48 + 96: 6(float) Load 95 + 97: 93(ptr) AccessChain 89(@patchConstantOutput.edges) 48 + Store 97 96 + Branch 76 + 76: Label Return FunctionEnd 16(@main(struct-VS_OUT-vf31[4];): 13(HS_OUT) Function None 14 @@ -361,11 +479,11 @@ vertex spacing = equal_spacing 25(pid): 18(ptr) FunctionParameter 26(pos): 20(ptr) FunctionParameter 28: Label - 83(output): 61(ptr) Variable Function - 85: 74(ptr) AccessChain 83(output) 32 32 - Store 85 84 - 87: 74(ptr) AccessChain 83(output) 32 79 - Store 87 86 - 88:23(HS_CONSTANT_OUT) Load 83(output) - ReturnValue 88 + 98(output): 77(ptr) Variable Function + 100: 90(ptr) AccessChain 98(output) 32 32 + Store 100 99 + 102: 90(ptr) AccessChain 98(output) 32 48 + Store 102 101 + 103:23(HS_CONSTANT_OUT) Load 98(output) + ReturnValue 103 FunctionEnd diff --git a/Test/baseResults/hlsl.hull.3.tesc.out b/Test/baseResults/hlsl.hull.3.tesc.out index fba7fac812..e67af0ce93 100644 --- a/Test/baseResults/hlsl.hull.3.tesc.out +++ b/Test/baseResults/hlsl.hull.3.tesc.out @@ -24,15 +24,65 @@ vertex spacing = equal_spacing 0:26 Function Definition: main( ( temp void) 0:26 Function Parameters: 0:? Sequence -0:26 move second child to first child ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) -0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'InvocationId' ( in uint InvocationID) -0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 1 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 1 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 2 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 3 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 3 (const int) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'InvocationId' ( in uint InvocationID) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -100,8 +150,8 @@ vertex spacing = equal_spacing 0:38 Branch: Return with expression 0:38 'output' ( temp structure{ temp 2-element array of float edges}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) 0:? 'InvocationId' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) 0:? 'pos' ( in 4-component vector of float Position) @@ -136,15 +186,65 @@ vertex spacing = equal_spacing 0:26 Function Definition: main( ( temp void) 0:26 Function Parameters: 0:? Sequence -0:26 move second child to first child ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) -0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'InvocationId' ( in uint InvocationID) -0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 1 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 1 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 2 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 3 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) +0:26 Constant: +0:26 3 (const int) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'InvocationId' ( in uint InvocationID) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -212,8 +312,8 @@ vertex spacing = equal_spacing 0:38 Branch: Return with expression 0:38 'output' ( temp structure{ temp 2-element array of float edges}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float) 0:? 'InvocationId' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) 0:? 'pos' ( in 4-component vector of float Position) @@ -221,12 +321,12 @@ vertex spacing = equal_spacing // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 91 +// Id's are bound by 106 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 42 46 48 63 65 73 + EntryPoint TessellationControl 4 "main" 43 61 63 79 81 89 ExecutionMode 4 OutputVertices 4 ExecutionMode 4 Triangles ExecutionMode 4 SpacingEqual @@ -246,24 +346,24 @@ vertex spacing = equal_spacing Name 26 "pos" Name 30 "output" Name 40 "ip" - Name 42 "ip" - Name 46 "@entryPointOutput" - Name 48 "InvocationId" - Name 50 "param" - Name 62 "@patchConstantResult" - Name 63 "pid" - Name 65 "pos" - Name 66 "param" - Name 68 "param" - Name 73 "@patchConstantOutput.edges" - Name 83 "output" - Decorate 42(ip) Location 0 - Decorate 46(@entryPointOutput) Location 0 - Decorate 48(InvocationId) BuiltIn InvocationId - Decorate 63(pid) BuiltIn PrimitiveId - Decorate 65(pos) BuiltIn Position - Decorate 73(@patchConstantOutput.edges) Patch - Decorate 73(@patchConstantOutput.edges) BuiltIn TessLevelOuter + Name 43 "ip.cpoint" + Name 61 "@entryPointOutput.cpoint" + Name 63 "InvocationId" + Name 65 "param" + Name 78 "@patchConstantResult" + Name 79 "pid" + Name 81 "pos" + Name 82 "param" + Name 84 "param" + Name 89 "@patchConstantOutput.edges" + Name 98 "output" + Decorate 43(ip.cpoint) Location 0 + Decorate 61(@entryPointOutput.cpoint) Location 0 + Decorate 63(InvocationId) BuiltIn InvocationId + Decorate 79(pid) BuiltIn PrimitiveId + Decorate 81(pos) BuiltIn Position + Decorate 89(@patchConstantOutput.edges) Patch + Decorate 89(@patchConstantOutput.edges) BuiltIn TessLevelOuter 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -286,65 +386,83 @@ vertex spacing = equal_spacing 31: TypeInt 32 1 32: 31(int) Constant 0 33: TypePointer Function 7(fvec3) - 41: TypePointer Input 11 - 42(ip): 41(ptr) Variable Input - 44: TypeArray 13(HS_OUT) 10 - 45: TypePointer Output 44 -46(@entryPointOutput): 45(ptr) Variable Output - 47: TypePointer Input 9(int) -48(InvocationId): 47(ptr) Variable Input - 53: TypePointer Output 13(HS_OUT) - 55: 9(int) Constant 0 - 57: TypeBool - 61: TypePointer Function 23(HS_CONSTANT_OUT) - 63(pid): 47(ptr) Variable Input - 64: TypePointer Input 19(fvec4) - 65(pos): 64(ptr) Variable Input - 71: TypeArray 6(float) 10 - 72: TypePointer Output 71 -73(@patchConstantOutput.edges): 72(ptr) Variable Output - 74: TypePointer Function 6(float) - 77: TypePointer Output 6(float) - 79: 31(int) Constant 1 - 84: 6(float) Constant 1073741824 - 86: 6(float) Constant 1090519040 + 41: TypeArray 7(fvec3) 10 + 42: TypePointer Input 41 + 43(ip.cpoint): 42(ptr) Variable Input + 44: TypePointer Input 7(fvec3) + 48: 31(int) Constant 1 + 52: 31(int) Constant 2 + 56: 31(int) Constant 3 + 60: TypePointer Output 41 +61(@entryPointOutput.cpoint): 60(ptr) Variable Output + 62: TypePointer Input 9(int) +63(InvocationId): 62(ptr) Variable Input + 69: TypePointer Output 7(fvec3) + 71: 9(int) Constant 0 + 73: TypeBool + 77: TypePointer Function 23(HS_CONSTANT_OUT) + 79(pid): 62(ptr) Variable Input + 80: TypePointer Input 19(fvec4) + 81(pos): 80(ptr) Variable Input + 87: TypeArray 6(float) 10 + 88: TypePointer Output 87 +89(@patchConstantOutput.edges): 88(ptr) Variable Output + 90: TypePointer Function 6(float) + 93: TypePointer Output 6(float) + 99: 6(float) Constant 1073741824 + 101: 6(float) Constant 1090519040 4(main): 2 Function None 3 5: Label 40(ip): 12(ptr) Variable Function - 50(param): 12(ptr) Variable Function -62(@patchConstantResult): 61(ptr) Variable Function - 66(param): 18(ptr) Variable Function - 68(param): 20(ptr) Variable Function - 43: 11 Load 42(ip) - Store 40(ip) 43 - 49: 9(int) Load 48(InvocationId) - 51: 11 Load 40(ip) - Store 50(param) 51 - 52: 13(HS_OUT) FunctionCall 16(@main(struct-VS_OUT-vf31[4];) 50(param) - 54: 53(ptr) AccessChain 46(@entryPointOutput) 49 - Store 54 52 - ControlBarrier 21 10 55 - 56: 9(int) Load 48(InvocationId) - 58: 57(bool) IEqual 56 32 - SelectionMerge 60 None - BranchConditional 58 59 60 - 59: Label - 67: 9(int) Load 63(pid) - Store 66(param) 67 - 69: 19(fvec4) Load 65(pos) - Store 68(param) 69 - 70:23(HS_CONSTANT_OUT) FunctionCall 27(PCF(u1;vf4;) 66(param) 68(param) - Store 62(@patchConstantResult) 70 - 75: 74(ptr) AccessChain 62(@patchConstantResult) 32 32 - 76: 6(float) Load 75 - 78: 77(ptr) AccessChain 73(@patchConstantOutput.edges) 32 - Store 78 76 - 80: 74(ptr) AccessChain 62(@patchConstantResult) 32 79 - 81: 6(float) Load 80 - 82: 77(ptr) AccessChain 73(@patchConstantOutput.edges) 79 - Store 82 81 - Branch 60 - 60: Label + 65(param): 12(ptr) Variable Function +78(@patchConstantResult): 77(ptr) Variable Function + 82(param): 18(ptr) Variable Function + 84(param): 20(ptr) Variable Function + 45: 44(ptr) AccessChain 43(ip.cpoint) 32 + 46: 7(fvec3) Load 45 + 47: 33(ptr) AccessChain 40(ip) 32 32 + Store 47 46 + 49: 44(ptr) AccessChain 43(ip.cpoint) 48 + 50: 7(fvec3) Load 49 + 51: 33(ptr) AccessChain 40(ip) 48 32 + Store 51 50 + 53: 44(ptr) AccessChain 43(ip.cpoint) 52 + 54: 7(fvec3) Load 53 + 55: 33(ptr) AccessChain 40(ip) 52 32 + Store 55 54 + 57: 44(ptr) AccessChain 43(ip.cpoint) 56 + 58: 7(fvec3) Load 57 + 59: 33(ptr) AccessChain 40(ip) 56 32 + Store 59 58 + 64: 9(int) Load 63(InvocationId) + 66: 11 Load 40(ip) + Store 65(param) 66 + 67: 13(HS_OUT) FunctionCall 16(@main(struct-VS_OUT-vf31[4];) 65(param) + 68: 7(fvec3) CompositeExtract 67 0 + 70: 69(ptr) AccessChain 61(@entryPointOutput.cpoint) 64 + Store 70 68 + ControlBarrier 21 10 71 + 72: 9(int) Load 63(InvocationId) + 74: 73(bool) IEqual 72 32 + SelectionMerge 76 None + BranchConditional 74 75 76 + 75: Label + 83: 9(int) Load 79(pid) + Store 82(param) 83 + 85: 19(fvec4) Load 81(pos) + Store 84(param) 85 + 86:23(HS_CONSTANT_OUT) FunctionCall 27(PCF(u1;vf4;) 82(param) 84(param) + Store 78(@patchConstantResult) 86 + 91: 90(ptr) AccessChain 78(@patchConstantResult) 32 32 + 92: 6(float) Load 91 + 94: 93(ptr) AccessChain 89(@patchConstantOutput.edges) 32 + Store 94 92 + 95: 90(ptr) AccessChain 78(@patchConstantResult) 32 48 + 96: 6(float) Load 95 + 97: 93(ptr) AccessChain 89(@patchConstantOutput.edges) 48 + Store 97 96 + Branch 76 + 76: Label Return FunctionEnd 16(@main(struct-VS_OUT-vf31[4];): 13(HS_OUT) Function None 14 @@ -362,11 +480,11 @@ vertex spacing = equal_spacing 25(pid): 18(ptr) FunctionParameter 26(pos): 20(ptr) FunctionParameter 28: Label - 83(output): 61(ptr) Variable Function - 85: 74(ptr) AccessChain 83(output) 32 32 - Store 85 84 - 87: 74(ptr) AccessChain 83(output) 32 79 - Store 87 86 - 88:23(HS_CONSTANT_OUT) Load 83(output) - ReturnValue 88 + 98(output): 77(ptr) Variable Function + 100: 90(ptr) AccessChain 98(output) 32 32 + Store 100 99 + 102: 90(ptr) AccessChain 98(output) 32 48 + Store 102 101 + 103:23(HS_CONSTANT_OUT) Load 98(output) + ReturnValue 103 FunctionEnd diff --git a/Test/baseResults/hlsl.hull.4.tesc.out b/Test/baseResults/hlsl.hull.4.tesc.out index 253bdc6453..8fd9a18e4f 100644 --- a/Test/baseResults/hlsl.hull.4.tesc.out +++ b/Test/baseResults/hlsl.hull.4.tesc.out @@ -93,11 +93,8 @@ triangle order = cw 0:39 0 (const int) 0:39 Constant: 0:39 1 (const int) -0:39 m_Normal: direct index for structure ( temp 4-component vector of float) -0:39 direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal}) -0:39 'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal}) -0:39 Constant: -0:39 0 (const int) +0:39 direct index (layout( location=0) in 4-component vector of float) +0:? 'I.m_Normal' (layout( location=0) in 3-element array of 4-component vector of float) 0:39 Constant: 0:39 0 (const int) 0:39 move second child to first child ( temp 4-component vector of float) @@ -120,13 +117,10 @@ triangle order = cw 0:39 1 (const int) 0:39 Constant: 0:39 1 (const int) -0:39 m_Normal: direct index for structure ( temp 4-component vector of float) -0:39 direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal}) -0:39 'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal}) -0:39 Constant: -0:39 1 (const int) +0:39 direct index (layout( location=0) in 4-component vector of float) +0:? 'I.m_Normal' (layout( location=0) in 3-element array of 4-component vector of float) 0:39 Constant: -0:39 0 (const int) +0:39 1 (const int) 0:39 move second child to first child ( temp 4-component vector of float) 0:39 m_Position: direct index for structure ( temp 4-component vector of float) 0:39 direct index ( temp structure{ temp 4-component vector of float m_Position, temp 4-component vector of float m_Normal}) @@ -147,13 +141,10 @@ triangle order = cw 0:39 2 (const int) 0:39 Constant: 0:39 1 (const int) -0:39 m_Normal: direct index for structure ( temp 4-component vector of float) -0:39 direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal}) -0:39 'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal}) -0:39 Constant: -0:39 2 (const int) +0:39 direct index (layout( location=0) in 4-component vector of float) +0:? 'I.m_Normal' (layout( location=0) in 3-element array of 4-component vector of float) 0:39 Constant: -0:39 0 (const int) +0:39 2 (const int) 0:39 move second child to first child ( temp uint) 0:? 'cpid' ( temp uint) 0:? 'cpid' ( in uint InvocationID) @@ -230,7 +221,7 @@ triangle order = cw 0:? Linker Objects 0:? '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position) 0:? 'I.m_Position' ( in 3-element array of 4-component vector of float Position) -0:? 'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal}) +0:? 'I.m_Normal' (layout( location=0) in 3-element array of 4-component vector of float) 0:? 'cpid' ( in uint InvocationID) 0:? '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter) 0:? '@patchConstantOutput.fInsideTessFactor' ( patch out 2-element array of float TessLevelInner) @@ -333,11 +324,8 @@ triangle order = cw 0:39 0 (const int) 0:39 Constant: 0:39 1 (const int) -0:39 m_Normal: direct index for structure ( temp 4-component vector of float) -0:39 direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal}) -0:39 'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal}) -0:39 Constant: -0:39 0 (const int) +0:39 direct index (layout( location=0) in 4-component vector of float) +0:? 'I.m_Normal' (layout( location=0) in 3-element array of 4-component vector of float) 0:39 Constant: 0:39 0 (const int) 0:39 move second child to first child ( temp 4-component vector of float) @@ -360,13 +348,10 @@ triangle order = cw 0:39 1 (const int) 0:39 Constant: 0:39 1 (const int) -0:39 m_Normal: direct index for structure ( temp 4-component vector of float) -0:39 direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal}) -0:39 'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal}) -0:39 Constant: -0:39 1 (const int) +0:39 direct index (layout( location=0) in 4-component vector of float) +0:? 'I.m_Normal' (layout( location=0) in 3-element array of 4-component vector of float) 0:39 Constant: -0:39 0 (const int) +0:39 1 (const int) 0:39 move second child to first child ( temp 4-component vector of float) 0:39 m_Position: direct index for structure ( temp 4-component vector of float) 0:39 direct index ( temp structure{ temp 4-component vector of float m_Position, temp 4-component vector of float m_Normal}) @@ -387,13 +372,10 @@ triangle order = cw 0:39 2 (const int) 0:39 Constant: 0:39 1 (const int) -0:39 m_Normal: direct index for structure ( temp 4-component vector of float) -0:39 direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal}) -0:39 'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal}) -0:39 Constant: -0:39 2 (const int) +0:39 direct index (layout( location=0) in 4-component vector of float) +0:? 'I.m_Normal' (layout( location=0) in 3-element array of 4-component vector of float) 0:39 Constant: -0:39 0 (const int) +0:39 2 (const int) 0:39 move second child to first child ( temp uint) 0:? 'cpid' ( temp uint) 0:? 'cpid' ( in uint InvocationID) @@ -470,19 +452,19 @@ triangle order = cw 0:? Linker Objects 0:? '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position) 0:? 'I.m_Position' ( in 3-element array of 4-component vector of float Position) -0:? 'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal}) +0:? 'I.m_Normal' (layout( location=0) in 3-element array of 4-component vector of float) 0:? 'cpid' ( in uint InvocationID) 0:? '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter) 0:? '@patchConstantOutput.fInsideTessFactor' ( patch out 2-element array of float TessLevelInner) // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 127 +// Id's are bound by 124 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 56 64 83 86 110 123 + EntryPoint TessellationControl 4 "main" 56 61 80 83 107 120 ExecutionMode 4 OutputVertices 3 ExecutionMode 4 Triangles ExecutionMode 4 SpacingFractionalOdd @@ -506,26 +488,24 @@ triangle order = cw Name 45 "output" Name 53 "I" Name 56 "I.m_Position" - Name 61 "HS_Input" - MemberName 61(HS_Input) 0 "m_Normal" - Name 64 "I" - Name 81 "cpid" - Name 83 "cpid" - Name 86 "@entryPointOutput.m_Position" - Name 88 "param" - Name 90 "param" - Name 104 "@patchConstantResult" - Name 105 "param" - Name 110 "@patchConstantOutput.fTessFactor" - Name 123 "@patchConstantOutput.fInsideTessFactor" + Name 61 "I.m_Normal" + Name 78 "cpid" + Name 80 "cpid" + Name 83 "@entryPointOutput.m_Position" + Name 85 "param" + Name 87 "param" + Name 101 "@patchConstantResult" + Name 102 "param" + Name 107 "@patchConstantOutput.fTessFactor" + Name 120 "@patchConstantOutput.fInsideTessFactor" Decorate 56(I.m_Position) BuiltIn Position - Decorate 64(I) Location 0 - Decorate 83(cpid) BuiltIn InvocationId - Decorate 86(@entryPointOutput.m_Position) BuiltIn Position - Decorate 110(@patchConstantOutput.fTessFactor) Patch - Decorate 110(@patchConstantOutput.fTessFactor) BuiltIn TessLevelOuter - Decorate 123(@patchConstantOutput.fInsideTessFactor) Patch - Decorate 123(@patchConstantOutput.fInsideTessFactor) BuiltIn TessLevelInner + Decorate 61(I.m_Normal) Location 0 + Decorate 80(cpid) BuiltIn InvocationId + Decorate 83(@entryPointOutput.m_Position) BuiltIn Position + Decorate 107(@patchConstantOutput.fTessFactor) Patch + Decorate 107(@patchConstantOutput.fTessFactor) BuiltIn TessLevelOuter + Decorate 120(@patchConstantOutput.fInsideTessFactor) Patch + Decorate 120(@patchConstantOutput.fInsideTessFactor) BuiltIn TessLevelInner 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -557,98 +537,95 @@ triangle order = cw 55: TypePointer Input 54 56(I.m_Position): 55(ptr) Variable Input 57: TypePointer Input 7(fvec4) - 61(HS_Input): TypeStruct 7(fvec4) - 62: TypeArray 61(HS_Input) 10 - 63: TypePointer Input 62 - 64(I): 63(ptr) Variable Input - 74: 31(int) Constant 2 - 82: TypePointer Input 9(int) - 83(cpid): 82(ptr) Variable Input - 85: TypePointer Output 54 -86(@entryPointOutput.m_Position): 85(ptr) Variable Output - 94: TypePointer Output 7(fvec4) - 96: 9(int) Constant 2 - 97: 9(int) Constant 4 - 98: 9(int) Constant 0 - 100: TypeBool - 108: TypeArray 6(float) 97 - 109: TypePointer Output 108 -110(@patchConstantOutput.fTessFactor): 109(ptr) Variable Output - 113: TypePointer Output 6(float) - 121: TypeArray 6(float) 96 - 122: TypePointer Output 121 -123(@patchConstantOutput.fInsideTessFactor): 122(ptr) Variable Output + 61(I.m_Normal): 55(ptr) Variable Input + 71: 31(int) Constant 2 + 79: TypePointer Input 9(int) + 80(cpid): 79(ptr) Variable Input + 82: TypePointer Output 54 +83(@entryPointOutput.m_Position): 82(ptr) Variable Output + 91: TypePointer Output 7(fvec4) + 93: 9(int) Constant 2 + 94: 9(int) Constant 4 + 95: 9(int) Constant 0 + 97: TypeBool + 105: TypeArray 6(float) 94 + 106: TypePointer Output 105 +107(@patchConstantOutput.fTessFactor): 106(ptr) Variable Output + 110: TypePointer Output 6(float) + 118: TypeArray 6(float) 93 + 119: TypePointer Output 118 +120(@patchConstantOutput.fInsideTessFactor): 119(ptr) Variable Output 4(main): 2 Function None 3 5: Label 53(I): 12(ptr) Variable Function - 81(cpid): 19(ptr) Variable Function - 88(param): 12(ptr) Variable Function - 90(param): 19(ptr) Variable Function -104(@patchConstantResult): 26(ptr) Variable Function - 105(param): 12(ptr) Variable Function + 78(cpid): 19(ptr) Variable Function + 85(param): 12(ptr) Variable Function + 87(param): 19(ptr) Variable Function +101(@patchConstantResult): 26(ptr) Variable Function + 102(param): 12(ptr) Variable Function 58: 57(ptr) AccessChain 56(I.m_Position) 33 59: 7(fvec4) Load 58 60: 48(ptr) AccessChain 53(I) 33 33 Store 60 59 - 65: 57(ptr) AccessChain 64(I) 33 33 + 62: 57(ptr) AccessChain 61(I.m_Normal) 33 + 63: 7(fvec4) Load 62 + 64: 48(ptr) AccessChain 53(I) 33 32 + Store 64 63 + 65: 57(ptr) AccessChain 56(I.m_Position) 32 66: 7(fvec4) Load 65 - 67: 48(ptr) AccessChain 53(I) 33 32 + 67: 48(ptr) AccessChain 53(I) 32 33 Store 67 66 - 68: 57(ptr) AccessChain 56(I.m_Position) 32 + 68: 57(ptr) AccessChain 61(I.m_Normal) 32 69: 7(fvec4) Load 68 - 70: 48(ptr) AccessChain 53(I) 32 33 + 70: 48(ptr) AccessChain 53(I) 32 32 Store 70 69 - 71: 57(ptr) AccessChain 64(I) 32 33 - 72: 7(fvec4) Load 71 - 73: 48(ptr) AccessChain 53(I) 32 32 - Store 73 72 - 75: 57(ptr) AccessChain 56(I.m_Position) 74 + 72: 57(ptr) AccessChain 56(I.m_Position) 71 + 73: 7(fvec4) Load 72 + 74: 48(ptr) AccessChain 53(I) 71 33 + Store 74 73 + 75: 57(ptr) AccessChain 61(I.m_Normal) 71 76: 7(fvec4) Load 75 - 77: 48(ptr) AccessChain 53(I) 74 33 + 77: 48(ptr) AccessChain 53(I) 71 32 Store 77 76 - 78: 57(ptr) AccessChain 64(I) 74 33 - 79: 7(fvec4) Load 78 - 80: 48(ptr) AccessChain 53(I) 74 32 - Store 80 79 - 84: 9(int) Load 83(cpid) - Store 81(cpid) 84 - 87: 9(int) Load 83(cpid) - 89: 11 Load 53(I) - Store 88(param) 89 - 91: 9(int) Load 81(cpid) - Store 90(param) 91 - 92:20(HS_Main_Output) FunctionCall 24(@main(struct-HS_Input-vf4-vf41[3];u1;) 88(param) 90(param) - 93: 7(fvec4) CompositeExtract 92 0 - 95: 94(ptr) AccessChain 86(@entryPointOutput.m_Position) 87 - Store 95 93 - ControlBarrier 96 97 98 - 99: 9(int) Load 83(cpid) - 101: 100(bool) IEqual 99 33 - SelectionMerge 103 None - BranchConditional 101 102 103 - 102: Label - 106: 11 Load 53(I) - Store 105(param) 106 - 107:14(HS_Output) FunctionCall 17(HS_ConstFunc(struct-HS_Input-vf4-vf41[3];) 105(param) - Store 104(@patchConstantResult) 107 - 111: 34(ptr) AccessChain 104(@patchConstantResult) 33 33 - 112: 6(float) Load 111 - 114: 113(ptr) AccessChain 110(@patchConstantOutput.fTessFactor) 33 - Store 114 112 - 115: 34(ptr) AccessChain 104(@patchConstantResult) 33 32 + 81: 9(int) Load 80(cpid) + Store 78(cpid) 81 + 84: 9(int) Load 80(cpid) + 86: 11 Load 53(I) + Store 85(param) 86 + 88: 9(int) Load 78(cpid) + Store 87(param) 88 + 89:20(HS_Main_Output) FunctionCall 24(@main(struct-HS_Input-vf4-vf41[3];u1;) 85(param) 87(param) + 90: 7(fvec4) CompositeExtract 89 0 + 92: 91(ptr) AccessChain 83(@entryPointOutput.m_Position) 84 + Store 92 90 + ControlBarrier 93 94 95 + 96: 9(int) Load 80(cpid) + 98: 97(bool) IEqual 96 33 + SelectionMerge 100 None + BranchConditional 98 99 100 + 99: Label + 103: 11 Load 53(I) + Store 102(param) 103 + 104:14(HS_Output) FunctionCall 17(HS_ConstFunc(struct-HS_Input-vf4-vf41[3];) 102(param) + Store 101(@patchConstantResult) 104 + 108: 34(ptr) AccessChain 101(@patchConstantResult) 33 33 + 109: 6(float) Load 108 + 111: 110(ptr) AccessChain 107(@patchConstantOutput.fTessFactor) 33 + Store 111 109 + 112: 34(ptr) AccessChain 101(@patchConstantResult) 33 32 + 113: 6(float) Load 112 + 114: 110(ptr) AccessChain 107(@patchConstantOutput.fTessFactor) 32 + Store 114 113 + 115: 34(ptr) AccessChain 101(@patchConstantResult) 33 71 116: 6(float) Load 115 - 117: 113(ptr) AccessChain 110(@patchConstantOutput.fTessFactor) 32 + 117: 110(ptr) AccessChain 107(@patchConstantOutput.fTessFactor) 71 Store 117 116 - 118: 34(ptr) AccessChain 104(@patchConstantResult) 33 74 - 119: 6(float) Load 118 - 120: 113(ptr) AccessChain 110(@patchConstantOutput.fTessFactor) 74 - Store 120 119 - 124: 34(ptr) AccessChain 104(@patchConstantResult) 32 - 125: 6(float) Load 124 - 126: 113(ptr) AccessChain 123(@patchConstantOutput.fInsideTessFactor) 33 - Store 126 125 - Branch 103 - 103: Label + 121: 34(ptr) AccessChain 101(@patchConstantResult) 32 + 122: 6(float) Load 121 + 123: 110(ptr) AccessChain 120(@patchConstantOutput.fInsideTessFactor) 33 + Store 123 122 + Branch 100 + 100: Label Return FunctionEnd 17(HS_ConstFunc(struct-HS_Input-vf4-vf41[3];):14(HS_Output) Function None 15 diff --git a/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out b/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out index 2bf3c7c7d1..36e4b7707a 100644 --- a/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out +++ b/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out @@ -22,19 +22,57 @@ triangle order = cw 0:27 Function Definition: main( ( temp void) 0:27 Function Parameters: 0:? Sequence -0:27 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val}) +0:27 Sequence +0:27 move second child to first child ( temp 3-component vector of float) +0:27 val: direct index for structure ( temp 3-component vector of float) +0:27 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 0 (const int) +0:27 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:27 Constant: +0:27 0 (const int) +0:27 move second child to first child ( temp 3-component vector of float) +0:27 val: direct index for structure ( temp 3-component vector of float) +0:27 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:27 Constant: +0:27 1 (const int) +0:27 Constant: +0:27 0 (const int) +0:27 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:27 Constant: +0:27 1 (const int) +0:27 move second child to first child ( temp 3-component vector of float) +0:27 val: direct index for structure ( temp 3-component vector of float) +0:27 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:27 Constant: +0:27 2 (const int) +0:27 Constant: +0:27 0 (const int) +0:27 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:27 Constant: +0:27 2 (const int) 0:27 move second child to first child ( temp uint) 0:? 'cpid' ( temp uint) 0:? 'cpid' ( in uint InvocationID) -0:27 move second child to first child ( temp structure{ temp 3-component vector of float val}) -0:27 indirect index (layout( location=0) out structure{ temp 3-component vector of float val}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val}) -0:? 'cpid' ( in uint InvocationID) -0:27 Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val}) -0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'cpid' ( temp uint) +0:27 Sequence +0:27 move second child to first child ( temp 3-component vector of float) +0:27 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.val' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'cpid' ( in uint InvocationID) +0:27 val: direct index for structure ( temp 3-component vector of float) +0:27 Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:? 'cpid' ( temp uint) +0:27 Constant: +0:27 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -189,8 +227,8 @@ triangle order = cw 0:42 Branch: Return with expression 0:42 'o' ( temp structure{ temp 3-element array of float tfactor, temp float flInFactor}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val}) +0:? '@entryPointOutput.val' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) 0:? 'cpid' ( in uint InvocationID) 0:? '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter) 0:? '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner) @@ -222,19 +260,57 @@ triangle order = cw 0:27 Function Definition: main( ( temp void) 0:27 Function Parameters: 0:? Sequence -0:27 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val}) +0:27 Sequence +0:27 move second child to first child ( temp 3-component vector of float) +0:27 val: direct index for structure ( temp 3-component vector of float) +0:27 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 0 (const int) +0:27 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:27 Constant: +0:27 0 (const int) +0:27 move second child to first child ( temp 3-component vector of float) +0:27 val: direct index for structure ( temp 3-component vector of float) +0:27 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:27 Constant: +0:27 1 (const int) +0:27 Constant: +0:27 0 (const int) +0:27 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:27 Constant: +0:27 1 (const int) +0:27 move second child to first child ( temp 3-component vector of float) +0:27 val: direct index for structure ( temp 3-component vector of float) +0:27 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:27 Constant: +0:27 2 (const int) +0:27 Constant: +0:27 0 (const int) +0:27 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:27 Constant: +0:27 2 (const int) 0:27 move second child to first child ( temp uint) 0:? 'cpid' ( temp uint) 0:? 'cpid' ( in uint InvocationID) -0:27 move second child to first child ( temp structure{ temp 3-component vector of float val}) -0:27 indirect index (layout( location=0) out structure{ temp 3-component vector of float val}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val}) -0:? 'cpid' ( in uint InvocationID) -0:27 Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val}) -0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'cpid' ( temp uint) +0:27 Sequence +0:27 move second child to first child ( temp 3-component vector of float) +0:27 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.val' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'cpid' ( in uint InvocationID) +0:27 val: direct index for structure ( temp 3-component vector of float) +0:27 Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:? 'cpid' ( temp uint) +0:27 Constant: +0:27 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -389,20 +465,20 @@ triangle order = cw 0:42 Branch: Return with expression 0:42 'o' ( temp structure{ temp 3-element array of float tfactor, temp float flInFactor}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val}) +0:? '@entryPointOutput.val' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) 0:? 'cpid' ( in uint InvocationID) 0:? '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter) 0:? '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner) // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 124 +// Id's are bound by 135 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 41 45 48 94 108 + EntryPoint TessellationControl 4 "main" 42 57 60 105 119 ExecutionMode 4 OutputVertices 3 ExecutionMode 4 Triangles ExecutionMode 4 SpacingFractionalOdd @@ -423,33 +499,33 @@ triangle order = cw Name 24 "pcf_out" Name 28 "o" Name 39 "i" - Name 41 "i" - Name 43 "cpid" - Name 45 "cpid" - Name 48 "@entryPointOutput" - Name 50 "param" - Name 52 "param" - Name 66 "pcf_out" - Name 67 "i" - Name 68 "param" - Name 70 "param" - Name 74 "i" - Name 76 "param" - Name 78 "param" - Name 82 "i" + Name 42 "i.val" + Name 55 "cpid" + Name 57 "cpid" + Name 60 "@entryPointOutput.val" + Name 62 "param" + Name 64 "param" + Name 79 "pcf_out" + Name 80 "i" + Name 81 "param" Name 83 "param" - Name 85 "param" - Name 89 "@patchConstantResult" - Name 94 "@patchConstantOutput.tfactor" - Name 108 "@patchConstantOutput.flInFactor" - Name 112 "o" - Decorate 41(i) Location 0 - Decorate 45(cpid) BuiltIn InvocationId - Decorate 48(@entryPointOutput) Location 0 - Decorate 94(@patchConstantOutput.tfactor) Patch - Decorate 94(@patchConstantOutput.tfactor) BuiltIn TessLevelOuter - Decorate 108(@patchConstantOutput.flInFactor) Patch - Decorate 108(@patchConstantOutput.flInFactor) BuiltIn TessLevelInner + Name 86 "i" + Name 88 "param" + Name 90 "param" + Name 93 "i" + Name 94 "param" + Name 96 "param" + Name 100 "@patchConstantResult" + Name 105 "@patchConstantOutput.tfactor" + Name 119 "@patchConstantOutput.flInFactor" + Name 123 "o" + Decorate 42(i.val) Location 0 + Decorate 57(cpid) BuiltIn InvocationId + Decorate 60(@entryPointOutput.val) Location 0 + Decorate 105(@patchConstantOutput.tfactor) Patch + Decorate 105(@patchConstantOutput.tfactor) BuiltIn TessLevelOuter + Decorate 119(@patchConstantOutput.flInFactor) Patch + Decorate 119(@patchConstantOutput.flInFactor) BuiltIn TessLevelInner 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -470,105 +546,118 @@ triangle order = cw 29: TypeInt 32 1 30: 29(int) Constant 0 34: TypePointer Function 7(fvec3) - 40: TypePointer Input 11 - 41(i): 40(ptr) Variable Input - 44: TypePointer Input 9(int) - 45(cpid): 44(ptr) Variable Input - 47: TypePointer Output 20 -48(@entryPointOutput): 47(ptr) Variable Output - 55: TypePointer Output 14(hs_out_t) - 57: 9(int) Constant 2 - 58: 9(int) Constant 4 - 59: 9(int) Constant 0 - 61: TypeBool - 65: TypePointer Function 20 - 73: 29(int) Constant 1 - 75: 9(int) Constant 1 - 81: 29(int) Constant 2 - 88: TypePointer Function 22(hs_pcf_t) - 92: TypeArray 6(float) 58 - 93: TypePointer Output 92 -94(@patchConstantOutput.tfactor): 93(ptr) Variable Output - 95: TypePointer Function 6(float) - 98: TypePointer Output 6(float) - 106: TypeArray 6(float) 57 - 107: TypePointer Output 106 -108(@patchConstantOutput.flInFactor): 107(ptr) Variable Output - 119: 6(float) Constant 1082130432 + 40: TypeArray 7(fvec3) 10 + 41: TypePointer Input 40 + 42(i.val): 41(ptr) Variable Input + 43: TypePointer Input 7(fvec3) + 47: 29(int) Constant 1 + 51: 29(int) Constant 2 + 56: TypePointer Input 9(int) + 57(cpid): 56(ptr) Variable Input + 59: TypePointer Output 40 +60(@entryPointOutput.val): 59(ptr) Variable Output + 68: TypePointer Output 7(fvec3) + 70: 9(int) Constant 2 + 71: 9(int) Constant 4 + 72: 9(int) Constant 0 + 74: TypeBool + 78: TypePointer Function 20 + 87: 9(int) Constant 1 + 99: TypePointer Function 22(hs_pcf_t) + 103: TypeArray 6(float) 71 + 104: TypePointer Output 103 +105(@patchConstantOutput.tfactor): 104(ptr) Variable Output + 106: TypePointer Function 6(float) + 109: TypePointer Output 6(float) + 117: TypeArray 6(float) 70 + 118: TypePointer Output 117 +119(@patchConstantOutput.flInFactor): 118(ptr) Variable Output + 130: 6(float) Constant 1082130432 4(main): 2 Function None 3 5: Label 39(i): 12(ptr) Variable Function - 43(cpid): 13(ptr) Variable Function - 50(param): 12(ptr) Variable Function - 52(param): 13(ptr) Variable Function - 66(pcf_out): 65(ptr) Variable Function - 67(i): 12(ptr) Variable Function - 68(param): 12(ptr) Variable Function - 70(param): 13(ptr) Variable Function - 74(i): 12(ptr) Variable Function - 76(param): 12(ptr) Variable Function - 78(param): 13(ptr) Variable Function - 82(i): 12(ptr) Variable Function - 83(param): 12(ptr) Variable Function - 85(param): 13(ptr) Variable Function -89(@patchConstantResult): 88(ptr) Variable Function - 42: 11 Load 41(i) - Store 39(i) 42 - 46: 9(int) Load 45(cpid) - Store 43(cpid) 46 - 49: 9(int) Load 45(cpid) - 51: 11 Load 39(i) - Store 50(param) 51 - 53: 9(int) Load 43(cpid) - Store 52(param) 53 - 54:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 50(param) 52(param) - 56: 55(ptr) AccessChain 48(@entryPointOutput) 49 - Store 56 54 - ControlBarrier 57 58 59 - 60: 9(int) Load 45(cpid) - 62: 61(bool) IEqual 60 30 - SelectionMerge 64 None - BranchConditional 62 63 64 - 63: Label - 69: 11 Load 67(i) - Store 68(param) 69 - Store 70(param) 59 - 71:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 68(param) 70(param) - 72: 27(ptr) AccessChain 66(pcf_out) 30 - Store 72 71 - 77: 11 Load 74(i) - Store 76(param) 77 - Store 78(param) 75 - 79:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 76(param) 78(param) - 80: 27(ptr) AccessChain 66(pcf_out) 73 - Store 80 79 - 84: 11 Load 82(i) - Store 83(param) 84 - Store 85(param) 57 - 86:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 83(param) 85(param) - 87: 27(ptr) AccessChain 66(pcf_out) 81 - Store 87 86 - 90: 20 Load 66(pcf_out) - 91:22(hs_pcf_t) FunctionCall 25(PCF(struct-hs_out_t-vf31[3];) 90 - Store 89(@patchConstantResult) 91 - 96: 95(ptr) AccessChain 89(@patchConstantResult) 30 30 - 97: 6(float) Load 96 - 99: 98(ptr) AccessChain 94(@patchConstantOutput.tfactor) 30 - Store 99 97 - 100: 95(ptr) AccessChain 89(@patchConstantResult) 30 73 - 101: 6(float) Load 100 - 102: 98(ptr) AccessChain 94(@patchConstantOutput.tfactor) 73 - Store 102 101 - 103: 95(ptr) AccessChain 89(@patchConstantResult) 30 81 - 104: 6(float) Load 103 - 105: 98(ptr) AccessChain 94(@patchConstantOutput.tfactor) 81 - Store 105 104 - 109: 95(ptr) AccessChain 89(@patchConstantResult) 73 - 110: 6(float) Load 109 - 111: 98(ptr) AccessChain 108(@patchConstantOutput.flInFactor) 30 - Store 111 110 - Branch 64 - 64: Label + 55(cpid): 13(ptr) Variable Function + 62(param): 12(ptr) Variable Function + 64(param): 13(ptr) Variable Function + 79(pcf_out): 78(ptr) Variable Function + 80(i): 12(ptr) Variable Function + 81(param): 12(ptr) Variable Function + 83(param): 13(ptr) Variable Function + 86(i): 12(ptr) Variable Function + 88(param): 12(ptr) Variable Function + 90(param): 13(ptr) Variable Function + 93(i): 12(ptr) Variable Function + 94(param): 12(ptr) Variable Function + 96(param): 13(ptr) Variable Function +100(@patchConstantResult): 99(ptr) Variable Function + 44: 43(ptr) AccessChain 42(i.val) 30 + 45: 7(fvec3) Load 44 + 46: 34(ptr) AccessChain 39(i) 30 30 + Store 46 45 + 48: 43(ptr) AccessChain 42(i.val) 47 + 49: 7(fvec3) Load 48 + 50: 34(ptr) AccessChain 39(i) 47 30 + Store 50 49 + 52: 43(ptr) AccessChain 42(i.val) 51 + 53: 7(fvec3) Load 52 + 54: 34(ptr) AccessChain 39(i) 51 30 + Store 54 53 + 58: 9(int) Load 57(cpid) + Store 55(cpid) 58 + 61: 9(int) Load 57(cpid) + 63: 11 Load 39(i) + Store 62(param) 63 + 65: 9(int) Load 55(cpid) + Store 64(param) 65 + 66:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 62(param) 64(param) + 67: 7(fvec3) CompositeExtract 66 0 + 69: 68(ptr) AccessChain 60(@entryPointOutput.val) 61 + Store 69 67 + ControlBarrier 70 71 72 + 73: 9(int) Load 57(cpid) + 75: 74(bool) IEqual 73 30 + SelectionMerge 77 None + BranchConditional 75 76 77 + 76: Label + 82: 11 Load 80(i) + Store 81(param) 82 + Store 83(param) 72 + 84:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 81(param) 83(param) + 85: 27(ptr) AccessChain 79(pcf_out) 30 + Store 85 84 + 89: 11 Load 86(i) + Store 88(param) 89 + Store 90(param) 87 + 91:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 88(param) 90(param) + 92: 27(ptr) AccessChain 79(pcf_out) 47 + Store 92 91 + 95: 11 Load 93(i) + Store 94(param) 95 + Store 96(param) 70 + 97:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 94(param) 96(param) + 98: 27(ptr) AccessChain 79(pcf_out) 51 + Store 98 97 + 101: 20 Load 79(pcf_out) + 102:22(hs_pcf_t) FunctionCall 25(PCF(struct-hs_out_t-vf31[3];) 101 + Store 100(@patchConstantResult) 102 + 107: 106(ptr) AccessChain 100(@patchConstantResult) 30 30 + 108: 6(float) Load 107 + 110: 109(ptr) AccessChain 105(@patchConstantOutput.tfactor) 30 + Store 110 108 + 111: 106(ptr) AccessChain 100(@patchConstantResult) 30 47 + 112: 6(float) Load 111 + 113: 109(ptr) AccessChain 105(@patchConstantOutput.tfactor) 47 + Store 113 112 + 114: 106(ptr) AccessChain 100(@patchConstantResult) 30 51 + 115: 6(float) Load 114 + 116: 109(ptr) AccessChain 105(@patchConstantOutput.tfactor) 51 + Store 116 115 + 120: 106(ptr) AccessChain 100(@patchConstantResult) 47 + 121: 6(float) Load 120 + 122: 109(ptr) AccessChain 119(@patchConstantOutput.flInFactor) 30 + Store 122 121 + Branch 77 + 77: Label Return FunctionEnd 18(@main(struct-hs_in_t-vf31[3];u1;):14(hs_out_t) Function None 15 @@ -587,18 +676,18 @@ triangle order = cw 25(PCF(struct-hs_out_t-vf31[3];):22(hs_pcf_t) Function None 23 24(pcf_out): 20 FunctionParameter 26: Label - 112(o): 88(ptr) Variable Function - 113: 6(float) CompositeExtract 24(pcf_out) 0 0 0 - 114: 95(ptr) AccessChain 112(o) 30 30 - Store 114 113 - 115: 6(float) CompositeExtract 24(pcf_out) 1 0 0 - 116: 95(ptr) AccessChain 112(o) 30 73 - Store 116 115 - 117: 6(float) CompositeExtract 24(pcf_out) 2 0 0 - 118: 95(ptr) AccessChain 112(o) 30 81 - Store 118 117 - 120: 95(ptr) AccessChain 112(o) 73 - Store 120 119 - 121:22(hs_pcf_t) Load 112(o) - ReturnValue 121 + 123(o): 99(ptr) Variable Function + 124: 6(float) CompositeExtract 24(pcf_out) 0 0 0 + 125: 106(ptr) AccessChain 123(o) 30 30 + Store 125 124 + 126: 6(float) CompositeExtract 24(pcf_out) 1 0 0 + 127: 106(ptr) AccessChain 123(o) 30 47 + Store 127 126 + 128: 6(float) CompositeExtract 24(pcf_out) 2 0 0 + 129: 106(ptr) AccessChain 123(o) 30 51 + Store 129 128 + 131: 106(ptr) AccessChain 123(o) 47 + Store 131 130 + 132:22(hs_pcf_t) Load 123(o) + ReturnValue 132 FunctionEnd diff --git a/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out b/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out index 62e48f7420..e14bcb25b8 100644 --- a/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out +++ b/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out @@ -29,19 +29,57 @@ triangle order = cw 0:28 Function Definition: main( ( temp void) 0:28 Function Parameters: 0:? Sequence -0:28 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val}) +0:28 Sequence +0:28 move second child to first child ( temp 3-component vector of float) +0:28 val: direct index for structure ( temp 3-component vector of float) +0:28 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:28 Constant: +0:28 0 (const int) +0:28 Constant: +0:28 0 (const int) +0:28 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:28 Constant: +0:28 0 (const int) +0:28 move second child to first child ( temp 3-component vector of float) +0:28 val: direct index for structure ( temp 3-component vector of float) +0:28 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:28 Constant: +0:28 1 (const int) +0:28 Constant: +0:28 0 (const int) +0:28 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:28 Constant: +0:28 1 (const int) +0:28 move second child to first child ( temp 3-component vector of float) +0:28 val: direct index for structure ( temp 3-component vector of float) +0:28 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:28 Constant: +0:28 2 (const int) +0:28 Constant: +0:28 0 (const int) +0:28 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:28 Constant: +0:28 2 (const int) 0:28 move second child to first child ( temp uint) 0:? 'cpid' ( temp uint) 0:? 'cpid' ( in uint InvocationID) -0:28 move second child to first child ( temp structure{ temp 3-component vector of float val}) -0:28 indirect index (layout( location=0) out structure{ temp 3-component vector of float val}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val}) -0:? 'cpid' ( in uint InvocationID) -0:28 Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val}) -0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'cpid' ( temp uint) +0:28 Sequence +0:28 move second child to first child ( temp 3-component vector of float) +0:28 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.val' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'cpid' ( in uint InvocationID) +0:28 val: direct index for structure ( temp 3-component vector of float) +0:28 Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:? 'cpid' ( temp uint) +0:28 Constant: +0:28 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -198,8 +236,8 @@ triangle order = cw 0:46 Branch: Return with expression 0:46 'o' ( temp structure{ temp 3-element array of float tfactor, temp float flInFactor}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val}) +0:? '@entryPointOutput.val' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) 0:? 'cpid' ( in uint InvocationID) 0:? '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter) 0:? '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner) @@ -238,19 +276,57 @@ triangle order = cw 0:28 Function Definition: main( ( temp void) 0:28 Function Parameters: 0:? Sequence -0:28 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val}) +0:28 Sequence +0:28 move second child to first child ( temp 3-component vector of float) +0:28 val: direct index for structure ( temp 3-component vector of float) +0:28 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:28 Constant: +0:28 0 (const int) +0:28 Constant: +0:28 0 (const int) +0:28 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:28 Constant: +0:28 0 (const int) +0:28 move second child to first child ( temp 3-component vector of float) +0:28 val: direct index for structure ( temp 3-component vector of float) +0:28 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:28 Constant: +0:28 1 (const int) +0:28 Constant: +0:28 0 (const int) +0:28 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:28 Constant: +0:28 1 (const int) +0:28 move second child to first child ( temp 3-component vector of float) +0:28 val: direct index for structure ( temp 3-component vector of float) +0:28 direct index ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:28 Constant: +0:28 2 (const int) +0:28 Constant: +0:28 0 (const int) +0:28 direct index (layout( location=0) in 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) +0:28 Constant: +0:28 2 (const int) 0:28 move second child to first child ( temp uint) 0:? 'cpid' ( temp uint) 0:? 'cpid' ( in uint InvocationID) -0:28 move second child to first child ( temp structure{ temp 3-component vector of float val}) -0:28 indirect index (layout( location=0) out structure{ temp 3-component vector of float val}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val}) -0:? 'cpid' ( in uint InvocationID) -0:28 Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val}) -0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) -0:? 'cpid' ( temp uint) +0:28 Sequence +0:28 move second child to first child ( temp 3-component vector of float) +0:28 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.val' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'cpid' ( in uint InvocationID) +0:28 val: direct index for structure ( temp 3-component vector of float) +0:28 Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val}) +0:? 'i' ( temp 3-element array of structure{ temp 3-component vector of float val}) +0:? 'cpid' ( temp uint) +0:28 Constant: +0:28 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -407,20 +483,20 @@ triangle order = cw 0:46 Branch: Return with expression 0:46 'o' ( temp structure{ temp 3-element array of float tfactor, temp float flInFactor}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val}) -0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val}) +0:? '@entryPointOutput.val' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'i.val' (layout( location=0) in 3-element array of 3-component vector of float) 0:? 'cpid' ( in uint InvocationID) 0:? '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter) 0:? '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner) // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 126 +// Id's are bound by 137 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 42 46 49 96 110 + EntryPoint TessellationControl 4 "main" 43 58 61 107 121 ExecutionMode 4 OutputVertices 3 ExecutionMode 4 Triangles ExecutionMode 4 SpacingFractionalOdd @@ -442,33 +518,33 @@ triangle order = cw Name 25 "pcf_in" Name 31 "o" Name 40 "i" - Name 42 "i" - Name 44 "cpid" - Name 46 "cpid" - Name 49 "@entryPointOutput" - Name 51 "param" - Name 53 "param" - Name 67 "pcf_out" - Name 68 "i" - Name 69 "param" - Name 71 "param" - Name 75 "i" - Name 77 "param" - Name 79 "param" - Name 83 "i" + Name 43 "i.val" + Name 56 "cpid" + Name 58 "cpid" + Name 61 "@entryPointOutput.val" + Name 63 "param" + Name 65 "param" + Name 80 "pcf_out" + Name 81 "i" + Name 82 "param" Name 84 "param" - Name 86 "param" - Name 90 "@patchConstantResult" - Name 96 "@patchConstantOutput.tfactor" - Name 110 "@patchConstantOutput.flInFactor" - Name 114 "o" - Decorate 42(i) Location 0 - Decorate 46(cpid) BuiltIn InvocationId - Decorate 49(@entryPointOutput) Location 0 - Decorate 96(@patchConstantOutput.tfactor) Patch - Decorate 96(@patchConstantOutput.tfactor) BuiltIn TessLevelOuter - Decorate 110(@patchConstantOutput.flInFactor) Patch - Decorate 110(@patchConstantOutput.flInFactor) BuiltIn TessLevelInner + Name 87 "i" + Name 89 "param" + Name 91 "param" + Name 94 "i" + Name 95 "param" + Name 97 "param" + Name 101 "@patchConstantResult" + Name 107 "@patchConstantOutput.tfactor" + Name 121 "@patchConstantOutput.flInFactor" + Name 125 "o" + Decorate 43(i.val) Location 0 + Decorate 58(cpid) BuiltIn InvocationId + Decorate 61(@entryPointOutput.val) Location 0 + Decorate 107(@patchConstantOutput.tfactor) Patch + Decorate 107(@patchConstantOutput.tfactor) BuiltIn TessLevelOuter + Decorate 121(@patchConstantOutput.flInFactor) Patch + Decorate 121(@patchConstantOutput.flInFactor) BuiltIn TessLevelInner 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -489,106 +565,119 @@ triangle order = cw 29: 28(int) Constant 0 30: TypePointer Function 14(hs_out_t) 35: TypePointer Function 7(fvec3) - 41: TypePointer Input 11 - 42(i): 41(ptr) Variable Input - 45: TypePointer Input 9(int) - 46(cpid): 45(ptr) Variable Input - 48: TypePointer Output 20 -49(@entryPointOutput): 48(ptr) Variable Output - 56: TypePointer Output 14(hs_out_t) - 58: 9(int) Constant 2 - 59: 9(int) Constant 4 - 60: 9(int) Constant 0 - 62: TypeBool - 66: TypePointer Function 20 - 74: 28(int) Constant 1 - 76: 9(int) Constant 1 - 82: 28(int) Constant 2 - 89: TypePointer Function 22(hs_pcf_t) - 94: TypeArray 6(float) 59 - 95: TypePointer Output 94 -96(@patchConstantOutput.tfactor): 95(ptr) Variable Output - 97: TypePointer Function 6(float) - 100: TypePointer Output 6(float) - 108: TypeArray 6(float) 58 - 109: TypePointer Output 108 -110(@patchConstantOutput.flInFactor): 109(ptr) Variable Output - 121: 6(float) Constant 1082130432 + 41: TypeArray 7(fvec3) 10 + 42: TypePointer Input 41 + 43(i.val): 42(ptr) Variable Input + 44: TypePointer Input 7(fvec3) + 48: 28(int) Constant 1 + 52: 28(int) Constant 2 + 57: TypePointer Input 9(int) + 58(cpid): 57(ptr) Variable Input + 60: TypePointer Output 41 +61(@entryPointOutput.val): 60(ptr) Variable Output + 69: TypePointer Output 7(fvec3) + 71: 9(int) Constant 2 + 72: 9(int) Constant 4 + 73: 9(int) Constant 0 + 75: TypeBool + 79: TypePointer Function 20 + 88: 9(int) Constant 1 + 100: TypePointer Function 22(hs_pcf_t) + 105: TypeArray 6(float) 72 + 106: TypePointer Output 105 +107(@patchConstantOutput.tfactor): 106(ptr) Variable Output + 108: TypePointer Function 6(float) + 111: TypePointer Output 6(float) + 119: TypeArray 6(float) 71 + 120: TypePointer Output 119 +121(@patchConstantOutput.flInFactor): 120(ptr) Variable Output + 132: 6(float) Constant 1082130432 4(main): 2 Function None 3 5: Label 40(i): 12(ptr) Variable Function - 44(cpid): 13(ptr) Variable Function - 51(param): 12(ptr) Variable Function - 53(param): 13(ptr) Variable Function - 67(pcf_out): 66(ptr) Variable Function - 68(i): 12(ptr) Variable Function - 69(param): 12(ptr) Variable Function - 71(param): 13(ptr) Variable Function - 75(i): 12(ptr) Variable Function - 77(param): 12(ptr) Variable Function - 79(param): 13(ptr) Variable Function - 83(i): 12(ptr) Variable Function - 84(param): 12(ptr) Variable Function - 86(param): 13(ptr) Variable Function -90(@patchConstantResult): 89(ptr) Variable Function - 43: 11 Load 42(i) - Store 40(i) 43 - 47: 9(int) Load 46(cpid) - Store 44(cpid) 47 - 50: 9(int) Load 46(cpid) - 52: 11 Load 40(i) - Store 51(param) 52 - 54: 9(int) Load 44(cpid) - Store 53(param) 54 - 55:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 51(param) 53(param) - 57: 56(ptr) AccessChain 49(@entryPointOutput) 50 - Store 57 55 - ControlBarrier 58 59 60 - 61: 9(int) Load 46(cpid) - 63: 62(bool) IEqual 61 29 - SelectionMerge 65 None - BranchConditional 63 64 65 - 64: Label - 70: 11 Load 68(i) - Store 69(param) 70 - Store 71(param) 60 - 72:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 69(param) 71(param) - 73: 30(ptr) AccessChain 67(pcf_out) 29 - Store 73 72 - 78: 11 Load 75(i) - Store 77(param) 78 - Store 79(param) 76 - 80:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 77(param) 79(param) - 81: 30(ptr) AccessChain 67(pcf_out) 74 - Store 81 80 - 85: 11 Load 83(i) - Store 84(param) 85 - Store 86(param) 58 - 87:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 84(param) 86(param) - 88: 30(ptr) AccessChain 67(pcf_out) 82 - Store 88 87 - 91: 20 Load 67(pcf_out) - 92: 11 Load 40(i) - 93:22(hs_pcf_t) FunctionCall 26(PCF(struct-hs_out_t-vf31[3];struct-hs_in_t-vf31[3];) 91 92 - Store 90(@patchConstantResult) 93 - 98: 97(ptr) AccessChain 90(@patchConstantResult) 29 29 - 99: 6(float) Load 98 - 101: 100(ptr) AccessChain 96(@patchConstantOutput.tfactor) 29 - Store 101 99 - 102: 97(ptr) AccessChain 90(@patchConstantResult) 29 74 - 103: 6(float) Load 102 - 104: 100(ptr) AccessChain 96(@patchConstantOutput.tfactor) 74 - Store 104 103 - 105: 97(ptr) AccessChain 90(@patchConstantResult) 29 82 - 106: 6(float) Load 105 - 107: 100(ptr) AccessChain 96(@patchConstantOutput.tfactor) 82 - Store 107 106 - 111: 97(ptr) AccessChain 90(@patchConstantResult) 74 - 112: 6(float) Load 111 - 113: 100(ptr) AccessChain 110(@patchConstantOutput.flInFactor) 29 - Store 113 112 - Branch 65 - 65: Label + 56(cpid): 13(ptr) Variable Function + 63(param): 12(ptr) Variable Function + 65(param): 13(ptr) Variable Function + 80(pcf_out): 79(ptr) Variable Function + 81(i): 12(ptr) Variable Function + 82(param): 12(ptr) Variable Function + 84(param): 13(ptr) Variable Function + 87(i): 12(ptr) Variable Function + 89(param): 12(ptr) Variable Function + 91(param): 13(ptr) Variable Function + 94(i): 12(ptr) Variable Function + 95(param): 12(ptr) Variable Function + 97(param): 13(ptr) Variable Function +101(@patchConstantResult): 100(ptr) Variable Function + 45: 44(ptr) AccessChain 43(i.val) 29 + 46: 7(fvec3) Load 45 + 47: 35(ptr) AccessChain 40(i) 29 29 + Store 47 46 + 49: 44(ptr) AccessChain 43(i.val) 48 + 50: 7(fvec3) Load 49 + 51: 35(ptr) AccessChain 40(i) 48 29 + Store 51 50 + 53: 44(ptr) AccessChain 43(i.val) 52 + 54: 7(fvec3) Load 53 + 55: 35(ptr) AccessChain 40(i) 52 29 + Store 55 54 + 59: 9(int) Load 58(cpid) + Store 56(cpid) 59 + 62: 9(int) Load 58(cpid) + 64: 11 Load 40(i) + Store 63(param) 64 + 66: 9(int) Load 56(cpid) + Store 65(param) 66 + 67:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 63(param) 65(param) + 68: 7(fvec3) CompositeExtract 67 0 + 70: 69(ptr) AccessChain 61(@entryPointOutput.val) 62 + Store 70 68 + ControlBarrier 71 72 73 + 74: 9(int) Load 58(cpid) + 76: 75(bool) IEqual 74 29 + SelectionMerge 78 None + BranchConditional 76 77 78 + 77: Label + 83: 11 Load 81(i) + Store 82(param) 83 + Store 84(param) 73 + 85:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 82(param) 84(param) + 86: 30(ptr) AccessChain 80(pcf_out) 29 + Store 86 85 + 90: 11 Load 87(i) + Store 89(param) 90 + Store 91(param) 88 + 92:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 89(param) 91(param) + 93: 30(ptr) AccessChain 80(pcf_out) 48 + Store 93 92 + 96: 11 Load 94(i) + Store 95(param) 96 + Store 97(param) 71 + 98:14(hs_out_t) FunctionCall 18(@main(struct-hs_in_t-vf31[3];u1;) 95(param) 97(param) + 99: 30(ptr) AccessChain 80(pcf_out) 52 + Store 99 98 + 102: 20 Load 80(pcf_out) + 103: 11 Load 40(i) + 104:22(hs_pcf_t) FunctionCall 26(PCF(struct-hs_out_t-vf31[3];struct-hs_in_t-vf31[3];) 102 103 + Store 101(@patchConstantResult) 104 + 109: 108(ptr) AccessChain 101(@patchConstantResult) 29 29 + 110: 6(float) Load 109 + 112: 111(ptr) AccessChain 107(@patchConstantOutput.tfactor) 29 + Store 112 110 + 113: 108(ptr) AccessChain 101(@patchConstantResult) 29 48 + 114: 6(float) Load 113 + 115: 111(ptr) AccessChain 107(@patchConstantOutput.tfactor) 48 + Store 115 114 + 116: 108(ptr) AccessChain 101(@patchConstantResult) 29 52 + 117: 6(float) Load 116 + 118: 111(ptr) AccessChain 107(@patchConstantOutput.tfactor) 52 + Store 118 117 + 122: 108(ptr) AccessChain 101(@patchConstantResult) 48 + 123: 6(float) Load 122 + 124: 111(ptr) AccessChain 121(@patchConstantOutput.flInFactor) 29 + Store 124 123 + Branch 78 + 78: Label Return FunctionEnd 18(@main(struct-hs_in_t-vf31[3];u1;):14(hs_out_t) Function None 15 @@ -608,18 +697,18 @@ triangle order = cw 24(pcf_out): 20 FunctionParameter 25(pcf_in): 11 FunctionParameter 27: Label - 114(o): 89(ptr) Variable Function - 115: 6(float) CompositeExtract 24(pcf_out) 0 0 0 - 116: 97(ptr) AccessChain 114(o) 29 29 - Store 116 115 - 117: 6(float) CompositeExtract 24(pcf_out) 1 0 0 - 118: 97(ptr) AccessChain 114(o) 29 74 - Store 118 117 - 119: 6(float) CompositeExtract 24(pcf_out) 2 0 0 - 120: 97(ptr) AccessChain 114(o) 29 82 - Store 120 119 - 122: 97(ptr) AccessChain 114(o) 74 - Store 122 121 - 123:22(hs_pcf_t) Load 114(o) - ReturnValue 123 + 125(o): 100(ptr) Variable Function + 126: 6(float) CompositeExtract 24(pcf_out) 0 0 0 + 127: 108(ptr) AccessChain 125(o) 29 29 + Store 127 126 + 128: 6(float) CompositeExtract 24(pcf_out) 1 0 0 + 129: 108(ptr) AccessChain 125(o) 29 48 + Store 129 128 + 130: 6(float) CompositeExtract 24(pcf_out) 2 0 0 + 131: 108(ptr) AccessChain 125(o) 29 52 + Store 131 130 + 133: 108(ptr) AccessChain 125(o) 48 + Store 133 132 + 134:22(hs_pcf_t) Load 125(o) + ReturnValue 134 FunctionEnd diff --git a/Test/baseResults/hlsl.hull.void.tesc.out b/Test/baseResults/hlsl.hull.void.tesc.out index 7c006db323..b9429dff12 100644 --- a/Test/baseResults/hlsl.hull.void.tesc.out +++ b/Test/baseResults/hlsl.hull.void.tesc.out @@ -25,15 +25,53 @@ triangle order = ccw 0:26 Function Definition: main( ( temp void) 0:26 Function Parameters: 0:? Sequence -0:26 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float cpoint}) -0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'InvocationId' ( in uint InvocationID) -0:26 Function Call: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 3-element array of 3-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 1 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 3-element array of 3-component vector of float) +0:26 Constant: +0:26 1 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 3-element array of 3-component vector of float) +0:26 Constant: +0:26 2 (const int) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'InvocationId' ( in uint InvocationID) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 Function Call: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -47,8 +85,8 @@ triangle order = ccw 0:33 Function Definition: PCF( ( temp void) 0:33 Function Parameters: 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float cpoint}) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 3-element array of 3-component vector of float) 0:? 'InvocationId' ( in uint InvocationID) @@ -81,15 +119,53 @@ triangle order = ccw 0:26 Function Definition: main( ( temp void) 0:26 Function Parameters: 0:? Sequence -0:26 move second child to first child ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float cpoint}) -0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'InvocationId' ( in uint InvocationID) -0:26 Function Call: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint}) -0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 3-element array of 3-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 1 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 3-element array of 3-component vector of float) +0:26 Constant: +0:26 1 (const int) +0:26 move second child to first child ( temp 3-component vector of float) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 direct index ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 direct index (layout( location=0) in 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 3-element array of 3-component vector of float) +0:26 Constant: +0:26 2 (const int) +0:26 Sequence +0:26 move second child to first child ( temp 3-component vector of float) +0:26 indirect index (layout( location=0) out 3-component vector of float) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'InvocationId' ( in uint InvocationID) +0:26 cpoint: direct index for structure ( temp 3-component vector of float) +0:26 Function Call: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint}) +0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) +0:26 Constant: +0:26 0 (const int) 0:? Barrier ( temp void) 0:? Test condition and select ( temp void) 0:? Condition @@ -103,18 +179,18 @@ triangle order = ccw 0:33 Function Definition: PCF( ( temp void) 0:33 Function Parameters: 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float cpoint}) -0:? 'ip' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float cpoint}) +0:? '@entryPointOutput.cpoint' (layout( location=0) out 3-element array of 3-component vector of float) +0:? 'ip.cpoint' (layout( location=0) in 3-element array of 3-component vector of float) 0:? 'InvocationId' ( in uint InvocationID) // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 55 +// Id's are bound by 67 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 33 37 39 + EntryPoint TessellationControl 4 "main" 34 48 50 ExecutionMode 4 OutputVertices 3 ExecutionMode 4 Triangles ExecutionMode 4 SpacingFractionalEven @@ -130,13 +206,13 @@ triangle order = ccw Name 18 "PCF(" Name 21 "output" Name 31 "ip" - Name 33 "ip" - Name 37 "@entryPointOutput" - Name 39 "InvocationId" - Name 41 "param" - Decorate 33(ip) Location 0 - Decorate 37(@entryPointOutput) Location 0 - Decorate 39(InvocationId) BuiltIn InvocationId + Name 34 "ip.cpoint" + Name 48 "@entryPointOutput.cpoint" + Name 50 "InvocationId" + Name 52 "param" + Decorate 34(ip.cpoint) Location 0 + Decorate 48(@entryPointOutput.cpoint) Location 0 + Decorate 50(InvocationId) BuiltIn InvocationId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -152,39 +228,53 @@ triangle order = ccw 22: TypeInt 32 1 23: 22(int) Constant 0 24: TypePointer Function 7(fvec3) - 32: TypePointer Input 11 - 33(ip): 32(ptr) Variable Input - 35: TypeArray 13(HS_OUT) 10 - 36: TypePointer Output 35 -37(@entryPointOutput): 36(ptr) Variable Output - 38: TypePointer Input 9(int) -39(InvocationId): 38(ptr) Variable Input - 44: TypePointer Output 13(HS_OUT) - 46: 9(int) Constant 2 - 47: 9(int) Constant 4 - 48: 9(int) Constant 0 - 50: TypeBool + 32: TypeArray 7(fvec3) 10 + 33: TypePointer Input 32 + 34(ip.cpoint): 33(ptr) Variable Input + 35: TypePointer Input 7(fvec3) + 39: 22(int) Constant 1 + 43: 22(int) Constant 2 + 47: TypePointer Output 32 +48(@entryPointOutput.cpoint): 47(ptr) Variable Output + 49: TypePointer Input 9(int) +50(InvocationId): 49(ptr) Variable Input + 56: TypePointer Output 7(fvec3) + 58: 9(int) Constant 2 + 59: 9(int) Constant 4 + 60: 9(int) Constant 0 + 62: TypeBool 4(main): 2 Function None 3 5: Label 31(ip): 12(ptr) Variable Function - 41(param): 12(ptr) Variable Function - 34: 11 Load 33(ip) - Store 31(ip) 34 - 40: 9(int) Load 39(InvocationId) - 42: 11 Load 31(ip) - Store 41(param) 42 - 43: 13(HS_OUT) FunctionCall 16(@main(struct-VS_OUT-vf31[3];) 41(param) - 45: 44(ptr) AccessChain 37(@entryPointOutput) 40 - Store 45 43 - ControlBarrier 46 47 48 - 49: 9(int) Load 39(InvocationId) - 51: 50(bool) IEqual 49 23 - SelectionMerge 53 None - BranchConditional 51 52 53 - 52: Label - 54: 2 FunctionCall 18(PCF() - Branch 53 - 53: Label + 52(param): 12(ptr) Variable Function + 36: 35(ptr) AccessChain 34(ip.cpoint) 23 + 37: 7(fvec3) Load 36 + 38: 24(ptr) AccessChain 31(ip) 23 23 + Store 38 37 + 40: 35(ptr) AccessChain 34(ip.cpoint) 39 + 41: 7(fvec3) Load 40 + 42: 24(ptr) AccessChain 31(ip) 39 23 + Store 42 41 + 44: 35(ptr) AccessChain 34(ip.cpoint) 43 + 45: 7(fvec3) Load 44 + 46: 24(ptr) AccessChain 31(ip) 43 23 + Store 46 45 + 51: 9(int) Load 50(InvocationId) + 53: 11 Load 31(ip) + Store 52(param) 53 + 54: 13(HS_OUT) FunctionCall 16(@main(struct-VS_OUT-vf31[3];) 52(param) + 55: 7(fvec3) CompositeExtract 54 0 + 57: 56(ptr) AccessChain 48(@entryPointOutput.cpoint) 51 + Store 57 55 + ControlBarrier 58 59 60 + 61: 9(int) Load 50(InvocationId) + 63: 62(bool) IEqual 61 23 + SelectionMerge 65 None + BranchConditional 63 64 65 + 64: Label + 66: 2 FunctionCall 18(PCF() + Branch 65 + 65: Label Return FunctionEnd 16(@main(struct-VS_OUT-vf31[3];): 13(HS_OUT) Function None 14 diff --git a/Test/baseResults/hlsl.struct.split.nested.geom.out b/Test/baseResults/hlsl.struct.split.nested.geom.out index 75b5003d8f..a4090d87d2 100644 --- a/Test/baseResults/hlsl.struct.split.nested.geom.out +++ b/Test/baseResults/hlsl.struct.split.nested.geom.out @@ -148,11 +148,8 @@ output primitive = triangle_strip 0:24 0 (const int) 0:24 Constant: 0:24 1 (const int) -0:24 tc: direct index for structure ( temp 2-component vector of float) -0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc}) -0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) -0:24 Constant: -0:24 0 (const int) +0:24 direct index (layout( location=0) in 2-component vector of float) +0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp 4-component vector of float) @@ -175,13 +172,10 @@ output primitive = triangle_strip 0:24 1 (const int) 0:24 Constant: 0:24 1 (const int) -0:24 tc: direct index for structure ( temp 2-component vector of float) -0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc}) -0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) -0:24 Constant: -0:24 1 (const int) +0:24 direct index (layout( location=0) in 2-component vector of float) +0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float) 0:24 Constant: -0:24 0 (const int) +0:24 1 (const int) 0:24 move second child to first child ( temp 4-component vector of float) 0:24 pos: direct index for structure ( temp 4-component vector of float) 0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) @@ -202,19 +196,16 @@ output primitive = triangle_strip 0:24 2 (const int) 0:24 Constant: 0:24 1 (const int) -0:24 tc: direct index for structure ( temp 2-component vector of float) -0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc}) -0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) -0:24 Constant: -0:24 2 (const int) +0:24 direct index (layout( location=0) in 2-component vector of float) +0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float) 0:24 Constant: -0:24 0 (const int) +0:24 2 (const int) 0:24 Function Call: @main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111; ( temp void) 0:? 'tin' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) 0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:? Linker Objects 0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) -0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) +0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float) 0:? 'ts.pos' ( out 4-component vector of float Position) 0:? 'ts.psIn.tc' (layout( location=0) out 2-component vector of float) 0:? 'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float) @@ -374,11 +365,8 @@ output primitive = triangle_strip 0:24 0 (const int) 0:24 Constant: 0:24 1 (const int) -0:24 tc: direct index for structure ( temp 2-component vector of float) -0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc}) -0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) -0:24 Constant: -0:24 0 (const int) +0:24 direct index (layout( location=0) in 2-component vector of float) +0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp 4-component vector of float) @@ -401,13 +389,10 @@ output primitive = triangle_strip 0:24 1 (const int) 0:24 Constant: 0:24 1 (const int) -0:24 tc: direct index for structure ( temp 2-component vector of float) -0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc}) -0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) -0:24 Constant: -0:24 1 (const int) +0:24 direct index (layout( location=0) in 2-component vector of float) +0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float) 0:24 Constant: -0:24 0 (const int) +0:24 1 (const int) 0:24 move second child to first child ( temp 4-component vector of float) 0:24 pos: direct index for structure ( temp 4-component vector of float) 0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) @@ -428,19 +413,16 @@ output primitive = triangle_strip 0:24 2 (const int) 0:24 Constant: 0:24 1 (const int) -0:24 tc: direct index for structure ( temp 2-component vector of float) -0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc}) -0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) -0:24 Constant: -0:24 2 (const int) +0:24 direct index (layout( location=0) in 2-component vector of float) +0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float) 0:24 Constant: -0:24 0 (const int) +0:24 2 (const int) 0:24 Function Call: @main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111; ( temp void) 0:? 'tin' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) 0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:? Linker Objects 0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) -0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) +0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float) 0:? 'ts.pos' ( out 4-component vector of float Position) 0:? 'ts.psIn.tc' (layout( location=0) out 2-component vector of float) 0:? 'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float) @@ -449,12 +431,12 @@ output primitive = triangle_strip // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 100 +// Id's are bound by 99 Capability Geometry 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 4 "main" 48 52 56 59 63 69 77 + EntryPoint Geometry 4 "main" 48 52 56 59 63 69 76 ExecutionMode 4 Triangles ExecutionMode 4 Invocations 1 ExecutionMode 4 OutputTriangleStrip @@ -481,19 +463,17 @@ output primitive = triangle_strip Name 63 "ts.contains_no_builtin_io.m1" Name 66 "tin" Name 69 "tin.pos" - Name 74 "PS_IN" - MemberName 74(PS_IN) 0 "tc" - Name 77 "tin" - Name 94 "ts" - Name 95 "param" - Name 97 "param" + Name 76 "tin.tc" + Name 93 "ts" + Name 94 "param" + Name 96 "param" Decorate 48(ts.pos) BuiltIn Position Decorate 52(ts.psIn.tc) Location 0 Decorate 56(ts.contains_no_builtin_io.m0_array[0]) Location 1 Decorate 59(ts.contains_no_builtin_io.m0_array[1]) Location 2 Decorate 63(ts.contains_no_builtin_io.m1) Location 3 Decorate 69(tin.pos) BuiltIn Position - Decorate 77(tin) Location 0 + Decorate 76(tin.tc) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -540,46 +520,45 @@ output primitive = triangle_strip 68: TypePointer Input 67 69(tin.pos): 68(ptr) Variable Input 70: TypePointer Input 7(fvec4) - 74(PS_IN): TypeStruct 8(fvec2) - 75: TypeArray 74(PS_IN) 11 - 76: TypePointer Input 75 - 77(tin): 76(ptr) Variable Input - 78: TypePointer Input 8(fvec2) + 74: TypeArray 8(fvec2) 11 + 75: TypePointer Input 74 + 76(tin.tc): 75(ptr) Variable Input + 77: TypePointer Input 8(fvec2) 4(main): 2 Function None 3 5: Label 66(tin): 13(ptr) Variable Function - 94(ts): 19(ptr) Variable Function - 95(param): 13(ptr) Variable Function - 97(param): 19(ptr) Variable Function + 93(ts): 19(ptr) Variable Function + 94(param): 13(ptr) Variable Function + 96(param): 19(ptr) Variable Function 71: 70(ptr) AccessChain 69(tin.pos) 26 72: 7(fvec4) Load 71 73: 32(ptr) AccessChain 66(tin) 26 26 Store 73 72 - 79: 78(ptr) AccessChain 77(tin) 26 26 - 80: 8(fvec2) Load 79 - 81: 38(ptr) AccessChain 66(tin) 26 34 - Store 81 80 - 82: 70(ptr) AccessChain 69(tin.pos) 34 - 83: 7(fvec4) Load 82 - 84: 32(ptr) AccessChain 66(tin) 34 26 - Store 84 83 - 85: 78(ptr) AccessChain 77(tin) 34 26 - 86: 8(fvec2) Load 85 - 87: 38(ptr) AccessChain 66(tin) 34 34 - Store 87 86 - 88: 70(ptr) AccessChain 69(tin.pos) 44 - 89: 7(fvec4) Load 88 - 90: 32(ptr) AccessChain 66(tin) 44 26 - Store 90 89 - 91: 78(ptr) AccessChain 77(tin) 44 26 - 92: 8(fvec2) Load 91 - 93: 38(ptr) AccessChain 66(tin) 44 34 - Store 93 92 - 96: 12 Load 66(tin) - Store 95(param) 96 - 98: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 95(param) 97(param) - 99: 18(GS_OUT) Load 97(param) - Store 94(ts) 99 + 78: 77(ptr) AccessChain 76(tin.tc) 26 + 79: 8(fvec2) Load 78 + 80: 38(ptr) AccessChain 66(tin) 26 34 + Store 80 79 + 81: 70(ptr) AccessChain 69(tin.pos) 34 + 82: 7(fvec4) Load 81 + 83: 32(ptr) AccessChain 66(tin) 34 26 + Store 83 82 + 84: 77(ptr) AccessChain 76(tin.tc) 34 + 85: 8(fvec2) Load 84 + 86: 38(ptr) AccessChain 66(tin) 34 34 + Store 86 85 + 87: 70(ptr) AccessChain 69(tin.pos) 44 + 88: 7(fvec4) Load 87 + 89: 32(ptr) AccessChain 66(tin) 44 26 + Store 89 88 + 90: 77(ptr) AccessChain 76(tin.tc) 44 + 91: 8(fvec2) Load 90 + 92: 38(ptr) AccessChain 66(tin) 44 34 + Store 92 91 + 95: 12 Load 66(tin) + Store 94(param) 95 + 97: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 94(param) 96(param) + 98: 18(GS_OUT) Load 96(param) + Store 93(ts) 98 Return FunctionEnd 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;): 2 Function None 20 diff --git a/Test/baseResults/hlsl.structarray.flatten.geom.out b/Test/baseResults/hlsl.structarray.flatten.geom.out index 426214bec1..8f2989752f 100644 --- a/Test/baseResults/hlsl.structarray.flatten.geom.out +++ b/Test/baseResults/hlsl.structarray.flatten.geom.out @@ -70,14 +70,86 @@ output primitive = triangle_strip 0:16 Function Definition: main( ( temp void) 0:16 Function Parameters: 0:? Sequence -0:16 move second child to first child ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) -0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) -0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Sequence +0:16 move second child to first child ( temp 4-component vector of float) +0:16 position: direct index for structure ( temp 4-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 0 (const int) +0:16 Constant: +0:16 0 (const int) +0:16 direct index (layout( location=0) in 4-component vector of float) +0:? 'vin.position' (layout( location=0) in 2-element array of 4-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 move second child to first child ( temp 4-component vector of float) +0:16 color: direct index for structure ( temp 4-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 0 (const int) +0:16 Constant: +0:16 1 (const int) +0:16 direct index (layout( location=1) in 4-component vector of float) +0:? 'vin.color' (layout( location=1) in 2-element array of 4-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 move second child to first child ( temp 2-component vector of float) +0:16 uv: direct index for structure ( temp 2-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 0 (const int) +0:16 Constant: +0:16 2 (const int) +0:16 direct index (layout( location=2) in 2-component vector of float) +0:? 'vin.uv' (layout( location=2) in 2-element array of 2-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 move second child to first child ( temp 4-component vector of float) +0:16 position: direct index for structure ( temp 4-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 1 (const int) +0:16 Constant: +0:16 0 (const int) +0:16 direct index (layout( location=0) in 4-component vector of float) +0:? 'vin.position' (layout( location=0) in 2-element array of 4-component vector of float) +0:16 Constant: +0:16 1 (const int) +0:16 move second child to first child ( temp 4-component vector of float) +0:16 color: direct index for structure ( temp 4-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 1 (const int) +0:16 Constant: +0:16 1 (const int) +0:16 direct index (layout( location=1) in 4-component vector of float) +0:? 'vin.color' (layout( location=1) in 2-element array of 4-component vector of float) +0:16 Constant: +0:16 1 (const int) +0:16 move second child to first child ( temp 2-component vector of float) +0:16 uv: direct index for structure ( temp 2-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 1 (const int) +0:16 Constant: +0:16 2 (const int) +0:16 direct index (layout( location=2) in 2-component vector of float) +0:? 'vin.uv' (layout( location=2) in 2-element array of 2-component vector of float) +0:16 Constant: +0:16 1 (const int) 0:16 Function Call: @main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21; ( temp void) 0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? 'outStream' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? Linker Objects -0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin.position' (layout( location=0) in 2-element array of 4-component vector of float) +0:? 'vin.color' (layout( location=1) in 2-element array of 4-component vector of float) +0:? 'vin.uv' (layout( location=2) in 2-element array of 2-component vector of float) 0:? 'outStream.position' ( out 4-component vector of float Position) 0:? 'outStream.color' (layout( location=0) out 4-component vector of float) 0:? 'outStream.uv' (layout( location=1) out 2-component vector of float) @@ -157,26 +229,98 @@ output primitive = triangle_strip 0:16 Function Definition: main( ( temp void) 0:16 Function Parameters: 0:? Sequence -0:16 move second child to first child ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) -0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) -0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Sequence +0:16 move second child to first child ( temp 4-component vector of float) +0:16 position: direct index for structure ( temp 4-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 0 (const int) +0:16 Constant: +0:16 0 (const int) +0:16 direct index (layout( location=0) in 4-component vector of float) +0:? 'vin.position' (layout( location=0) in 2-element array of 4-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 move second child to first child ( temp 4-component vector of float) +0:16 color: direct index for structure ( temp 4-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 0 (const int) +0:16 Constant: +0:16 1 (const int) +0:16 direct index (layout( location=1) in 4-component vector of float) +0:? 'vin.color' (layout( location=1) in 2-element array of 4-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 move second child to first child ( temp 2-component vector of float) +0:16 uv: direct index for structure ( temp 2-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 0 (const int) +0:16 Constant: +0:16 2 (const int) +0:16 direct index (layout( location=2) in 2-component vector of float) +0:? 'vin.uv' (layout( location=2) in 2-element array of 2-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 move second child to first child ( temp 4-component vector of float) +0:16 position: direct index for structure ( temp 4-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 1 (const int) +0:16 Constant: +0:16 0 (const int) +0:16 direct index (layout( location=0) in 4-component vector of float) +0:? 'vin.position' (layout( location=0) in 2-element array of 4-component vector of float) +0:16 Constant: +0:16 1 (const int) +0:16 move second child to first child ( temp 4-component vector of float) +0:16 color: direct index for structure ( temp 4-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 1 (const int) +0:16 Constant: +0:16 1 (const int) +0:16 direct index (layout( location=1) in 4-component vector of float) +0:? 'vin.color' (layout( location=1) in 2-element array of 4-component vector of float) +0:16 Constant: +0:16 1 (const int) +0:16 move second child to first child ( temp 2-component vector of float) +0:16 uv: direct index for structure ( temp 2-component vector of float) +0:16 direct index ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:16 Constant: +0:16 1 (const int) +0:16 Constant: +0:16 2 (const int) +0:16 direct index (layout( location=2) in 2-component vector of float) +0:? 'vin.uv' (layout( location=2) in 2-element array of 2-component vector of float) +0:16 Constant: +0:16 1 (const int) 0:16 Function Call: @main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21; ( temp void) 0:? 'vin' ( temp 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? 'outStream' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? Linker Objects -0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'vin.position' (layout( location=0) in 2-element array of 4-component vector of float) +0:? 'vin.color' (layout( location=1) in 2-element array of 4-component vector of float) +0:? 'vin.uv' (layout( location=2) in 2-element array of 2-component vector of float) 0:? 'outStream.position' ( out 4-component vector of float Position) 0:? 'outStream.color' (layout( location=0) out 4-component vector of float) 0:? 'outStream.uv' (layout( location=1) out 2-component vector of float) // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 58 +// Id's are bound by 82 Capability Geometry 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 4 "main" 38 41 45 50 + EntryPoint Geometry 4 "main" 38 41 45 51 56 62 ExecutionMode 4 InputLines ExecutionMode 4 Invocations 1 ExecutionMode 4 OutputTriangleStrip @@ -199,14 +343,18 @@ output primitive = triangle_strip Name 41 "outStream.color" Name 45 "outStream.uv" Name 48 "vin" - Name 50 "vin" - Name 52 "outStream" - Name 53 "param" - Name 55 "param" + Name 51 "vin.position" + Name 56 "vin.color" + Name 62 "vin.uv" + Name 76 "outStream" + Name 77 "param" + Name 79 "param" Decorate 38(outStream.position) BuiltIn Position Decorate 41(outStream.color) Location 0 Decorate 45(outStream.uv) Location 1 - Decorate 50(vin) Location 0 + Decorate 51(vin.position) Location 0 + Decorate 56(vin.color) Location 1 + Decorate 62(vin.uv) Location 2 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -231,21 +379,50 @@ output primitive = triangle_strip 41(outStream.color): 37(ptr) Variable Output 44: TypePointer Output 8(fvec2) 45(outStream.uv): 44(ptr) Variable Output - 49: TypePointer Input 12 - 50(vin): 49(ptr) Variable Input + 49: TypeArray 7(fvec4) 11 + 50: TypePointer Input 49 +51(vin.position): 50(ptr) Variable Input + 52: TypePointer Input 7(fvec4) + 56(vin.color): 50(ptr) Variable Input + 60: TypeArray 8(fvec2) 11 + 61: TypePointer Input 60 + 62(vin.uv): 61(ptr) Variable Input + 63: TypePointer Input 8(fvec2) 4(main): 2 Function None 3 5: Label 48(vin): 13(ptr) Variable Function - 52(outStream): 15(ptr) Variable Function - 53(param): 13(ptr) Variable Function - 55(param): 15(ptr) Variable Function - 51: 12 Load 50(vin) - Store 48(vin) 51 - 54: 12 Load 48(vin) - Store 53(param) 54 - 56: 2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 53(param) 55(param) - 57: 14(PS_IN) Load 55(param) - Store 52(outStream) 57 + 76(outStream): 15(ptr) Variable Function + 77(param): 13(ptr) Variable Function + 79(param): 15(ptr) Variable Function + 53: 52(ptr) AccessChain 51(vin.position) 33 + 54: 7(fvec4) Load 53 + 55: 24(ptr) AccessChain 48(vin) 33 33 + Store 55 54 + 57: 52(ptr) AccessChain 56(vin.color) 33 + 58: 7(fvec4) Load 57 + 59: 24(ptr) AccessChain 48(vin) 33 23 + Store 59 58 + 64: 63(ptr) AccessChain 62(vin.uv) 33 + 65: 8(fvec2) Load 64 + 66: 29(ptr) AccessChain 48(vin) 33 28 + Store 66 65 + 67: 52(ptr) AccessChain 51(vin.position) 23 + 68: 7(fvec4) Load 67 + 69: 24(ptr) AccessChain 48(vin) 23 33 + Store 69 68 + 70: 52(ptr) AccessChain 56(vin.color) 23 + 71: 7(fvec4) Load 70 + 72: 24(ptr) AccessChain 48(vin) 23 23 + Store 72 71 + 73: 63(ptr) AccessChain 62(vin.uv) 23 + 74: 8(fvec2) Load 73 + 75: 29(ptr) AccessChain 48(vin) 23 28 + Store 75 74 + 78: 12 Load 48(vin) + Store 77(param) 78 + 80: 2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 77(param) 79(param) + 81: 14(PS_IN) Load 79(param) + Store 76(outStream) 81 Return FunctionEnd 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;): 2 Function None 16 diff --git a/Test/baseResults/hlsl.tristream-append.geom.out b/Test/baseResults/hlsl.tristream-append.geom.out index 514ce16878..2d1e8a3263 100644 --- a/Test/baseResults/hlsl.tristream-append.geom.out +++ b/Test/baseResults/hlsl.tristream-append.geom.out @@ -42,9 +42,34 @@ output primitive = triangle_strip 0:14 Function Definition: main( ( temp void) 0:14 Function Parameters: 0:? Sequence -0:14 move second child to first child ( temp 3-element array of structure{}) -0:? 'input' ( temp 3-element array of structure{}) -0:? 'input' ( in 3-element array of structure{}) +0:14 Sequence +0:14 move second child to first child ( temp structure{}) +0:14 direct index ( temp structure{}) +0:? 'input' ( temp 3-element array of structure{}) +0:14 Constant: +0:14 0 (const int) +0:14 direct index ( in structure{}) +0:? 'input' ( in 3-element array of structure{}) +0:14 Constant: +0:14 0 (const int) +0:14 move second child to first child ( temp structure{}) +0:14 direct index ( temp structure{}) +0:? 'input' ( temp 3-element array of structure{}) +0:14 Constant: +0:14 1 (const int) +0:14 direct index ( in structure{}) +0:? 'input' ( in 3-element array of structure{}) +0:14 Constant: +0:14 1 (const int) +0:14 move second child to first child ( temp structure{}) +0:14 direct index ( temp structure{}) +0:? 'input' ( temp 3-element array of structure{}) +0:14 Constant: +0:14 2 (const int) +0:14 direct index ( in structure{}) +0:? 'input' ( in 3-element array of structure{}) +0:14 Constant: +0:14 2 (const int) 0:14 Function Call: @main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1; ( temp void) 0:? 'input' ( temp 3-element array of structure{}) 0:? 'TriStream' ( temp structure{}) @@ -97,9 +122,34 @@ output primitive = triangle_strip 0:14 Function Definition: main( ( temp void) 0:14 Function Parameters: 0:? Sequence -0:14 move second child to first child ( temp 3-element array of structure{}) -0:? 'input' ( temp 3-element array of structure{}) -0:? 'input' ( in 3-element array of structure{}) +0:14 Sequence +0:14 move second child to first child ( temp structure{}) +0:14 direct index ( temp structure{}) +0:? 'input' ( temp 3-element array of structure{}) +0:14 Constant: +0:14 0 (const int) +0:14 direct index ( in structure{}) +0:? 'input' ( in 3-element array of structure{}) +0:14 Constant: +0:14 0 (const int) +0:14 move second child to first child ( temp structure{}) +0:14 direct index ( temp structure{}) +0:? 'input' ( temp 3-element array of structure{}) +0:14 Constant: +0:14 1 (const int) +0:14 direct index ( in structure{}) +0:? 'input' ( in 3-element array of structure{}) +0:14 Constant: +0:14 1 (const int) +0:14 move second child to first child ( temp structure{}) +0:14 direct index ( temp structure{}) +0:? 'input' ( temp 3-element array of structure{}) +0:14 Constant: +0:14 2 (const int) +0:14 direct index ( in structure{}) +0:? 'input' ( in 3-element array of structure{}) +0:14 Constant: +0:14 2 (const int) 0:14 Function Call: @main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1; ( temp void) 0:? 'input' ( temp 3-element array of structure{}) 0:? 'TriStream' ( temp structure{}) @@ -108,7 +158,7 @@ output primitive = triangle_strip Validation failed // Module Version 10000 // Generated by (magic number): 80008 -// Id's are bound by 57 +// Id's are bound by 66 Capability Geometry 1: ExtInstImport "GLSL.std.450" @@ -136,9 +186,9 @@ Validation failed Name 44 "param" Name 47 "input" Name 49 "input" - Name 51 "TriStream" - Name 52 "param" - Name 54 "param" + Name 60 "TriStream" + Name 61 "param" + Name 63 "param" 2: TypeVoid 3: TypeFunction 2 6(GSPS_INPUT): TypeStruct @@ -157,19 +207,30 @@ Validation failed 40: 25(int) Constant 2 48: TypePointer Input 15 49(input): 48(ptr) Variable Input + 50: TypePointer Input 6(GSPS_INPUT) 4(main): 2 Function None 3 5: Label 47(input): 16(ptr) Variable Function - 51(TriStream): 7(ptr) Variable Function - 52(param): 16(ptr) Variable Function - 54(param): 7(ptr) Variable Function - 50: 15 Load 49(input) - Store 47(input) 50 - 53: 15 Load 47(input) - Store 52(param) 53 - 55: 2 FunctionCall 20(@main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1;) 52(param) 54(param) - 56:6(GSPS_INPUT) Load 54(param) - Store 51(TriStream) 56 + 60(TriStream): 7(ptr) Variable Function + 61(param): 16(ptr) Variable Function + 63(param): 7(ptr) Variable Function + 51: 50(ptr) AccessChain 49(input) 26 + 52:6(GSPS_INPUT) Load 51 + 53: 7(ptr) AccessChain 47(input) 26 + Store 53 52 + 54: 50(ptr) AccessChain 49(input) 33 + 55:6(GSPS_INPUT) Load 54 + 56: 7(ptr) AccessChain 47(input) 33 + Store 56 55 + 57: 50(ptr) AccessChain 49(input) 40 + 58:6(GSPS_INPUT) Load 57 + 59: 7(ptr) AccessChain 47(input) 40 + Store 59 58 + 62: 15 Load 47(input) + Store 61(param) 62 + 64: 2 FunctionCall 20(@main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1;) 61(param) 63(param) + 65:6(GSPS_INPUT) Load 63(param) + Store 60(TriStream) 65 Return FunctionEnd 11(EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1;): 2 Function None 8 diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index 2dc173fcad..79f7542327 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -1169,7 +1169,7 @@ bool HlslParseContext::shouldFlatten(const TType& type, TStorageQualifier qualif } // Top level variable flattening: construct data -void HlslParseContext::flatten(const TVariable& variable, bool linkage) +void HlslParseContext::flatten(const TVariable& variable, bool linkage, bool arrayed) { const TType& type = variable.getType(); @@ -1181,8 +1181,14 @@ void HlslParseContext::flatten(const TVariable& variable, bool linkage) TFlattenData(type.getQualifier().layoutBinding, type.getQualifier().layoutLocation))); - // the item is a map pair, so first->second is the TFlattenData itself. - flatten(variable, type, entry.first->second, variable.getName(), linkage, type.getQualifier(), nullptr); + // if flattening arrayed io struct, array each member of dereferenced type + if (arrayed) { + const TType dereferencedType(type, 0); + flatten(variable, dereferencedType, entry.first->second, variable.getName(), linkage, type.getQualifier(), type.getArraySizes()); + } + else { + flatten(variable, type, entry.first->second, variable.getName(), linkage, type.getQualifier(), nullptr); + } } // Recursively flatten the given variable at the provided type, building the flattenData as we go. @@ -1256,6 +1262,10 @@ int HlslParseContext::addFlattenedMember(const TVariable& variable, const TType& } } + // Only propagate arraysizes here for arrayed io + if (variable.getType().getQualifier().isArrayedIo(language) && builtInArraySizes != nullptr) + memberVariable->getWritableType().copyArraySizes(*builtInArraySizes); + flattenData.offsets.push_back(static_cast(flattenData.members.size())); flattenData.members.push_back(memberVariable); @@ -2068,11 +2078,8 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct // Further this return/in/out transform by flattening, splitting, and assigning locations const auto makeVariableInOut = [&](TVariable& variable) { if (variable.getType().isStruct()) { - if (variable.getType().getQualifier().isArrayedIo(language)) { - if (variable.getType().containsBuiltIn()) - split(variable); - } else if (shouldFlatten(variable.getType(), EvqVaryingIn /* not assigned yet, but close enough */, true)) - flatten(variable, false /* don't track linkage here, it will be tracked in assignToInterface() */); + bool arrayed = variable.getType().getQualifier().isArrayedIo(language); + flatten(variable, false /* don't track linkage here, it will be tracked in assignToInterface() */, arrayed); } // TODO: flatten arrays too // TODO: flatten everything in I/O @@ -2733,17 +2740,33 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op wasSplit(binaryNode->getLeft()); }; + // Return symbol if node is symbol or index ref + const auto getSymbol = [](const TIntermTyped* node) -> const TIntermSymbol* { + const TIntermSymbol* symbolNode = node->getAsSymbolNode(); + if (symbolNode != nullptr) + return symbolNode; + + const TIntermBinary* binaryNode = node->getAsBinaryNode(); + if (binaryNode != nullptr && (binaryNode->getOp() == EOpIndexDirect || binaryNode->getOp() == EOpIndexIndirect)) + return binaryNode->getLeft()->getAsSymbolNode(); + + return nullptr; + }; + // Return true if this stage assigns clip position with potentially inverted Y const auto assignsClipPos = [this](const TIntermTyped* node) -> bool { return node->getType().getQualifier().builtIn == EbvPosition && (language == EShLangVertex || language == EShLangGeometry || language == EShLangTessEvaluation); }; + const TIntermSymbol* leftSymbol = getSymbol(left); + const TIntermSymbol* rightSymbol = getSymbol(right); + const bool isSplitLeft = wasSplit(left) || indexesSplit(left); const bool isSplitRight = wasSplit(right) || indexesSplit(right); - const bool isFlattenLeft = wasFlattened(left); - const bool isFlattenRight = wasFlattened(right); + const bool isFlattenLeft = wasFlattened(leftSymbol); + const bool isFlattenRight = wasFlattened(rightSymbol); // OK to do a single assign if neither side is split or flattened. Otherwise, // fall through to a member-wise copy. @@ -2791,10 +2814,10 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op memberCount = left->getType().getCumulativeArraySize(); if (isFlattenLeft) - leftVariables = &flattenMap.find(left->getAsSymbolNode()->getId())->second.members; + leftVariables = &flattenMap.find(leftSymbol->getId())->second.members; if (isFlattenRight) { - rightVariables = &flattenMap.find(right->getAsSymbolNode()->getId())->second.members; + rightVariables = &flattenMap.find(rightSymbol->getId())->second.members; } else { // The RHS is not flattened. There are several cases: // 1. 1 item to copy: Use the RHS directly. @@ -2828,8 +2851,10 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op TStorageQualifier leftStorage = left->getType().getQualifier().storage; TStorageQualifier rightStorage = right->getType().getQualifier().storage; - int leftOffset = findSubtreeOffset(*left); - int rightOffset = findSubtreeOffset(*right); + int leftOffsetStart = findSubtreeOffset(*left); + int rightOffsetStart = findSubtreeOffset(*right); + int leftOffset = leftOffsetStart; + int rightOffset = rightOffsetStart; const auto getMember = [&](bool isLeft, const TType& type, int member, TIntermTyped* splitNode, int splitMember, bool flattened) @@ -2869,10 +2894,36 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op } } } else if (flattened && !shouldFlatten(derefType, isLeft ? leftStorage : rightStorage, false)) { - if (isLeft) + if (isLeft) { + // offset will cycle through variables for arrayed io + if (leftOffset >= static_cast(leftVariables->size())) + leftOffset = leftOffsetStart; subTree = intermediate.addSymbol(*(*leftVariables)[leftOffset++]); - else + } + else { + // offset will cycle through variables for arrayed io + if (rightOffset >= static_cast(rightVariables->size())) + rightOffset = rightOffsetStart; subTree = intermediate.addSymbol(*(*rightVariables)[rightOffset++]); + } + + // arrayed io + if (subTree->getType().isArray()) { + if (!arrayElement.empty()) { + const TType derefType(subTree->getType(), arrayElement.front()); + subTree = intermediate.addIndex(EOpIndexDirect, subTree, + intermediate.addConstantUnion(arrayElement.front(), loc), loc); + subTree->setType(derefType); + } + else { + // There's an index operation we should transfer to the output builtin. + assert(splitNode->getAsOperator() != nullptr && (splitNode->getAsOperator()->getOp() == EOpIndexIndirect)); + const TType splitDerefType(subTree->getType(), 0); + subTree = intermediate.addIndex(splitNode->getAsOperator()->getOp(), subTree, + splitNode->getAsBinaryNode()->getRight(), loc); + subTree->setType(splitDerefType); + } + } } else { // Index operator if it's an aggregate, else EOpNull const TOperator accessOp = type.isArray() ? EOpIndexDirect @@ -9911,8 +9962,8 @@ void HlslParseContext::addPatchConstantInvocation() TVariable* pcfOutput = makeInternalVariable("@patchConstantOutput", outType); pcfOutput->getWritableType().getQualifier().storage = EvqVaryingOut; - if (pcfOutput->getType().containsBuiltIn()) - split(*pcfOutput); + if (pcfOutput->getType().isStruct()) + flatten(*pcfOutput, false); assignToInterface(*pcfOutput); diff --git a/hlsl/hlslParseHelper.h b/hlsl/hlslParseHelper.h index 6f4166103d..3ca21c6c9d 100644 --- a/hlsl/hlslParseHelper.h +++ b/hlsl/hlslParseHelper.h @@ -276,7 +276,7 @@ class HlslParseContext : public TParseContextBase { void fixBuiltInIoType(TType&); - void flatten(const TVariable& variable, bool linkage); + void flatten(const TVariable& variable, bool linkage, bool arrayed = false); int flatten(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage, const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes); int flattenStruct(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage,