diff --git a/Test/baseResults/hlsl.array.frag.out b/Test/baseResults/hlsl.array.frag.out index c0c5a13e..52008e3c 100755 --- a/Test/baseResults/hlsl.array.frag.out +++ b/Test/baseResults/hlsl.array.frag.out @@ -57,7 +57,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:8 move second child to first child ( temp int) 0:? 'i' ( temp int) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:8 move second child to first child ( temp 3-element array of 4-component vector of float) 0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) @@ -69,7 +69,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) @@ -134,7 +134,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:8 move second child to first child ( temp int) 0:? 'i' ( temp int) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:8 move second child to first child ( temp 3-element array of 4-component vector of float) 0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) @@ -146,7 +146,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) // Module Version 10000 @@ -185,6 +185,7 @@ gl_FragCoord origin is upper left MemberDecorate 26($Global) 1 Offset 64 Decorate 26($Global) Block Decorate 28 DescriptorSet 0 + Decorate 68(i) Flat Decorate 68(i) Location 0 Decorate 72(input) Location 1 Decorate 75(@entryPointOutput) Location 0 diff --git a/Test/baseResults/hlsl.getsampleposition.dx10.frag.out b/Test/baseResults/hlsl.getsampleposition.dx10.frag.out index d8274fa5..3f346d40 100644 --- a/Test/baseResults/hlsl.getsampleposition.dx10.frag.out +++ b/Test/baseResults/hlsl.getsampleposition.dx10.frag.out @@ -260,7 +260,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:13 move second child to first child ( temp int) 0:? 'sample' ( temp int) -0:? 'sample' (layout( location=0) in int) +0:? 'sample' (layout( location=0) flat in int) 0:13 Sequence 0:13 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) @@ -284,7 +284,7 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray) 0:? 'Color' (layout( location=0) out 4-component vector of float) 0:? 'Depth' ( out float FragDepth) -0:? 'sample' (layout( location=0) in int) +0:? 'sample' (layout( location=0) flat in int) Linked fragment stage: @@ -551,7 +551,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:13 move second child to first child ( temp int) 0:? 'sample' ( temp int) -0:? 'sample' (layout( location=0) in int) +0:? 'sample' (layout( location=0) flat in int) 0:13 Sequence 0:13 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) @@ -575,7 +575,7 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray) 0:? 'Color' (layout( location=0) out 4-component vector of float) 0:? 'Depth' ( out float FragDepth) -0:? 'sample' (layout( location=0) in int) +0:? 'sample' (layout( location=0) flat in int) // Module Version 10000 // Generated by (magic number): 80001 @@ -619,6 +619,7 @@ gl_FragCoord origin is upper left Name 220 "g_sSamp" Decorate 23(g_tTex2dmsf4) DescriptorSet 0 Decorate 142(g_tTex2dmsf4a) DescriptorSet 0 + Decorate 204(sample) Flat Decorate 204(sample) Location 0 Decorate 211(Color) Location 0 Decorate 215(Depth) BuiltIn FragDepth diff --git a/Test/baseResults/hlsl.intrinsics.double.frag.out b/Test/baseResults/hlsl.intrinsics.double.frag.out index f08775ae..3f340813 100644 --- a/Test/baseResults/hlsl.intrinsics.double.frag.out +++ b/Test/baseResults/hlsl.intrinsics.double.frag.out @@ -53,10 +53,10 @@ gl_FragCoord origin is upper left 0:? 'inDV4' (layout( location=6) in 4-component vector of double) 0:5 move second child to first child ( temp uint) 0:? 'inU1a' ( temp uint) -0:? 'inU1a' (layout( location=8) in uint) +0:? 'inU1a' (layout( location=8) flat in uint) 0:5 move second child to first child ( temp uint) 0:? 'inU1b' ( temp uint) -0:? 'inU1b' (layout( location=9) in uint) +0:? 'inU1b' (layout( location=9) flat in uint) 0:5 move second child to first child ( temp float) 0:? '@entryPointOutput' (layout( location=0) out float) 0:5 Function Call: @PixelShaderFunction(d1;d1;d1;vd2;vd3;vd4;u1;u1; ( temp float) @@ -76,8 +76,8 @@ gl_FragCoord origin is upper left 0:? 'inDV2' (layout( location=3) in 2-component vector of double) 0:? 'inDV3' (layout( location=4) in 3-component vector of double) 0:? 'inDV4' (layout( location=6) in 4-component vector of double) -0:? 'inU1a' (layout( location=8) in uint) -0:? 'inU1b' (layout( location=9) in uint) +0:? 'inU1a' (layout( location=8) flat in uint) +0:? 'inU1b' (layout( location=9) flat in uint) Linked fragment stage: @@ -137,10 +137,10 @@ gl_FragCoord origin is upper left 0:? 'inDV4' (layout( location=6) in 4-component vector of double) 0:5 move second child to first child ( temp uint) 0:? 'inU1a' ( temp uint) -0:? 'inU1a' (layout( location=8) in uint) +0:? 'inU1a' (layout( location=8) flat in uint) 0:5 move second child to first child ( temp uint) 0:? 'inU1b' ( temp uint) -0:? 'inU1b' (layout( location=9) in uint) +0:? 'inU1b' (layout( location=9) flat in uint) 0:5 move second child to first child ( temp float) 0:? '@entryPointOutput' (layout( location=0) out float) 0:5 Function Call: @PixelShaderFunction(d1;d1;d1;vd2;vd3;vd4;u1;u1; ( temp float) @@ -160,8 +160,8 @@ gl_FragCoord origin is upper left 0:? 'inDV2' (layout( location=3) in 2-component vector of double) 0:? 'inDV3' (layout( location=4) in 3-component vector of double) 0:? 'inDV4' (layout( location=6) in 4-component vector of double) -0:? 'inU1a' (layout( location=8) in uint) -0:? 'inU1b' (layout( location=9) in uint) +0:? 'inU1a' (layout( location=8) flat in uint) +0:? 'inU1b' (layout( location=9) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -217,7 +217,9 @@ gl_FragCoord origin is upper left Decorate 54(inDV2) Location 3 Decorate 58(inDV3) Location 4 Decorate 62(inDV4) Location 6 + Decorate 66(inU1a) Flat Decorate 66(inU1a) Location 8 + Decorate 69(inU1b) Flat Decorate 69(inU1b) Location 9 Decorate 72(@entryPointOutput) Location 0 2: TypeVoid diff --git a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out b/Test/baseResults/hlsl.intrinsics.evalfns.frag.out index 90a4db5a..50da716c 100644 --- a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out +++ b/Test/baseResults/hlsl.intrinsics.evalfns.frag.out @@ -60,7 +60,7 @@ gl_FragCoord origin is upper left 0:? 'inF4' (layout( location=3) in 4-component vector of float) 0:3 move second child to first child ( temp 2-component vector of int) 0:? 'inI2' ( temp 2-component vector of int) -0:? 'inI2' (layout( location=4) in 2-component vector of int) +0:? 'inI2' (layout( location=4) flat in 2-component vector of int) 0:3 Function Call: @main(f1;vf2;vf3;vf4;vi2; ( temp void) 0:? 'inF1' ( temp float) 0:? 'inF2' ( temp 2-component vector of float) @@ -72,7 +72,7 @@ gl_FragCoord origin is upper left 0:? 'inF2' (layout( location=1) in 2-component vector of float) 0:? 'inF3' (layout( location=2) in 3-component vector of float) 0:? 'inF4' (layout( location=3) in 4-component vector of float) -0:? 'inI2' (layout( location=4) in 2-component vector of int) +0:? 'inI2' (layout( location=4) flat in 2-component vector of int) Linked fragment stage: @@ -139,7 +139,7 @@ gl_FragCoord origin is upper left 0:? 'inF4' (layout( location=3) in 4-component vector of float) 0:3 move second child to first child ( temp 2-component vector of int) 0:? 'inI2' ( temp 2-component vector of int) -0:? 'inI2' (layout( location=4) in 2-component vector of int) +0:? 'inI2' (layout( location=4) flat in 2-component vector of int) 0:3 Function Call: @main(f1;vf2;vf3;vf4;vi2; ( temp void) 0:? 'inF1' ( temp float) 0:? 'inF2' ( temp 2-component vector of float) @@ -151,7 +151,7 @@ gl_FragCoord origin is upper left 0:? 'inF2' (layout( location=1) in 2-component vector of float) 0:? 'inF3' (layout( location=2) in 3-component vector of float) 0:? 'inF4' (layout( location=3) in 4-component vector of float) -0:? 'inI2' (layout( location=4) in 2-component vector of int) +0:? 'inI2' (layout( location=4) flat in 2-component vector of int) // Module Version 10000 // Generated by (magic number): 80001 @@ -190,6 +190,7 @@ gl_FragCoord origin is upper left Decorate 55(inF2) Location 1 Decorate 59(inF3) Location 2 Decorate 63(inF4) Location 3 + Decorate 67(inI2) Flat Decorate 67(inI2) Location 4 2: TypeVoid 3: TypeFunction 2 diff --git a/Test/baseResults/hlsl.intrinsics.negative.frag.out b/Test/baseResults/hlsl.intrinsics.negative.frag.out index 68dd4c38..980cc96d 100644 --- a/Test/baseResults/hlsl.intrinsics.negative.frag.out +++ b/Test/baseResults/hlsl.intrinsics.negative.frag.out @@ -374,7 +374,7 @@ ERROR: node is still EOpNull! 0:? 'inF2' (layout( location=2) in 4-component vector of float) 0:80 move second child to first child ( temp 4-component vector of int) 0:? 'inI0' ( temp 4-component vector of int) -0:? 'inI0' (layout( location=3) in 4-component vector of int) +0:? 'inI0' (layout( location=3) flat in 4-component vector of int) 0:80 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:80 Function Call: @PixelShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float) @@ -518,7 +518,7 @@ ERROR: node is still EOpNull! 0:? 'inF0' (layout( location=0) in 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) 0:? 'inF2' (layout( location=2) in 4-component vector of float) -0:? 'inI0' (layout( location=3) in 4-component vector of int) +0:? 'inI0' (layout( location=3) flat in 4-component vector of int) Linked fragment stage: @@ -837,7 +837,7 @@ ERROR: node is still EOpNull! 0:? 'inF2' (layout( location=2) in 4-component vector of float) 0:80 move second child to first child ( temp 4-component vector of int) 0:? 'inI0' ( temp 4-component vector of int) -0:? 'inI0' (layout( location=3) in 4-component vector of int) +0:? 'inI0' (layout( location=3) flat in 4-component vector of int) 0:80 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:80 Function Call: @PixelShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float) @@ -981,6 +981,6 @@ ERROR: node is still EOpNull! 0:? 'inF0' (layout( location=0) in 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) 0:? 'inF2' (layout( location=2) in 4-component vector of float) -0:? 'inI0' (layout( location=3) in 4-component vector of int) +0:? 'inI0' (layout( location=3) flat in 4-component vector of int) SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/hlsl.precedence2.frag.out b/Test/baseResults/hlsl.precedence2.frag.out index 31e76c3a..cd223a64 100755 --- a/Test/baseResults/hlsl.precedence2.frag.out +++ b/Test/baseResults/hlsl.precedence2.frag.out @@ -30,16 +30,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp int) 0:? 'a1' ( temp int) -0:? 'a1' (layout( location=0) in int) +0:? 'a1' (layout( location=0) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a2' ( temp int) -0:? 'a2' (layout( location=1) in int) +0:? 'a2' (layout( location=1) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a3' ( temp int) -0:? 'a3' (layout( location=2) in int) +0:? 'a3' (layout( location=2) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a4' ( temp int) -0:? 'a4' (layout( location=3) in int) +0:? 'a4' (layout( location=3) flat in int) 0:7 move second child to first child ( temp int) 0:? '@entryPointOutput' (layout( location=0) out int) 0:7 Function Call: @PixelShaderFunction(i1;i1;i1;i1; ( temp int) @@ -49,10 +49,10 @@ gl_FragCoord origin is upper left 0:? 'a4' ( temp int) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out int) -0:? 'a1' (layout( location=0) in int) -0:? 'a2' (layout( location=1) in int) -0:? 'a3' (layout( location=2) in int) -0:? 'a4' (layout( location=3) in int) +0:? 'a1' (layout( location=0) flat in int) +0:? 'a2' (layout( location=1) flat in int) +0:? 'a3' (layout( location=2) flat in int) +0:? 'a4' (layout( location=3) flat in int) Linked fragment stage: @@ -89,16 +89,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp int) 0:? 'a1' ( temp int) -0:? 'a1' (layout( location=0) in int) +0:? 'a1' (layout( location=0) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a2' ( temp int) -0:? 'a2' (layout( location=1) in int) +0:? 'a2' (layout( location=1) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a3' ( temp int) -0:? 'a3' (layout( location=2) in int) +0:? 'a3' (layout( location=2) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a4' ( temp int) -0:? 'a4' (layout( location=3) in int) +0:? 'a4' (layout( location=3) flat in int) 0:7 move second child to first child ( temp int) 0:? '@entryPointOutput' (layout( location=0) out int) 0:7 Function Call: @PixelShaderFunction(i1;i1;i1;i1; ( temp int) @@ -108,10 +108,10 @@ gl_FragCoord origin is upper left 0:? 'a4' ( temp int) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out int) -0:? 'a1' (layout( location=0) in int) -0:? 'a2' (layout( location=1) in int) -0:? 'a3' (layout( location=2) in int) -0:? 'a4' (layout( location=3) in int) +0:? 'a1' (layout( location=0) flat in int) +0:? 'a2' (layout( location=1) flat in int) +0:? 'a3' (layout( location=2) flat in int) +0:? 'a4' (layout( location=3) flat in int) // Module Version 10000 // Generated by (magic number): 80001 @@ -142,9 +142,13 @@ gl_FragCoord origin is upper left Name 49 "param" Name 51 "param" Name 53 "param" + Decorate 34(a1) Flat Decorate 34(a1) Location 0 + Decorate 37(a2) Flat Decorate 37(a2) Location 1 + Decorate 40(a3) Flat Decorate 40(a3) Location 2 + Decorate 43(a4) Flat Decorate 43(a4) Location 3 Decorate 46(@entryPointOutput) Location 0 2: TypeVoid diff --git a/Test/baseResults/hlsl.struct.split.assign.frag.out b/Test/baseResults/hlsl.struct.split.assign.frag.out index 2228a8a4..7bce9c9a 100644 --- a/Test/baseResults/hlsl.struct.split.assign.frag.out +++ b/Test/baseResults/hlsl.struct.split.assign.frag.out @@ -20,7 +20,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp int) 0:? 'i' ( temp int) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:7 Sequence 0:7 move second child to first child ( temp float) 0:7 f: direct index for structure ( temp float) @@ -110,7 +110,7 @@ gl_FragCoord origin is upper left 0:? 'input' ( temp 3-element array of structure{ temp float f, temp 4-component vector of float pos}) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:? 'input' (layout( location=1) in 3-element array of structure{ temp float f}) 0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) @@ -139,7 +139,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp int) 0:? 'i' ( temp int) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:7 Sequence 0:7 move second child to first child ( temp float) 0:7 f: direct index for structure ( temp float) @@ -229,7 +229,7 @@ gl_FragCoord origin is upper left 0:? 'input' ( temp 3-element array of structure{ temp float f, temp 4-component vector of float pos}) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:? 'input' (layout( location=1) in 3-element array of structure{ temp float f}) 0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) @@ -261,6 +261,7 @@ gl_FragCoord origin is upper left Name 67 "@entryPointOutput" Name 68 "param" Name 70 "param" + Decorate 32(i) Flat Decorate 32(i) Location 0 Decorate 39(input) Location 1 Decorate 48(input_pos) BuiltIn FragCoord diff --git a/Test/baseResults/hlsl.structbuffer.append.fn.frag.out b/Test/baseResults/hlsl.structbuffer.append.fn.frag.out index 48724782..039d4e05 100644 --- a/Test/baseResults/hlsl.structbuffer.append.fn.frag.out +++ b/Test/baseResults/hlsl.structbuffer.append.fn.frag.out @@ -58,7 +58,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:19 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:19 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:19 Function Call: @main(u1; ( temp 4-component vector of float) @@ -70,7 +70,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -135,7 +135,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:19 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:19 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:19 Function Call: @main(u1; ( temp 4-component vector of float) @@ -147,7 +147,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -192,6 +192,7 @@ gl_FragCoord origin is upper left Decorate 50(sbuf_a@count) DescriptorSet 0 Decorate 51(sbuf_c) DescriptorSet 0 Decorate 52(sbuf_c@count) DescriptorSet 0 + Decorate 58(pos) Flat Decorate 58(pos) Location 0 Decorate 61(@entryPointOutput) Location 0 MemberDecorate 65(sbuf_a@count) 0 Offset 0 diff --git a/Test/baseResults/hlsl.structbuffer.append.frag.out b/Test/baseResults/hlsl.structbuffer.append.frag.out index 323e960c..8f63efef 100644 --- a/Test/baseResults/hlsl.structbuffer.append.frag.out +++ b/Test/baseResults/hlsl.structbuffer.append.frag.out @@ -45,7 +45,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:7 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:7 Function Call: @main(u1; ( temp 4-component vector of float) @@ -57,7 +57,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -109,7 +109,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:7 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:7 Function Call: @main(u1; ( temp 4-component vector of float) @@ -121,7 +121,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -158,6 +158,7 @@ gl_FragCoord origin is upper left Decorate 22(sbuf_a@count) DescriptorSet 0 Decorate 36(sbuf_c) DescriptorSet 0 Decorate 37(sbuf_c@count) DescriptorSet 0 + Decorate 48(pos) Flat Decorate 48(pos) Location 0 Decorate 51(@entryPointOutput) Location 0 Decorate 55(sbuf_unused) DescriptorSet 0 diff --git a/Test/baseResults/hlsl.structbuffer.atomics.frag.out b/Test/baseResults/hlsl.structbuffer.atomics.frag.out index c3a3f87a..04d780fa 100644 --- a/Test/baseResults/hlsl.structbuffer.atomics.frag.out +++ b/Test/baseResults/hlsl.structbuffer.atomics.frag.out @@ -224,7 +224,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -232,7 +232,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -463,7 +463,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -471,7 +471,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -498,6 +498,7 @@ gl_FragCoord origin is upper left MemberDecorate 15(sbuf) 0 Offset 0 Decorate 15(sbuf) BufferBlock Decorate 17(sbuf) DescriptorSet 0 + Decorate 80(pos) Flat Decorate 80(pos) Location 0 Decorate 83(@entryPointOutput) Location 0 2: TypeVoid diff --git a/Test/baseResults/hlsl.structbuffer.byte.frag.out b/Test/baseResults/hlsl.structbuffer.byte.frag.out index 65419467..c5d5dc34 100644 --- a/Test/baseResults/hlsl.structbuffer.byte.frag.out +++ b/Test/baseResults/hlsl.structbuffer.byte.frag.out @@ -149,7 +149,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -157,7 +157,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -313,7 +313,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -321,7 +321,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -352,6 +352,7 @@ gl_FragCoord origin is upper left MemberDecorate 16(sbuf) 0 Offset 0 Decorate 16(sbuf) BufferBlock Decorate 18(sbuf) DescriptorSet 0 + Decorate 107(pos) Flat Decorate 107(pos) Location 0 Decorate 110(@entryPointOutput) Location 0 2: TypeVoid diff --git a/Test/baseResults/hlsl.structbuffer.coherent.frag.out b/Test/baseResults/hlsl.structbuffer.coherent.frag.out index fab95f75..c3e5e730 100644 --- a/Test/baseResults/hlsl.structbuffer.coherent.frag.out +++ b/Test/baseResults/hlsl.structbuffer.coherent.frag.out @@ -74,7 +74,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -83,7 +83,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( row_major std430) coherent buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test} @data}) 0:? 'sbuf2' (layout( row_major std430) coherent buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -164,7 +164,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -173,7 +173,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( row_major std430) coherent buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test} @data}) 0:? 'sbuf2' (layout( row_major std430) coherent buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -217,6 +217,7 @@ gl_FragCoord origin is upper left MemberDecorate 30(sbuf) 0 Offset 0 Decorate 30(sbuf) BufferBlock Decorate 32(sbuf) DescriptorSet 0 + Decorate 71(pos) Flat Decorate 71(pos) Location 0 Decorate 74(@entryPointOutput) Location 0 2: TypeVoid diff --git a/Test/baseResults/hlsl.structbuffer.fn.frag.out b/Test/baseResults/hlsl.structbuffer.fn.frag.out index 0fcdab32..63aaa625 100644 --- a/Test/baseResults/hlsl.structbuffer.fn.frag.out +++ b/Test/baseResults/hlsl.structbuffer.fn.frag.out @@ -53,7 +53,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:20 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:20 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:20 Function Call: @main(u1; ( temp 4-component vector of float) @@ -64,7 +64,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf3' (layout( binding=12 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 3-component vector of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -124,7 +124,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:20 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:20 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:20 Function Call: @main(u1; ( temp 4-component vector of float) @@ -135,7 +135,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf3' (layout( binding=12 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 3-component vector of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -192,6 +192,7 @@ gl_FragCoord origin is upper left Decorate 48(sbuf2@count) DescriptorSet 0 Decorate 50(sbuf) DescriptorSet 0 Decorate 50(sbuf) Binding 10 + Decorate 63(pos) Flat Decorate 63(pos) Location 0 Decorate 66(@entryPointOutput) Location 0 MemberDecorate 70(sbuf2@count) 0 Offset 0 diff --git a/Test/baseResults/hlsl.structbuffer.frag.out b/Test/baseResults/hlsl.structbuffer.frag.out index 72fba3b7..d13b9752 100644 --- a/Test/baseResults/hlsl.structbuffer.frag.out +++ b/Test/baseResults/hlsl.structbuffer.frag.out @@ -80,7 +80,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -89,7 +89,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test, temp bool test2} @data}) 0:? 'sbuf2' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -176,7 +176,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -185,7 +185,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test, temp bool test2} @data}) 0:? 'sbuf2' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -238,6 +238,7 @@ gl_FragCoord origin is upper left MemberDecorate 59(sbuf2) 0 Offset 0 Decorate 59(sbuf2) BufferBlock Decorate 61(sbuf2) DescriptorSet 0 + Decorate 89(pos) Flat Decorate 89(pos) Location 0 Decorate 92(@entryPointOutput) Location 0 2: TypeVoid diff --git a/Test/baseResults/hlsl.structbuffer.incdec.frag.out b/Test/baseResults/hlsl.structbuffer.incdec.frag.out index ebd69416..6584210d 100644 --- a/Test/baseResults/hlsl.structbuffer.incdec.frag.out +++ b/Test/baseResults/hlsl.structbuffer.incdec.frag.out @@ -85,7 +85,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:7 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:7 Function Call: @main(u1; ( temp 4-component vector of float) @@ -97,7 +97,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf_rw_nocounter' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -189,7 +189,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:7 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:7 Function Call: @main(u1; ( temp 4-component vector of float) @@ -201,7 +201,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf_rw_nocounter' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -242,6 +242,7 @@ gl_FragCoord origin is upper left Decorate 34(sbuf_rw_i@count) BufferBlock Decorate 36(sbuf_rw_i@count) DescriptorSet 0 Decorate 43(sbuf_rw_d@count) DescriptorSet 0 + Decorate 63(pos) Flat Decorate 63(pos) Location 0 Decorate 66(@entryPointOutput) Location 0 2: TypeVoid diff --git a/Test/baseResults/hlsl.structbuffer.rw.frag.out b/Test/baseResults/hlsl.structbuffer.rw.frag.out index b1bba583..6d529ddc 100644 --- a/Test/baseResults/hlsl.structbuffer.rw.frag.out +++ b/Test/baseResults/hlsl.structbuffer.rw.frag.out @@ -74,7 +74,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -83,7 +83,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test} @data}) 0:? 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -164,7 +164,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -173,7 +173,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test} @data}) 0:? 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -213,6 +213,7 @@ gl_FragCoord origin is upper left MemberDecorate 30(sbuf) 0 Offset 0 Decorate 30(sbuf) BufferBlock Decorate 32(sbuf) DescriptorSet 0 + Decorate 71(pos) Flat Decorate 71(pos) Location 0 Decorate 74(@entryPointOutput) Location 0 2: TypeVoid diff --git a/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out b/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out index 14c2eb69..80bc107d 100644 --- a/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out +++ b/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out @@ -490,7 +490,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -498,7 +498,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -995,7 +995,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -1003,7 +1003,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 // Generated by (magic number): 80001 @@ -1037,6 +1037,7 @@ gl_FragCoord origin is upper left MemberDecorate 16(sbuf) 0 Offset 0 Decorate 16(sbuf) BufferBlock Decorate 18(sbuf) DescriptorSet 0 + Decorate 233(pos) Flat Decorate 233(pos) Location 0 Decorate 236(@entryPointOutput) Location 0 2: TypeVoid diff --git a/Test/baseResults/hlsl.switch.frag.out b/Test/baseResults/hlsl.switch.frag.out index c77da933..192e1b4f 100755 --- a/Test/baseResults/hlsl.switch.frag.out +++ b/Test/baseResults/hlsl.switch.frag.out @@ -129,10 +129,10 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) 0:2 move second child to first child ( temp int) 0:? 'c' ( temp int) -0:? 'c' (layout( location=1) in int) +0:? 'c' (layout( location=1) flat in int) 0:2 move second child to first child ( temp int) 0:? 'd' ( temp int) -0:? 'd' (layout( location=2) in int) +0:? 'd' (layout( location=2) flat in int) 0:2 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:2 Function Call: @PixelShaderFunction(vf4;i1;i1; ( temp 4-component vector of float) @@ -142,8 +142,8 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) -0:? 'c' (layout( location=1) in int) -0:? 'd' (layout( location=2) in int) +0:? 'c' (layout( location=1) flat in int) +0:? 'd' (layout( location=2) flat in int) Linked fragment stage: @@ -279,10 +279,10 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) 0:2 move second child to first child ( temp int) 0:? 'c' ( temp int) -0:? 'c' (layout( location=1) in int) +0:? 'c' (layout( location=1) flat in int) 0:2 move second child to first child ( temp int) 0:? 'd' ( temp int) -0:? 'd' (layout( location=2) in int) +0:? 'd' (layout( location=2) flat in int) 0:2 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:2 Function Call: @PixelShaderFunction(vf4;i1;i1; ( temp 4-component vector of float) @@ -292,8 +292,8 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) -0:? 'c' (layout( location=1) in int) -0:? 'd' (layout( location=2) in int) +0:? 'c' (layout( location=1) flat in int) +0:? 'd' (layout( location=2) flat in int) // Module Version 10000 // Generated by (magic number): 80001 @@ -321,7 +321,9 @@ gl_FragCoord origin is upper left Name 101 "param" Name 103 "param" Decorate 88(input) Location 0 + Decorate 92(c) Flat Decorate 92(c) Location 1 + Decorate 95(d) Flat Decorate 95(d) Location 2 Decorate 98(@entryPointOutput) Location 0 2: TypeVoid diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index 16d89320..faefd477 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -1338,7 +1338,23 @@ public: #else virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble; } #endif - + virtual bool isIntegerDomain() const + { + switch (basicType) { + case EbtInt: + case EbtUint: + case EbtInt64: + case EbtUint64: +#ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: +#endif + case EbtBool: + case EbtAtomicUint: + return true; + } + return false; + } virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint; } // "Image" is a superset of "Subpass" diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index acf6c2fd..bd3994d4 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -1525,15 +1525,17 @@ void HlslParseContext::fixBuiltInIoType(TType& type) } // Variables that correspond to the user-interface in and out of a stage -// (not the built-in interface) are assigned locations and -// registered as a linkage node (part of the stage's external interface). -// +// (not the built-in interface) are +// - assigned locations +// - corrected for interpolation +// * non-floating point values must be nointerpolation +// - registered as a linkage node (part of the stage's external interface). // Assumes it is called in the order in which locations should be assigned. -void HlslParseContext::assignLocations(TVariable& variable) +void HlslParseContext::assignToInterface(TVariable& variable) { const auto assignLocation = [&](TVariable& variable) { - const TType& type = variable.getType(); - const TQualifier& qualifier = type.getQualifier(); + TType& type = variable.getWritableType(); + TQualifier& qualifier = type.getQualifier(); if (qualifier.storage == EvqVaryingIn || qualifier.storage == EvqVaryingOut) { if (qualifier.builtIn == EbvNone) { // Strip off the outer array dimension for those having an extra one. @@ -1552,7 +1554,12 @@ void HlslParseContext::assignLocations(TVariable& variable) nextOutLocation += size; } } - + // Going into the fragment stage, integer-based stuff must be flat/nointerpolation + if (type.isIntegerDomain() && qualifier.builtIn == EbvNone && + qualifier.storage == EvqVaryingIn && language == EShLangFragment) { + qualifier.clearInterpolation(); + qualifier.flat = true; + } trackLinkage(variable); } }; @@ -1914,9 +1921,11 @@ void HlslParseContext::handleEntryPointAttributes(const TSourceLoc& loc, const T // ret = @shaderEntryPoint(args...); // oargs = args...; // } +// retType @shaderEntryPoint(args...) +// { body } // // The symbol table will still map the original entry point name to the -// the modified function and it's new name: +// the modified function and its new name: // // symbol table: shaderEntryPoint -> @shaderEntryPoint // @@ -1966,7 +1975,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct split(variable); } - assignLocations(variable); + assignToInterface(variable); }; if (entryPointOutput) makeVariableInOut(*entryPointOutput); @@ -2012,11 +2021,8 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct for (int i = 0; i < userFunction.getParamCount(); i++) { TParameter& param = userFunction[i]; argVars.push_back(makeInternalVariable(*param.name, *param.type)); - argVars.back()->getWritableType().getQualifier().makeTemporary(); - TIntermSymbol* arg = intermediate.addSymbol(*argVars.back()); - handleFunctionArgument(&callee, callingArgs, arg); if (param.type->getQualifier().isParamInput()) { intermediate.growAggregate(synthBody, handleAssign(loc, EOpAssign, arg, @@ -2062,7 +2068,6 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct } else { returnAssign = handleAssign(loc, EOpAssign, intermediate.addSymbol(*entryPointOutput), callReturn); } - intermediate.growAggregate(synthBody, returnAssign); } else intermediate.growAggregate(synthBody, callReturn); @@ -8835,7 +8840,7 @@ void HlslParseContext::addPatchConstantInvocation() if (pcfOutput->getType().containsBuiltInInterstageIO(language)) split(*pcfOutput); - assignLocations(*pcfOutput); + assignToInterface(*pcfOutput); TIntermSymbol* pcfOutputSym = intermediate.addSymbol(*pcfOutput, loc); diff --git a/hlsl/hlslParseHelper.h b/hlsl/hlslParseHelper.h index 9a881fbb..73e21c8b 100755 --- a/hlsl/hlslParseHelper.h +++ b/hlsl/hlslParseHelper.h @@ -77,7 +77,7 @@ public: TIntermTyped* handleUnaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* childNode); TIntermTyped* handleDotDereference(const TSourceLoc&, TIntermTyped* base, const TString& field); bool isBuiltInMethod(const TSourceLoc&, TIntermTyped* base, const TString& field); - void assignLocations(TVariable& variable); + void assignToInterface(TVariable& variable); void handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype); TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&, const TAttributeMap&, TIntermNode*& entryPointTree); TIntermNode* transformEntryPoint(const TSourceLoc&, TFunction&, const TAttributeMap&);