diff --git a/Test/baseResults/hlsl.load.array.dx10.frag.out b/Test/baseResults/hlsl.load.array.dx10.frag.out new file mode 100644 index 000000000..ecb43ca84 --- /dev/null +++ b/Test/baseResults/hlsl.load.array.dx10.frag.out @@ -0,0 +1,476 @@ +hlsl.load.array.dx10.frag +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:72 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:48 Function Parameters: +0:? Sequence +0:52 textureFetch (global 4-component vector of float) +0:52 'g_tTex1df4a' (uniform texture1DArray) +0:52 vector swizzle (temp 2-component vector of int) +0:52 'c3' (uniform 3-component vector of int) +0:52 Sequence +0:52 Constant: +0:52 0 (const int) +0:52 Constant: +0:52 1 (const int) +0:52 direct index (temp int) +0:52 'c3' (uniform 3-component vector of int) +0:52 Constant: +0:52 2 (const int) +0:53 textureFetch (global 4-component vector of int) +0:53 'g_tTex1di4a' (uniform itexture1DArray) +0:53 vector swizzle (temp 2-component vector of int) +0:53 'c3' (uniform 3-component vector of int) +0:53 Sequence +0:53 Constant: +0:53 0 (const int) +0:53 Constant: +0:53 1 (const int) +0:53 direct index (temp int) +0:53 'c3' (uniform 3-component vector of int) +0:53 Constant: +0:53 2 (const int) +0:54 textureFetch (global 4-component vector of uint) +0:54 'g_tTex1du4a' (uniform utexture1DArray) +0:54 vector swizzle (temp 2-component vector of int) +0:54 'c3' (uniform 3-component vector of int) +0:54 Sequence +0:54 Constant: +0:54 0 (const int) +0:54 Constant: +0:54 1 (const int) +0:54 direct index (temp int) +0:54 'c3' (uniform 3-component vector of int) +0:54 Constant: +0:54 2 (const int) +0:57 textureFetch (global 4-component vector of float) +0:57 'g_tTex2df4a' (uniform texture2DArray) +0:57 vector swizzle (temp 3-component vector of int) +0:57 'c4' (uniform 4-component vector of int) +0:57 Sequence +0:57 Constant: +0:57 0 (const int) +0:57 Constant: +0:57 1 (const int) +0:57 Constant: +0:57 2 (const int) +0:57 direct index (temp int) +0:57 'c4' (uniform 4-component vector of int) +0:57 Constant: +0:57 3 (const int) +0:58 textureFetch (global 4-component vector of int) +0:58 'g_tTex2di4a' (uniform itexture2DArray) +0:58 vector swizzle (temp 3-component vector of int) +0:58 'c4' (uniform 4-component vector of int) +0:58 Sequence +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1 (const int) +0:58 Constant: +0:58 2 (const int) +0:58 direct index (temp int) +0:58 'c4' (uniform 4-component vector of int) +0:58 Constant: +0:58 3 (const int) +0:59 textureFetch (global 4-component vector of uint) +0:59 'g_tTex2du4a' (uniform utexture2DArray) +0:59 vector swizzle (temp 3-component vector of int) +0:59 'c4' (uniform 4-component vector of int) +0:59 Sequence +0:59 Constant: +0:59 0 (const int) +0:59 Constant: +0:59 1 (const int) +0:59 Constant: +0:59 2 (const int) +0:59 direct index (temp int) +0:59 'c4' (uniform 4-component vector of int) +0:59 Constant: +0:59 3 (const int) +0:68 move second child to first child (temp float) +0:68 Depth: direct index for structure (temp float FragDepth) +0:68 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:68 Constant: +0:68 1 (const int) +0:68 Constant: +0:68 1.000000 +0:70 Branch: Return with expression +0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:? Linker Objects +0:? 'g_sSamp' (uniform sampler) +0:? 'g_tTex1df4' (uniform texture1D) +0:? 'g_tTex1di4' (uniform itexture1D) +0:? 'g_tTex1du4' (uniform utexture1D) +0:? 'g_tTex2df4' (uniform texture2D) +0:? 'g_tTex2di4' (uniform itexture2D) +0:? 'g_tTex2du4' (uniform utexture2D) +0:? 'g_tTex3df4' (uniform texture3D) +0:? 'g_tTex3di4' (uniform itexture3D) +0:? 'g_tTex3du4' (uniform utexture3D) +0:? 'g_tTexcdf4' (uniform textureCube) +0:? 'g_tTexcdi4' (uniform itextureCube) +0:? 'g_tTexcdu4' (uniform utextureCube) +0:? 'g_tTex1df4a' (uniform texture1DArray) +0:? 'g_tTex1di4a' (uniform itexture1DArray) +0:? 'g_tTex1du4a' (uniform utexture1DArray) +0:? 'g_tTex2df4a' (uniform texture2DArray) +0:? 'g_tTex2di4a' (uniform itexture2DArray) +0:? 'g_tTex2du4a' (uniform utexture2DArray) +0:? 'g_tTexcdf4a' (uniform textureCubeArray) +0:? 'g_tTexcdi4a' (uniform itextureCubeArray) +0:? 'g_tTexcdu4a' (uniform utextureCubeArray) +0:? 'c1' (uniform int) +0:? 'c2' (uniform 2-component vector of int) +0:? 'c3' (uniform 3-component vector of int) +0:? 'c4' (uniform 4-component vector of int) +0:? 'o1' (uniform int) +0:? 'o2' (uniform 2-component vector of int) +0:? 'o3' (uniform 3-component vector of int) +0:? 'o4' (uniform 4-component vector of int) + + +Linked fragment stage: + + +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:72 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:48 Function Parameters: +0:? Sequence +0:52 textureFetch (global 4-component vector of float) +0:52 'g_tTex1df4a' (uniform texture1DArray) +0:52 vector swizzle (temp 2-component vector of int) +0:52 'c3' (uniform 3-component vector of int) +0:52 Sequence +0:52 Constant: +0:52 0 (const int) +0:52 Constant: +0:52 1 (const int) +0:52 direct index (temp int) +0:52 'c3' (uniform 3-component vector of int) +0:52 Constant: +0:52 2 (const int) +0:53 textureFetch (global 4-component vector of int) +0:53 'g_tTex1di4a' (uniform itexture1DArray) +0:53 vector swizzle (temp 2-component vector of int) +0:53 'c3' (uniform 3-component vector of int) +0:53 Sequence +0:53 Constant: +0:53 0 (const int) +0:53 Constant: +0:53 1 (const int) +0:53 direct index (temp int) +0:53 'c3' (uniform 3-component vector of int) +0:53 Constant: +0:53 2 (const int) +0:54 textureFetch (global 4-component vector of uint) +0:54 'g_tTex1du4a' (uniform utexture1DArray) +0:54 vector swizzle (temp 2-component vector of int) +0:54 'c3' (uniform 3-component vector of int) +0:54 Sequence +0:54 Constant: +0:54 0 (const int) +0:54 Constant: +0:54 1 (const int) +0:54 direct index (temp int) +0:54 'c3' (uniform 3-component vector of int) +0:54 Constant: +0:54 2 (const int) +0:57 textureFetch (global 4-component vector of float) +0:57 'g_tTex2df4a' (uniform texture2DArray) +0:57 vector swizzle (temp 3-component vector of int) +0:57 'c4' (uniform 4-component vector of int) +0:57 Sequence +0:57 Constant: +0:57 0 (const int) +0:57 Constant: +0:57 1 (const int) +0:57 Constant: +0:57 2 (const int) +0:57 direct index (temp int) +0:57 'c4' (uniform 4-component vector of int) +0:57 Constant: +0:57 3 (const int) +0:58 textureFetch (global 4-component vector of int) +0:58 'g_tTex2di4a' (uniform itexture2DArray) +0:58 vector swizzle (temp 3-component vector of int) +0:58 'c4' (uniform 4-component vector of int) +0:58 Sequence +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1 (const int) +0:58 Constant: +0:58 2 (const int) +0:58 direct index (temp int) +0:58 'c4' (uniform 4-component vector of int) +0:58 Constant: +0:58 3 (const int) +0:59 textureFetch (global 4-component vector of uint) +0:59 'g_tTex2du4a' (uniform utexture2DArray) +0:59 vector swizzle (temp 3-component vector of int) +0:59 'c4' (uniform 4-component vector of int) +0:59 Sequence +0:59 Constant: +0:59 0 (const int) +0:59 Constant: +0:59 1 (const int) +0:59 Constant: +0:59 2 (const int) +0:59 direct index (temp int) +0:59 'c4' (uniform 4-component vector of int) +0:59 Constant: +0:59 3 (const int) +0:68 move second child to first child (temp float) +0:68 Depth: direct index for structure (temp float FragDepth) +0:68 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:68 Constant: +0:68 1 (const int) +0:68 Constant: +0:68 1.000000 +0:70 Branch: Return with expression +0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:? Linker Objects +0:? 'g_sSamp' (uniform sampler) +0:? 'g_tTex1df4' (uniform texture1D) +0:? 'g_tTex1di4' (uniform itexture1D) +0:? 'g_tTex1du4' (uniform utexture1D) +0:? 'g_tTex2df4' (uniform texture2D) +0:? 'g_tTex2di4' (uniform itexture2D) +0:? 'g_tTex2du4' (uniform utexture2D) +0:? 'g_tTex3df4' (uniform texture3D) +0:? 'g_tTex3di4' (uniform itexture3D) +0:? 'g_tTex3du4' (uniform utexture3D) +0:? 'g_tTexcdf4' (uniform textureCube) +0:? 'g_tTexcdi4' (uniform itextureCube) +0:? 'g_tTexcdu4' (uniform utextureCube) +0:? 'g_tTex1df4a' (uniform texture1DArray) +0:? 'g_tTex1di4a' (uniform itexture1DArray) +0:? 'g_tTex1du4a' (uniform utexture1DArray) +0:? 'g_tTex2df4a' (uniform texture2DArray) +0:? 'g_tTex2di4a' (uniform itexture2DArray) +0:? 'g_tTex2du4a' (uniform utexture2DArray) +0:? 'g_tTexcdf4a' (uniform textureCubeArray) +0:? 'g_tTexcdi4a' (uniform itextureCubeArray) +0:? 'g_tTexcdu4a' (uniform utextureCubeArray) +0:? 'c1' (uniform int) +0:? 'c2' (uniform 2-component vector of int) +0:? 'c3' (uniform 3-component vector of int) +0:? 'c4' (uniform 4-component vector of int) +0:? 'o1' (uniform int) +0:? 'o2' (uniform 2-component vector of int) +0:? 'o3' (uniform 3-component vector of int) +0:? 'o4' (uniform 4-component vector of int) + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 139 + + Capability Shader + Capability Sampled1D + Capability SampledCubeArray + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source HLSL 450 + Name 4 "main" + Name 9 "g_tTex1df4a" + Name 14 "c3" + Name 27 "g_tTex1di4a" + Name 37 "g_tTex1du4a" + Name 47 "g_tTex2df4a" + Name 50 "c4" + Name 59 "g_tTex2di4a" + Name 68 "g_tTex2du4a" + Name 75 "PS_OUTPUT" + MemberName 75(PS_OUTPUT) 0 "Color" + MemberName 75(PS_OUTPUT) 1 "Depth" + Name 77 "psout" + Name 86 "g_sSamp" + Name 89 "g_tTex1df4" + Name 92 "g_tTex1di4" + Name 95 "g_tTex1du4" + Name 98 "g_tTex2df4" + Name 101 "g_tTex2di4" + Name 104 "g_tTex2du4" + Name 107 "g_tTex3df4" + Name 110 "g_tTex3di4" + Name 113 "g_tTex3du4" + Name 116 "g_tTexcdf4" + Name 119 "g_tTexcdi4" + Name 122 "g_tTexcdu4" + Name 125 "g_tTexcdf4a" + Name 128 "g_tTexcdi4a" + Name 131 "g_tTexcdu4a" + Name 132 "c1" + Name 134 "c2" + Name 135 "o1" + Name 136 "o2" + Name 137 "o3" + Name 138 "o4" + Decorate 9(g_tTex1df4a) DescriptorSet 0 + Decorate 27(g_tTex1di4a) DescriptorSet 0 + Decorate 37(g_tTex1du4a) DescriptorSet 0 + Decorate 47(g_tTex2df4a) DescriptorSet 0 + Decorate 59(g_tTex2di4a) DescriptorSet 0 + Decorate 68(g_tTex2du4a) DescriptorSet 0 + MemberDecorate 75(PS_OUTPUT) 1 BuiltIn FragDepth + Decorate 86(g_sSamp) DescriptorSet 0 + Decorate 89(g_tTex1df4) DescriptorSet 0 + Decorate 92(g_tTex1di4) DescriptorSet 0 + Decorate 95(g_tTex1du4) DescriptorSet 0 + Decorate 98(g_tTex2df4) DescriptorSet 0 + Decorate 101(g_tTex2di4) DescriptorSet 0 + Decorate 104(g_tTex2du4) DescriptorSet 0 + Decorate 107(g_tTex3df4) DescriptorSet 0 + Decorate 110(g_tTex3di4) DescriptorSet 0 + Decorate 113(g_tTex3du4) DescriptorSet 0 + Decorate 116(g_tTexcdf4) DescriptorSet 0 + Decorate 119(g_tTexcdi4) DescriptorSet 0 + Decorate 122(g_tTexcdu4) DescriptorSet 0 + Decorate 125(g_tTexcdf4a) DescriptorSet 0 + Decorate 128(g_tTexcdi4a) DescriptorSet 0 + Decorate 131(g_tTexcdu4a) DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeImage 6(float) 1D array sampled format:Unknown + 8: TypePointer UniformConstant 7 + 9(g_tTex1df4a): 8(ptr) Variable UniformConstant + 11: TypeInt 32 1 + 12: TypeVector 11(int) 3 + 13: TypePointer UniformConstant 12(ivec3) + 14(c3): 13(ptr) Variable UniformConstant + 15: TypeVector 11(int) 2 + 18: TypeInt 32 0 + 19: 18(int) Constant 2 + 20: TypePointer UniformConstant 11(int) + 23: TypeVector 6(float) 4 + 25: TypeImage 11(int) 1D array sampled format:Unknown + 26: TypePointer UniformConstant 25 + 27(g_tTex1di4a): 26(ptr) Variable UniformConstant + 33: TypeVector 11(int) 4 + 35: TypeImage 18(int) 1D array sampled format:Unknown + 36: TypePointer UniformConstant 35 + 37(g_tTex1du4a): 36(ptr) Variable UniformConstant + 43: TypeVector 18(int) 4 + 45: TypeImage 6(float) 2D array sampled format:Unknown + 46: TypePointer UniformConstant 45 + 47(g_tTex2df4a): 46(ptr) Variable UniformConstant + 49: TypePointer UniformConstant 33(ivec4) + 50(c4): 49(ptr) Variable UniformConstant + 53: 18(int) Constant 3 + 57: TypeImage 11(int) 2D array sampled format:Unknown + 58: TypePointer UniformConstant 57 + 59(g_tTex2di4a): 58(ptr) Variable UniformConstant + 66: TypeImage 18(int) 2D array sampled format:Unknown + 67: TypePointer UniformConstant 66 + 68(g_tTex2du4a): 67(ptr) Variable UniformConstant + 75(PS_OUTPUT): TypeStruct 23(fvec4) 6(float) + 76: TypePointer Function 75(PS_OUTPUT) + 78: 11(int) Constant 1 + 79: 6(float) Constant 1065353216 + 80: TypePointer Function 6(float) + 84: TypeSampler + 85: TypePointer UniformConstant 84 + 86(g_sSamp): 85(ptr) Variable UniformConstant + 87: TypeImage 6(float) 1D sampled format:Unknown + 88: TypePointer UniformConstant 87 + 89(g_tTex1df4): 88(ptr) Variable UniformConstant + 90: TypeImage 11(int) 1D sampled format:Unknown + 91: TypePointer UniformConstant 90 + 92(g_tTex1di4): 91(ptr) Variable UniformConstant + 93: TypeImage 18(int) 1D sampled format:Unknown + 94: TypePointer UniformConstant 93 + 95(g_tTex1du4): 94(ptr) Variable UniformConstant + 96: TypeImage 6(float) 2D sampled format:Unknown + 97: TypePointer UniformConstant 96 + 98(g_tTex2df4): 97(ptr) Variable UniformConstant + 99: TypeImage 11(int) 2D sampled format:Unknown + 100: TypePointer UniformConstant 99 + 101(g_tTex2di4): 100(ptr) Variable UniformConstant + 102: TypeImage 18(int) 2D sampled format:Unknown + 103: TypePointer UniformConstant 102 + 104(g_tTex2du4): 103(ptr) Variable UniformConstant + 105: TypeImage 6(float) 3D sampled format:Unknown + 106: TypePointer UniformConstant 105 + 107(g_tTex3df4): 106(ptr) Variable UniformConstant + 108: TypeImage 11(int) 3D sampled format:Unknown + 109: TypePointer UniformConstant 108 + 110(g_tTex3di4): 109(ptr) Variable UniformConstant + 111: TypeImage 18(int) 3D sampled format:Unknown + 112: TypePointer UniformConstant 111 + 113(g_tTex3du4): 112(ptr) Variable UniformConstant + 114: TypeImage 6(float) Cube sampled format:Unknown + 115: TypePointer UniformConstant 114 + 116(g_tTexcdf4): 115(ptr) Variable UniformConstant + 117: TypeImage 11(int) Cube sampled format:Unknown + 118: TypePointer UniformConstant 117 + 119(g_tTexcdi4): 118(ptr) Variable UniformConstant + 120: TypeImage 18(int) Cube sampled format:Unknown + 121: TypePointer UniformConstant 120 + 122(g_tTexcdu4): 121(ptr) Variable UniformConstant + 123: TypeImage 6(float) Cube array sampled format:Unknown + 124: TypePointer UniformConstant 123 +125(g_tTexcdf4a): 124(ptr) Variable UniformConstant + 126: TypeImage 11(int) Cube array sampled format:Unknown + 127: TypePointer UniformConstant 126 +128(g_tTexcdi4a): 127(ptr) Variable UniformConstant + 129: TypeImage 18(int) Cube array sampled format:Unknown + 130: TypePointer UniformConstant 129 +131(g_tTexcdu4a): 130(ptr) Variable UniformConstant + 132(c1): 20(ptr) Variable UniformConstant + 133: TypePointer UniformConstant 15(ivec2) + 134(c2): 133(ptr) Variable UniformConstant + 135(o1): 20(ptr) Variable UniformConstant + 136(o2): 133(ptr) Variable UniformConstant + 137(o3): 13(ptr) Variable UniformConstant + 138(o4): 49(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 77(psout): 76(ptr) Variable Function + 10: 7 Load 9(g_tTex1df4a) + 16: 12(ivec3) Load 14(c3) + 17: 15(ivec2) VectorShuffle 16 16 0 1 + 21: 20(ptr) AccessChain 14(c3) 19 + 22: 11(int) Load 21 + 24: 23(fvec4) ImageFetch 10 17 Lod 22 + 28: 25 Load 27(g_tTex1di4a) + 29: 12(ivec3) Load 14(c3) + 30: 15(ivec2) VectorShuffle 29 29 0 1 + 31: 20(ptr) AccessChain 14(c3) 19 + 32: 11(int) Load 31 + 34: 33(ivec4) ImageFetch 28 30 Lod 32 + 38: 35 Load 37(g_tTex1du4a) + 39: 12(ivec3) Load 14(c3) + 40: 15(ivec2) VectorShuffle 39 39 0 1 + 41: 20(ptr) AccessChain 14(c3) 19 + 42: 11(int) Load 41 + 44: 43(ivec4) ImageFetch 38 40 Lod 42 + 48: 45 Load 47(g_tTex2df4a) + 51: 33(ivec4) Load 50(c4) + 52: 12(ivec3) VectorShuffle 51 51 0 1 2 + 54: 20(ptr) AccessChain 50(c4) 53 + 55: 11(int) Load 54 + 56: 23(fvec4) ImageFetch 48 52 Lod 55 + 60: 57 Load 59(g_tTex2di4a) + 61: 33(ivec4) Load 50(c4) + 62: 12(ivec3) VectorShuffle 61 61 0 1 2 + 63: 20(ptr) AccessChain 50(c4) 53 + 64: 11(int) Load 63 + 65: 33(ivec4) ImageFetch 60 62 Lod 64 + 69: 66 Load 68(g_tTex2du4a) + 70: 33(ivec4) Load 50(c4) + 71: 12(ivec3) VectorShuffle 70 70 0 1 2 + 72: 20(ptr) AccessChain 50(c4) 53 + 73: 11(int) Load 72 + 74: 43(ivec4) ImageFetch 69 71 Lod 73 + 81: 80(ptr) AccessChain 77(psout) 78 + Store 81 79 + 82:75(PS_OUTPUT) Load 77(psout) + ReturnValue 82 + FunctionEnd diff --git a/Test/baseResults/hlsl.load.basic.dx10.frag.out b/Test/baseResults/hlsl.load.basic.dx10.frag.out new file mode 100644 index 000000000..e069ffbe2 --- /dev/null +++ b/Test/baseResults/hlsl.load.basic.dx10.frag.out @@ -0,0 +1,562 @@ +hlsl.load.basic.dx10.frag +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:77 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:48 Function Parameters: +0:? Sequence +0:52 textureFetch (global 4-component vector of float) +0:52 'g_tTex1df4' (uniform texture1D) +0:52 vector swizzle (temp int) +0:52 'c2' (uniform 2-component vector of int) +0:52 Sequence +0:52 Constant: +0:52 0 (const int) +0:52 direct index (temp int) +0:52 'c2' (uniform 2-component vector of int) +0:52 Constant: +0:52 1 (const int) +0:53 textureFetch (global 4-component vector of int) +0:53 'g_tTex1di4' (uniform itexture1D) +0:53 vector swizzle (temp int) +0:53 'c2' (uniform 2-component vector of int) +0:53 Sequence +0:53 Constant: +0:53 0 (const int) +0:53 direct index (temp int) +0:53 'c2' (uniform 2-component vector of int) +0:53 Constant: +0:53 1 (const int) +0:54 textureFetch (global 4-component vector of uint) +0:54 'g_tTex1du4' (uniform utexture1D) +0:54 vector swizzle (temp int) +0:54 'c2' (uniform 2-component vector of int) +0:54 Sequence +0:54 Constant: +0:54 0 (const int) +0:54 direct index (temp int) +0:54 'c2' (uniform 2-component vector of int) +0:54 Constant: +0:54 1 (const int) +0:57 textureFetch (global 4-component vector of float) +0:57 'g_tTex2df4' (uniform texture2D) +0:57 vector swizzle (temp 2-component vector of int) +0:57 'c3' (uniform 3-component vector of int) +0:57 Sequence +0:57 Constant: +0:57 0 (const int) +0:57 Constant: +0:57 1 (const int) +0:57 direct index (temp int) +0:57 'c3' (uniform 3-component vector of int) +0:57 Constant: +0:57 2 (const int) +0:58 textureFetch (global 4-component vector of int) +0:58 'g_tTex2di4' (uniform itexture2D) +0:58 vector swizzle (temp 2-component vector of int) +0:58 'c3' (uniform 3-component vector of int) +0:58 Sequence +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1 (const int) +0:58 direct index (temp int) +0:58 'c3' (uniform 3-component vector of int) +0:58 Constant: +0:58 2 (const int) +0:59 textureFetch (global 4-component vector of uint) +0:59 'g_tTex2du4' (uniform utexture2D) +0:59 vector swizzle (temp 2-component vector of int) +0:59 'c3' (uniform 3-component vector of int) +0:59 Sequence +0:59 Constant: +0:59 0 (const int) +0:59 Constant: +0:59 1 (const int) +0:59 direct index (temp int) +0:59 'c3' (uniform 3-component vector of int) +0:59 Constant: +0:59 2 (const int) +0:62 textureFetch (global 4-component vector of float) +0:62 'g_tTex3df4' (uniform texture3D) +0:62 vector swizzle (temp 3-component vector of int) +0:62 'c4' (uniform 4-component vector of int) +0:62 Sequence +0:62 Constant: +0:62 0 (const int) +0:62 Constant: +0:62 1 (const int) +0:62 Constant: +0:62 2 (const int) +0:62 direct index (temp int) +0:62 'c4' (uniform 4-component vector of int) +0:62 Constant: +0:62 3 (const int) +0:63 textureFetch (global 4-component vector of int) +0:63 'g_tTex3di4' (uniform itexture3D) +0:63 vector swizzle (temp 3-component vector of int) +0:63 'c4' (uniform 4-component vector of int) +0:63 Sequence +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 2 (const int) +0:63 direct index (temp int) +0:63 'c4' (uniform 4-component vector of int) +0:63 Constant: +0:63 3 (const int) +0:64 textureFetch (global 4-component vector of uint) +0:64 'g_tTex3du4' (uniform utexture3D) +0:64 vector swizzle (temp 3-component vector of int) +0:64 'c4' (uniform 4-component vector of int) +0:64 Sequence +0:64 Constant: +0:64 0 (const int) +0:64 Constant: +0:64 1 (const int) +0:64 Constant: +0:64 2 (const int) +0:64 direct index (temp int) +0:64 'c4' (uniform 4-component vector of int) +0:64 Constant: +0:64 3 (const int) +0:73 move second child to first child (temp float) +0:73 Depth: direct index for structure (temp float FragDepth) +0:73 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:73 Constant: +0:73 1 (const int) +0:73 Constant: +0:73 1.000000 +0:75 Branch: Return with expression +0:75 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:? Linker Objects +0:? 'g_sSamp' (uniform sampler) +0:? 'g_tTex1df4' (uniform texture1D) +0:? 'g_tTex1di4' (uniform itexture1D) +0:? 'g_tTex1du4' (uniform utexture1D) +0:? 'g_tTex2df4' (uniform texture2D) +0:? 'g_tTex2di4' (uniform itexture2D) +0:? 'g_tTex2du4' (uniform utexture2D) +0:? 'g_tTex3df4' (uniform texture3D) +0:? 'g_tTex3di4' (uniform itexture3D) +0:? 'g_tTex3du4' (uniform utexture3D) +0:? 'g_tTexcdf4' (uniform textureCube) +0:? 'g_tTexcdi4' (uniform itextureCube) +0:? 'g_tTexcdu4' (uniform utextureCube) +0:? 'g_tTex1df4a' (uniform texture1DArray) +0:? 'g_tTex1di4a' (uniform itexture1DArray) +0:? 'g_tTex1du4a' (uniform utexture1DArray) +0:? 'g_tTex2df4a' (uniform texture2DArray) +0:? 'g_tTex2di4a' (uniform itexture2DArray) +0:? 'g_tTex2du4a' (uniform utexture2DArray) +0:? 'g_tTexcdf4a' (uniform textureCubeArray) +0:? 'g_tTexcdi4a' (uniform itextureCubeArray) +0:? 'g_tTexcdu4a' (uniform utextureCubeArray) +0:? 'c1' (uniform int) +0:? 'c2' (uniform 2-component vector of int) +0:? 'c3' (uniform 3-component vector of int) +0:? 'c4' (uniform 4-component vector of int) +0:? 'o1' (uniform int) +0:? 'o2' (uniform 2-component vector of int) +0:? 'o3' (uniform 3-component vector of int) +0:? 'o4' (uniform 4-component vector of int) + + +Linked fragment stage: + + +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:77 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:48 Function Parameters: +0:? Sequence +0:52 textureFetch (global 4-component vector of float) +0:52 'g_tTex1df4' (uniform texture1D) +0:52 vector swizzle (temp int) +0:52 'c2' (uniform 2-component vector of int) +0:52 Sequence +0:52 Constant: +0:52 0 (const int) +0:52 direct index (temp int) +0:52 'c2' (uniform 2-component vector of int) +0:52 Constant: +0:52 1 (const int) +0:53 textureFetch (global 4-component vector of int) +0:53 'g_tTex1di4' (uniform itexture1D) +0:53 vector swizzle (temp int) +0:53 'c2' (uniform 2-component vector of int) +0:53 Sequence +0:53 Constant: +0:53 0 (const int) +0:53 direct index (temp int) +0:53 'c2' (uniform 2-component vector of int) +0:53 Constant: +0:53 1 (const int) +0:54 textureFetch (global 4-component vector of uint) +0:54 'g_tTex1du4' (uniform utexture1D) +0:54 vector swizzle (temp int) +0:54 'c2' (uniform 2-component vector of int) +0:54 Sequence +0:54 Constant: +0:54 0 (const int) +0:54 direct index (temp int) +0:54 'c2' (uniform 2-component vector of int) +0:54 Constant: +0:54 1 (const int) +0:57 textureFetch (global 4-component vector of float) +0:57 'g_tTex2df4' (uniform texture2D) +0:57 vector swizzle (temp 2-component vector of int) +0:57 'c3' (uniform 3-component vector of int) +0:57 Sequence +0:57 Constant: +0:57 0 (const int) +0:57 Constant: +0:57 1 (const int) +0:57 direct index (temp int) +0:57 'c3' (uniform 3-component vector of int) +0:57 Constant: +0:57 2 (const int) +0:58 textureFetch (global 4-component vector of int) +0:58 'g_tTex2di4' (uniform itexture2D) +0:58 vector swizzle (temp 2-component vector of int) +0:58 'c3' (uniform 3-component vector of int) +0:58 Sequence +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1 (const int) +0:58 direct index (temp int) +0:58 'c3' (uniform 3-component vector of int) +0:58 Constant: +0:58 2 (const int) +0:59 textureFetch (global 4-component vector of uint) +0:59 'g_tTex2du4' (uniform utexture2D) +0:59 vector swizzle (temp 2-component vector of int) +0:59 'c3' (uniform 3-component vector of int) +0:59 Sequence +0:59 Constant: +0:59 0 (const int) +0:59 Constant: +0:59 1 (const int) +0:59 direct index (temp int) +0:59 'c3' (uniform 3-component vector of int) +0:59 Constant: +0:59 2 (const int) +0:62 textureFetch (global 4-component vector of float) +0:62 'g_tTex3df4' (uniform texture3D) +0:62 vector swizzle (temp 3-component vector of int) +0:62 'c4' (uniform 4-component vector of int) +0:62 Sequence +0:62 Constant: +0:62 0 (const int) +0:62 Constant: +0:62 1 (const int) +0:62 Constant: +0:62 2 (const int) +0:62 direct index (temp int) +0:62 'c4' (uniform 4-component vector of int) +0:62 Constant: +0:62 3 (const int) +0:63 textureFetch (global 4-component vector of int) +0:63 'g_tTex3di4' (uniform itexture3D) +0:63 vector swizzle (temp 3-component vector of int) +0:63 'c4' (uniform 4-component vector of int) +0:63 Sequence +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 2 (const int) +0:63 direct index (temp int) +0:63 'c4' (uniform 4-component vector of int) +0:63 Constant: +0:63 3 (const int) +0:64 textureFetch (global 4-component vector of uint) +0:64 'g_tTex3du4' (uniform utexture3D) +0:64 vector swizzle (temp 3-component vector of int) +0:64 'c4' (uniform 4-component vector of int) +0:64 Sequence +0:64 Constant: +0:64 0 (const int) +0:64 Constant: +0:64 1 (const int) +0:64 Constant: +0:64 2 (const int) +0:64 direct index (temp int) +0:64 'c4' (uniform 4-component vector of int) +0:64 Constant: +0:64 3 (const int) +0:73 move second child to first child (temp float) +0:73 Depth: direct index for structure (temp float FragDepth) +0:73 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:73 Constant: +0:73 1 (const int) +0:73 Constant: +0:73 1.000000 +0:75 Branch: Return with expression +0:75 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:? Linker Objects +0:? 'g_sSamp' (uniform sampler) +0:? 'g_tTex1df4' (uniform texture1D) +0:? 'g_tTex1di4' (uniform itexture1D) +0:? 'g_tTex1du4' (uniform utexture1D) +0:? 'g_tTex2df4' (uniform texture2D) +0:? 'g_tTex2di4' (uniform itexture2D) +0:? 'g_tTex2du4' (uniform utexture2D) +0:? 'g_tTex3df4' (uniform texture3D) +0:? 'g_tTex3di4' (uniform itexture3D) +0:? 'g_tTex3du4' (uniform utexture3D) +0:? 'g_tTexcdf4' (uniform textureCube) +0:? 'g_tTexcdi4' (uniform itextureCube) +0:? 'g_tTexcdu4' (uniform utextureCube) +0:? 'g_tTex1df4a' (uniform texture1DArray) +0:? 'g_tTex1di4a' (uniform itexture1DArray) +0:? 'g_tTex1du4a' (uniform utexture1DArray) +0:? 'g_tTex2df4a' (uniform texture2DArray) +0:? 'g_tTex2di4a' (uniform itexture2DArray) +0:? 'g_tTex2du4a' (uniform utexture2DArray) +0:? 'g_tTexcdf4a' (uniform textureCubeArray) +0:? 'g_tTexcdi4a' (uniform itextureCubeArray) +0:? 'g_tTexcdu4a' (uniform utextureCubeArray) +0:? 'c1' (uniform int) +0:? 'c2' (uniform 2-component vector of int) +0:? 'c3' (uniform 3-component vector of int) +0:? 'c4' (uniform 4-component vector of int) +0:? 'o1' (uniform int) +0:? 'o2' (uniform 2-component vector of int) +0:? 'o3' (uniform 3-component vector of int) +0:? 'o4' (uniform 4-component vector of int) + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 159 + + Capability Shader + Capability Sampled1D + Capability SampledCubeArray + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source HLSL 450 + Name 4 "main" + Name 9 "g_tTex1df4" + Name 14 "c2" + Name 27 "g_tTex1di4" + Name 37 "g_tTex1du4" + Name 47 "g_tTex2df4" + Name 51 "c3" + Name 60 "g_tTex2di4" + Name 69 "g_tTex2du4" + Name 78 "g_tTex3df4" + Name 81 "c4" + Name 90 "g_tTex3di4" + Name 99 "g_tTex3du4" + Name 106 "PS_OUTPUT" + MemberName 106(PS_OUTPUT) 0 "Color" + MemberName 106(PS_OUTPUT) 1 "Depth" + Name 108 "psout" + Name 117 "g_sSamp" + Name 120 "g_tTexcdf4" + Name 123 "g_tTexcdi4" + Name 126 "g_tTexcdu4" + Name 129 "g_tTex1df4a" + Name 132 "g_tTex1di4a" + Name 135 "g_tTex1du4a" + Name 138 "g_tTex2df4a" + Name 141 "g_tTex2di4a" + Name 144 "g_tTex2du4a" + Name 147 "g_tTexcdf4a" + Name 150 "g_tTexcdi4a" + Name 153 "g_tTexcdu4a" + Name 154 "c1" + Name 155 "o1" + Name 156 "o2" + Name 157 "o3" + Name 158 "o4" + Decorate 9(g_tTex1df4) DescriptorSet 0 + Decorate 27(g_tTex1di4) DescriptorSet 0 + Decorate 37(g_tTex1du4) DescriptorSet 0 + Decorate 47(g_tTex2df4) DescriptorSet 0 + Decorate 60(g_tTex2di4) DescriptorSet 0 + Decorate 69(g_tTex2du4) DescriptorSet 0 + Decorate 78(g_tTex3df4) DescriptorSet 0 + Decorate 90(g_tTex3di4) DescriptorSet 0 + Decorate 99(g_tTex3du4) DescriptorSet 0 + MemberDecorate 106(PS_OUTPUT) 1 BuiltIn FragDepth + Decorate 117(g_sSamp) DescriptorSet 0 + Decorate 120(g_tTexcdf4) DescriptorSet 0 + Decorate 123(g_tTexcdi4) DescriptorSet 0 + Decorate 126(g_tTexcdu4) DescriptorSet 0 + Decorate 129(g_tTex1df4a) DescriptorSet 0 + Decorate 132(g_tTex1di4a) DescriptorSet 0 + Decorate 135(g_tTex1du4a) DescriptorSet 0 + Decorate 138(g_tTex2df4a) DescriptorSet 0 + Decorate 141(g_tTex2di4a) DescriptorSet 0 + Decorate 144(g_tTex2du4a) DescriptorSet 0 + Decorate 147(g_tTexcdf4a) DescriptorSet 0 + Decorate 150(g_tTexcdi4a) DescriptorSet 0 + Decorate 153(g_tTexcdu4a) DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeImage 6(float) 1D sampled format:Unknown + 8: TypePointer UniformConstant 7 + 9(g_tTex1df4): 8(ptr) Variable UniformConstant + 11: TypeInt 32 1 + 12: TypeVector 11(int) 2 + 13: TypePointer UniformConstant 12(ivec2) + 14(c2): 13(ptr) Variable UniformConstant + 15: TypeInt 32 0 + 16: 15(int) Constant 0 + 17: TypePointer UniformConstant 11(int) + 20: 15(int) Constant 1 + 23: TypeVector 6(float) 4 + 25: TypeImage 11(int) 1D sampled format:Unknown + 26: TypePointer UniformConstant 25 + 27(g_tTex1di4): 26(ptr) Variable UniformConstant + 33: TypeVector 11(int) 4 + 35: TypeImage 15(int) 1D sampled format:Unknown + 36: TypePointer UniformConstant 35 + 37(g_tTex1du4): 36(ptr) Variable UniformConstant + 43: TypeVector 15(int) 4 + 45: TypeImage 6(float) 2D sampled format:Unknown + 46: TypePointer UniformConstant 45 + 47(g_tTex2df4): 46(ptr) Variable UniformConstant + 49: TypeVector 11(int) 3 + 50: TypePointer UniformConstant 49(ivec3) + 51(c3): 50(ptr) Variable UniformConstant + 54: 15(int) Constant 2 + 58: TypeImage 11(int) 2D sampled format:Unknown + 59: TypePointer UniformConstant 58 + 60(g_tTex2di4): 59(ptr) Variable UniformConstant + 67: TypeImage 15(int) 2D sampled format:Unknown + 68: TypePointer UniformConstant 67 + 69(g_tTex2du4): 68(ptr) Variable UniformConstant + 76: TypeImage 6(float) 3D sampled format:Unknown + 77: TypePointer UniformConstant 76 + 78(g_tTex3df4): 77(ptr) Variable UniformConstant + 80: TypePointer UniformConstant 33(ivec4) + 81(c4): 80(ptr) Variable UniformConstant + 84: 15(int) Constant 3 + 88: TypeImage 11(int) 3D sampled format:Unknown + 89: TypePointer UniformConstant 88 + 90(g_tTex3di4): 89(ptr) Variable UniformConstant + 97: TypeImage 15(int) 3D sampled format:Unknown + 98: TypePointer UniformConstant 97 + 99(g_tTex3du4): 98(ptr) Variable UniformConstant + 106(PS_OUTPUT): TypeStruct 23(fvec4) 6(float) + 107: TypePointer Function 106(PS_OUTPUT) + 109: 11(int) Constant 1 + 110: 6(float) Constant 1065353216 + 111: TypePointer Function 6(float) + 115: TypeSampler + 116: TypePointer UniformConstant 115 + 117(g_sSamp): 116(ptr) Variable UniformConstant + 118: TypeImage 6(float) Cube sampled format:Unknown + 119: TypePointer UniformConstant 118 + 120(g_tTexcdf4): 119(ptr) Variable UniformConstant + 121: TypeImage 11(int) Cube sampled format:Unknown + 122: TypePointer UniformConstant 121 + 123(g_tTexcdi4): 122(ptr) Variable UniformConstant + 124: TypeImage 15(int) Cube sampled format:Unknown + 125: TypePointer UniformConstant 124 + 126(g_tTexcdu4): 125(ptr) Variable UniformConstant + 127: TypeImage 6(float) 1D array sampled format:Unknown + 128: TypePointer UniformConstant 127 +129(g_tTex1df4a): 128(ptr) Variable UniformConstant + 130: TypeImage 11(int) 1D array sampled format:Unknown + 131: TypePointer UniformConstant 130 +132(g_tTex1di4a): 131(ptr) Variable UniformConstant + 133: TypeImage 15(int) 1D array sampled format:Unknown + 134: TypePointer UniformConstant 133 +135(g_tTex1du4a): 134(ptr) Variable UniformConstant + 136: TypeImage 6(float) 2D array sampled format:Unknown + 137: TypePointer UniformConstant 136 +138(g_tTex2df4a): 137(ptr) Variable UniformConstant + 139: TypeImage 11(int) 2D array sampled format:Unknown + 140: TypePointer UniformConstant 139 +141(g_tTex2di4a): 140(ptr) Variable UniformConstant + 142: TypeImage 15(int) 2D array sampled format:Unknown + 143: TypePointer UniformConstant 142 +144(g_tTex2du4a): 143(ptr) Variable UniformConstant + 145: TypeImage 6(float) Cube array sampled format:Unknown + 146: TypePointer UniformConstant 145 +147(g_tTexcdf4a): 146(ptr) Variable UniformConstant + 148: TypeImage 11(int) Cube array sampled format:Unknown + 149: TypePointer UniformConstant 148 +150(g_tTexcdi4a): 149(ptr) Variable UniformConstant + 151: TypeImage 15(int) Cube array sampled format:Unknown + 152: TypePointer UniformConstant 151 +153(g_tTexcdu4a): 152(ptr) Variable UniformConstant + 154(c1): 17(ptr) Variable UniformConstant + 155(o1): 17(ptr) Variable UniformConstant + 156(o2): 13(ptr) Variable UniformConstant + 157(o3): 50(ptr) Variable UniformConstant + 158(o4): 80(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 108(psout): 107(ptr) Variable Function + 10: 7 Load 9(g_tTex1df4) + 18: 17(ptr) AccessChain 14(c2) 16 + 19: 11(int) Load 18 + 21: 17(ptr) AccessChain 14(c2) 20 + 22: 11(int) Load 21 + 24: 23(fvec4) ImageFetch 10 19 Lod 22 + 28: 25 Load 27(g_tTex1di4) + 29: 17(ptr) AccessChain 14(c2) 16 + 30: 11(int) Load 29 + 31: 17(ptr) AccessChain 14(c2) 20 + 32: 11(int) Load 31 + 34: 33(ivec4) ImageFetch 28 30 Lod 32 + 38: 35 Load 37(g_tTex1du4) + 39: 17(ptr) AccessChain 14(c2) 16 + 40: 11(int) Load 39 + 41: 17(ptr) AccessChain 14(c2) 20 + 42: 11(int) Load 41 + 44: 43(ivec4) ImageFetch 38 40 Lod 42 + 48: 45 Load 47(g_tTex2df4) + 52: 49(ivec3) Load 51(c3) + 53: 12(ivec2) VectorShuffle 52 52 0 1 + 55: 17(ptr) AccessChain 51(c3) 54 + 56: 11(int) Load 55 + 57: 23(fvec4) ImageFetch 48 53 Lod 56 + 61: 58 Load 60(g_tTex2di4) + 62: 49(ivec3) Load 51(c3) + 63: 12(ivec2) VectorShuffle 62 62 0 1 + 64: 17(ptr) AccessChain 51(c3) 54 + 65: 11(int) Load 64 + 66: 33(ivec4) ImageFetch 61 63 Lod 65 + 70: 67 Load 69(g_tTex2du4) + 71: 49(ivec3) Load 51(c3) + 72: 12(ivec2) VectorShuffle 71 71 0 1 + 73: 17(ptr) AccessChain 51(c3) 54 + 74: 11(int) Load 73 + 75: 43(ivec4) ImageFetch 70 72 Lod 74 + 79: 76 Load 78(g_tTex3df4) + 82: 33(ivec4) Load 81(c4) + 83: 49(ivec3) VectorShuffle 82 82 0 1 2 + 85: 17(ptr) AccessChain 81(c4) 84 + 86: 11(int) Load 85 + 87: 23(fvec4) ImageFetch 79 83 Lod 86 + 91: 88 Load 90(g_tTex3di4) + 92: 33(ivec4) Load 81(c4) + 93: 49(ivec3) VectorShuffle 92 92 0 1 2 + 94: 17(ptr) AccessChain 81(c4) 84 + 95: 11(int) Load 94 + 96: 33(ivec4) ImageFetch 91 93 Lod 95 + 100: 97 Load 99(g_tTex3du4) + 101: 33(ivec4) Load 81(c4) + 102: 49(ivec3) VectorShuffle 101 101 0 1 2 + 103: 17(ptr) AccessChain 81(c4) 84 + 104: 11(int) Load 103 + 105: 43(ivec4) ImageFetch 100 102 Lod 104 + 112: 111(ptr) AccessChain 108(psout) 109 + Store 112 110 + 113:106(PS_OUTPUT) Load 108(psout) + ReturnValue 113 + FunctionEnd diff --git a/Test/baseResults/hlsl.load.offset.dx10.frag.out b/Test/baseResults/hlsl.load.offset.dx10.frag.out new file mode 100644 index 000000000..5def1f800 --- /dev/null +++ b/Test/baseResults/hlsl.load.offset.dx10.frag.out @@ -0,0 +1,590 @@ +hlsl.load.offset.dx10.frag +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:77 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:48 Function Parameters: +0:? Sequence +0:52 textureFetchOffset (global 4-component vector of float) +0:52 'g_tTex1df4' (uniform texture1D) +0:52 vector swizzle (temp int) +0:52 'c2' (uniform 2-component vector of int) +0:52 Sequence +0:52 Constant: +0:52 0 (const int) +0:52 direct index (temp int) +0:52 'c2' (uniform 2-component vector of int) +0:52 Constant: +0:52 1 (const int) +0:52 'o1' (uniform int) +0:53 textureFetchOffset (global 4-component vector of int) +0:53 'g_tTex1di4' (uniform itexture1D) +0:53 vector swizzle (temp int) +0:53 'c2' (uniform 2-component vector of int) +0:53 Sequence +0:53 Constant: +0:53 0 (const int) +0:53 direct index (temp int) +0:53 'c2' (uniform 2-component vector of int) +0:53 Constant: +0:53 1 (const int) +0:53 'o1' (uniform int) +0:54 textureFetchOffset (global 4-component vector of uint) +0:54 'g_tTex1du4' (uniform utexture1D) +0:54 vector swizzle (temp int) +0:54 'c2' (uniform 2-component vector of int) +0:54 Sequence +0:54 Constant: +0:54 0 (const int) +0:54 direct index (temp int) +0:54 'c2' (uniform 2-component vector of int) +0:54 Constant: +0:54 1 (const int) +0:54 'o1' (uniform int) +0:57 textureFetchOffset (global 4-component vector of float) +0:57 'g_tTex2df4' (uniform texture2D) +0:57 vector swizzle (temp 2-component vector of int) +0:57 'c3' (uniform 3-component vector of int) +0:57 Sequence +0:57 Constant: +0:57 0 (const int) +0:57 Constant: +0:57 1 (const int) +0:57 direct index (temp int) +0:57 'c3' (uniform 3-component vector of int) +0:57 Constant: +0:57 2 (const int) +0:57 'o2' (uniform 2-component vector of int) +0:58 textureFetchOffset (global 4-component vector of int) +0:58 'g_tTex2di4' (uniform itexture2D) +0:58 vector swizzle (temp 2-component vector of int) +0:58 'c3' (uniform 3-component vector of int) +0:58 Sequence +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1 (const int) +0:58 direct index (temp int) +0:58 'c3' (uniform 3-component vector of int) +0:58 Constant: +0:58 2 (const int) +0:58 'o2' (uniform 2-component vector of int) +0:59 textureFetchOffset (global 4-component vector of uint) +0:59 'g_tTex2du4' (uniform utexture2D) +0:59 vector swizzle (temp 2-component vector of int) +0:59 'c3' (uniform 3-component vector of int) +0:59 Sequence +0:59 Constant: +0:59 0 (const int) +0:59 Constant: +0:59 1 (const int) +0:59 direct index (temp int) +0:59 'c3' (uniform 3-component vector of int) +0:59 Constant: +0:59 2 (const int) +0:59 'o2' (uniform 2-component vector of int) +0:62 textureFetchOffset (global 4-component vector of float) +0:62 'g_tTex3df4' (uniform texture3D) +0:62 vector swizzle (temp 3-component vector of int) +0:62 'c4' (uniform 4-component vector of int) +0:62 Sequence +0:62 Constant: +0:62 0 (const int) +0:62 Constant: +0:62 1 (const int) +0:62 Constant: +0:62 2 (const int) +0:62 direct index (temp int) +0:62 'c4' (uniform 4-component vector of int) +0:62 Constant: +0:62 3 (const int) +0:62 'o3' (uniform 3-component vector of int) +0:63 textureFetchOffset (global 4-component vector of int) +0:63 'g_tTex3di4' (uniform itexture3D) +0:63 vector swizzle (temp 3-component vector of int) +0:63 'c4' (uniform 4-component vector of int) +0:63 Sequence +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 2 (const int) +0:63 direct index (temp int) +0:63 'c4' (uniform 4-component vector of int) +0:63 Constant: +0:63 3 (const int) +0:63 'o3' (uniform 3-component vector of int) +0:64 textureFetchOffset (global 4-component vector of uint) +0:64 'g_tTex3du4' (uniform utexture3D) +0:64 vector swizzle (temp 3-component vector of int) +0:64 'c4' (uniform 4-component vector of int) +0:64 Sequence +0:64 Constant: +0:64 0 (const int) +0:64 Constant: +0:64 1 (const int) +0:64 Constant: +0:64 2 (const int) +0:64 direct index (temp int) +0:64 'c4' (uniform 4-component vector of int) +0:64 Constant: +0:64 3 (const int) +0:64 'o3' (uniform 3-component vector of int) +0:73 move second child to first child (temp float) +0:73 Depth: direct index for structure (temp float FragDepth) +0:73 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:73 Constant: +0:73 1 (const int) +0:73 Constant: +0:73 1.000000 +0:75 Branch: Return with expression +0:75 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:? Linker Objects +0:? 'g_sSamp' (uniform sampler) +0:? 'g_tTex1df4' (uniform texture1D) +0:? 'g_tTex1di4' (uniform itexture1D) +0:? 'g_tTex1du4' (uniform utexture1D) +0:? 'g_tTex2df4' (uniform texture2D) +0:? 'g_tTex2di4' (uniform itexture2D) +0:? 'g_tTex2du4' (uniform utexture2D) +0:? 'g_tTex3df4' (uniform texture3D) +0:? 'g_tTex3di4' (uniform itexture3D) +0:? 'g_tTex3du4' (uniform utexture3D) +0:? 'g_tTexcdf4' (uniform textureCube) +0:? 'g_tTexcdi4' (uniform itextureCube) +0:? 'g_tTexcdu4' (uniform utextureCube) +0:? 'g_tTex1df4a' (uniform texture1DArray) +0:? 'g_tTex1di4a' (uniform itexture1DArray) +0:? 'g_tTex1du4a' (uniform utexture1DArray) +0:? 'g_tTex2df4a' (uniform texture2DArray) +0:? 'g_tTex2di4a' (uniform itexture2DArray) +0:? 'g_tTex2du4a' (uniform utexture2DArray) +0:? 'g_tTexcdf4a' (uniform textureCubeArray) +0:? 'g_tTexcdi4a' (uniform itextureCubeArray) +0:? 'g_tTexcdu4a' (uniform utextureCubeArray) +0:? 'c1' (uniform int) +0:? 'c2' (uniform 2-component vector of int) +0:? 'c3' (uniform 3-component vector of int) +0:? 'c4' (uniform 4-component vector of int) +0:? 'o1' (uniform int) +0:? 'o2' (uniform 2-component vector of int) +0:? 'o3' (uniform 3-component vector of int) +0:? 'o4' (uniform 4-component vector of int) + + +Linked fragment stage: + + +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:77 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:48 Function Parameters: +0:? Sequence +0:52 textureFetchOffset (global 4-component vector of float) +0:52 'g_tTex1df4' (uniform texture1D) +0:52 vector swizzle (temp int) +0:52 'c2' (uniform 2-component vector of int) +0:52 Sequence +0:52 Constant: +0:52 0 (const int) +0:52 direct index (temp int) +0:52 'c2' (uniform 2-component vector of int) +0:52 Constant: +0:52 1 (const int) +0:52 'o1' (uniform int) +0:53 textureFetchOffset (global 4-component vector of int) +0:53 'g_tTex1di4' (uniform itexture1D) +0:53 vector swizzle (temp int) +0:53 'c2' (uniform 2-component vector of int) +0:53 Sequence +0:53 Constant: +0:53 0 (const int) +0:53 direct index (temp int) +0:53 'c2' (uniform 2-component vector of int) +0:53 Constant: +0:53 1 (const int) +0:53 'o1' (uniform int) +0:54 textureFetchOffset (global 4-component vector of uint) +0:54 'g_tTex1du4' (uniform utexture1D) +0:54 vector swizzle (temp int) +0:54 'c2' (uniform 2-component vector of int) +0:54 Sequence +0:54 Constant: +0:54 0 (const int) +0:54 direct index (temp int) +0:54 'c2' (uniform 2-component vector of int) +0:54 Constant: +0:54 1 (const int) +0:54 'o1' (uniform int) +0:57 textureFetchOffset (global 4-component vector of float) +0:57 'g_tTex2df4' (uniform texture2D) +0:57 vector swizzle (temp 2-component vector of int) +0:57 'c3' (uniform 3-component vector of int) +0:57 Sequence +0:57 Constant: +0:57 0 (const int) +0:57 Constant: +0:57 1 (const int) +0:57 direct index (temp int) +0:57 'c3' (uniform 3-component vector of int) +0:57 Constant: +0:57 2 (const int) +0:57 'o2' (uniform 2-component vector of int) +0:58 textureFetchOffset (global 4-component vector of int) +0:58 'g_tTex2di4' (uniform itexture2D) +0:58 vector swizzle (temp 2-component vector of int) +0:58 'c3' (uniform 3-component vector of int) +0:58 Sequence +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1 (const int) +0:58 direct index (temp int) +0:58 'c3' (uniform 3-component vector of int) +0:58 Constant: +0:58 2 (const int) +0:58 'o2' (uniform 2-component vector of int) +0:59 textureFetchOffset (global 4-component vector of uint) +0:59 'g_tTex2du4' (uniform utexture2D) +0:59 vector swizzle (temp 2-component vector of int) +0:59 'c3' (uniform 3-component vector of int) +0:59 Sequence +0:59 Constant: +0:59 0 (const int) +0:59 Constant: +0:59 1 (const int) +0:59 direct index (temp int) +0:59 'c3' (uniform 3-component vector of int) +0:59 Constant: +0:59 2 (const int) +0:59 'o2' (uniform 2-component vector of int) +0:62 textureFetchOffset (global 4-component vector of float) +0:62 'g_tTex3df4' (uniform texture3D) +0:62 vector swizzle (temp 3-component vector of int) +0:62 'c4' (uniform 4-component vector of int) +0:62 Sequence +0:62 Constant: +0:62 0 (const int) +0:62 Constant: +0:62 1 (const int) +0:62 Constant: +0:62 2 (const int) +0:62 direct index (temp int) +0:62 'c4' (uniform 4-component vector of int) +0:62 Constant: +0:62 3 (const int) +0:62 'o3' (uniform 3-component vector of int) +0:63 textureFetchOffset (global 4-component vector of int) +0:63 'g_tTex3di4' (uniform itexture3D) +0:63 vector swizzle (temp 3-component vector of int) +0:63 'c4' (uniform 4-component vector of int) +0:63 Sequence +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 2 (const int) +0:63 direct index (temp int) +0:63 'c4' (uniform 4-component vector of int) +0:63 Constant: +0:63 3 (const int) +0:63 'o3' (uniform 3-component vector of int) +0:64 textureFetchOffset (global 4-component vector of uint) +0:64 'g_tTex3du4' (uniform utexture3D) +0:64 vector swizzle (temp 3-component vector of int) +0:64 'c4' (uniform 4-component vector of int) +0:64 Sequence +0:64 Constant: +0:64 0 (const int) +0:64 Constant: +0:64 1 (const int) +0:64 Constant: +0:64 2 (const int) +0:64 direct index (temp int) +0:64 'c4' (uniform 4-component vector of int) +0:64 Constant: +0:64 3 (const int) +0:64 'o3' (uniform 3-component vector of int) +0:73 move second child to first child (temp float) +0:73 Depth: direct index for structure (temp float FragDepth) +0:73 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:73 Constant: +0:73 1 (const int) +0:73 Constant: +0:73 1.000000 +0:75 Branch: Return with expression +0:75 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:? Linker Objects +0:? 'g_sSamp' (uniform sampler) +0:? 'g_tTex1df4' (uniform texture1D) +0:? 'g_tTex1di4' (uniform itexture1D) +0:? 'g_tTex1du4' (uniform utexture1D) +0:? 'g_tTex2df4' (uniform texture2D) +0:? 'g_tTex2di4' (uniform itexture2D) +0:? 'g_tTex2du4' (uniform utexture2D) +0:? 'g_tTex3df4' (uniform texture3D) +0:? 'g_tTex3di4' (uniform itexture3D) +0:? 'g_tTex3du4' (uniform utexture3D) +0:? 'g_tTexcdf4' (uniform textureCube) +0:? 'g_tTexcdi4' (uniform itextureCube) +0:? 'g_tTexcdu4' (uniform utextureCube) +0:? 'g_tTex1df4a' (uniform texture1DArray) +0:? 'g_tTex1di4a' (uniform itexture1DArray) +0:? 'g_tTex1du4a' (uniform utexture1DArray) +0:? 'g_tTex2df4a' (uniform texture2DArray) +0:? 'g_tTex2di4a' (uniform itexture2DArray) +0:? 'g_tTex2du4a' (uniform utexture2DArray) +0:? 'g_tTexcdf4a' (uniform textureCubeArray) +0:? 'g_tTexcdi4a' (uniform itextureCubeArray) +0:? 'g_tTexcdu4a' (uniform utextureCubeArray) +0:? 'c1' (uniform int) +0:? 'c2' (uniform 2-component vector of int) +0:? 'c3' (uniform 3-component vector of int) +0:? 'c4' (uniform 4-component vector of int) +0:? 'o1' (uniform int) +0:? 'o2' (uniform 2-component vector of int) +0:? 'o3' (uniform 3-component vector of int) +0:? 'o4' (uniform 4-component vector of int) + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 168 + + Capability Shader + Capability ImageGatherExtended + Capability Sampled1D + Capability SampledCubeArray + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source HLSL 450 + Name 4 "main" + Name 9 "g_tTex1df4" + Name 14 "c2" + Name 23 "o1" + Name 29 "g_tTex1di4" + Name 40 "g_tTex1du4" + Name 51 "g_tTex2df4" + Name 55 "c3" + Name 61 "o2" + Name 66 "g_tTex2di4" + Name 76 "g_tTex2du4" + Name 86 "g_tTex3df4" + Name 89 "c4" + Name 95 "o3" + Name 100 "g_tTex3di4" + Name 110 "g_tTex3du4" + Name 118 "PS_OUTPUT" + MemberName 118(PS_OUTPUT) 0 "Color" + MemberName 118(PS_OUTPUT) 1 "Depth" + Name 120 "psout" + Name 129 "g_sSamp" + Name 132 "g_tTexcdf4" + Name 135 "g_tTexcdi4" + Name 138 "g_tTexcdu4" + Name 141 "g_tTex1df4a" + Name 144 "g_tTex1di4a" + Name 147 "g_tTex1du4a" + Name 150 "g_tTex2df4a" + Name 153 "g_tTex2di4a" + Name 156 "g_tTex2du4a" + Name 159 "g_tTexcdf4a" + Name 162 "g_tTexcdi4a" + Name 165 "g_tTexcdu4a" + Name 166 "c1" + Name 167 "o4" + Decorate 9(g_tTex1df4) DescriptorSet 0 + Decorate 29(g_tTex1di4) DescriptorSet 0 + Decorate 40(g_tTex1du4) DescriptorSet 0 + Decorate 51(g_tTex2df4) DescriptorSet 0 + Decorate 66(g_tTex2di4) DescriptorSet 0 + Decorate 76(g_tTex2du4) DescriptorSet 0 + Decorate 86(g_tTex3df4) DescriptorSet 0 + Decorate 100(g_tTex3di4) DescriptorSet 0 + Decorate 110(g_tTex3du4) DescriptorSet 0 + MemberDecorate 118(PS_OUTPUT) 1 BuiltIn FragDepth + Decorate 129(g_sSamp) DescriptorSet 0 + Decorate 132(g_tTexcdf4) DescriptorSet 0 + Decorate 135(g_tTexcdi4) DescriptorSet 0 + Decorate 138(g_tTexcdu4) DescriptorSet 0 + Decorate 141(g_tTex1df4a) DescriptorSet 0 + Decorate 144(g_tTex1di4a) DescriptorSet 0 + Decorate 147(g_tTex1du4a) DescriptorSet 0 + Decorate 150(g_tTex2df4a) DescriptorSet 0 + Decorate 153(g_tTex2di4a) DescriptorSet 0 + Decorate 156(g_tTex2du4a) DescriptorSet 0 + Decorate 159(g_tTexcdf4a) DescriptorSet 0 + Decorate 162(g_tTexcdi4a) DescriptorSet 0 + Decorate 165(g_tTexcdu4a) DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeImage 6(float) 1D sampled format:Unknown + 8: TypePointer UniformConstant 7 + 9(g_tTex1df4): 8(ptr) Variable UniformConstant + 11: TypeInt 32 1 + 12: TypeVector 11(int) 2 + 13: TypePointer UniformConstant 12(ivec2) + 14(c2): 13(ptr) Variable UniformConstant + 15: TypeInt 32 0 + 16: 15(int) Constant 0 + 17: TypePointer UniformConstant 11(int) + 20: 15(int) Constant 1 + 23(o1): 17(ptr) Variable UniformConstant + 25: TypeVector 6(float) 4 + 27: TypeImage 11(int) 1D sampled format:Unknown + 28: TypePointer UniformConstant 27 + 29(g_tTex1di4): 28(ptr) Variable UniformConstant + 36: TypeVector 11(int) 4 + 38: TypeImage 15(int) 1D sampled format:Unknown + 39: TypePointer UniformConstant 38 + 40(g_tTex1du4): 39(ptr) Variable UniformConstant + 47: TypeVector 15(int) 4 + 49: TypeImage 6(float) 2D sampled format:Unknown + 50: TypePointer UniformConstant 49 + 51(g_tTex2df4): 50(ptr) Variable UniformConstant + 53: TypeVector 11(int) 3 + 54: TypePointer UniformConstant 53(ivec3) + 55(c3): 54(ptr) Variable UniformConstant + 58: 15(int) Constant 2 + 61(o2): 13(ptr) Variable UniformConstant + 64: TypeImage 11(int) 2D sampled format:Unknown + 65: TypePointer UniformConstant 64 + 66(g_tTex2di4): 65(ptr) Variable UniformConstant + 74: TypeImage 15(int) 2D sampled format:Unknown + 75: TypePointer UniformConstant 74 + 76(g_tTex2du4): 75(ptr) Variable UniformConstant + 84: TypeImage 6(float) 3D sampled format:Unknown + 85: TypePointer UniformConstant 84 + 86(g_tTex3df4): 85(ptr) Variable UniformConstant + 88: TypePointer UniformConstant 36(ivec4) + 89(c4): 88(ptr) Variable UniformConstant + 92: 15(int) Constant 3 + 95(o3): 54(ptr) Variable UniformConstant + 98: TypeImage 11(int) 3D sampled format:Unknown + 99: TypePointer UniformConstant 98 + 100(g_tTex3di4): 99(ptr) Variable UniformConstant + 108: TypeImage 15(int) 3D sampled format:Unknown + 109: TypePointer UniformConstant 108 + 110(g_tTex3du4): 109(ptr) Variable UniformConstant + 118(PS_OUTPUT): TypeStruct 25(fvec4) 6(float) + 119: TypePointer Function 118(PS_OUTPUT) + 121: 11(int) Constant 1 + 122: 6(float) Constant 1065353216 + 123: TypePointer Function 6(float) + 127: TypeSampler + 128: TypePointer UniformConstant 127 + 129(g_sSamp): 128(ptr) Variable UniformConstant + 130: TypeImage 6(float) Cube sampled format:Unknown + 131: TypePointer UniformConstant 130 + 132(g_tTexcdf4): 131(ptr) Variable UniformConstant + 133: TypeImage 11(int) Cube sampled format:Unknown + 134: TypePointer UniformConstant 133 + 135(g_tTexcdi4): 134(ptr) Variable UniformConstant + 136: TypeImage 15(int) Cube sampled format:Unknown + 137: TypePointer UniformConstant 136 + 138(g_tTexcdu4): 137(ptr) Variable UniformConstant + 139: TypeImage 6(float) 1D array sampled format:Unknown + 140: TypePointer UniformConstant 139 +141(g_tTex1df4a): 140(ptr) Variable UniformConstant + 142: TypeImage 11(int) 1D array sampled format:Unknown + 143: TypePointer UniformConstant 142 +144(g_tTex1di4a): 143(ptr) Variable UniformConstant + 145: TypeImage 15(int) 1D array sampled format:Unknown + 146: TypePointer UniformConstant 145 +147(g_tTex1du4a): 146(ptr) Variable UniformConstant + 148: TypeImage 6(float) 2D array sampled format:Unknown + 149: TypePointer UniformConstant 148 +150(g_tTex2df4a): 149(ptr) Variable UniformConstant + 151: TypeImage 11(int) 2D array sampled format:Unknown + 152: TypePointer UniformConstant 151 +153(g_tTex2di4a): 152(ptr) Variable UniformConstant + 154: TypeImage 15(int) 2D array sampled format:Unknown + 155: TypePointer UniformConstant 154 +156(g_tTex2du4a): 155(ptr) Variable UniformConstant + 157: TypeImage 6(float) Cube array sampled format:Unknown + 158: TypePointer UniformConstant 157 +159(g_tTexcdf4a): 158(ptr) Variable UniformConstant + 160: TypeImage 11(int) Cube array sampled format:Unknown + 161: TypePointer UniformConstant 160 +162(g_tTexcdi4a): 161(ptr) Variable UniformConstant + 163: TypeImage 15(int) Cube array sampled format:Unknown + 164: TypePointer UniformConstant 163 +165(g_tTexcdu4a): 164(ptr) Variable UniformConstant + 166(c1): 17(ptr) Variable UniformConstant + 167(o4): 88(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 120(psout): 119(ptr) Variable Function + 10: 7 Load 9(g_tTex1df4) + 18: 17(ptr) AccessChain 14(c2) 16 + 19: 11(int) Load 18 + 21: 17(ptr) AccessChain 14(c2) 20 + 22: 11(int) Load 21 + 24: 11(int) Load 23(o1) + 26: 25(fvec4) ImageFetch 10 19 Lod Offset 22 24 + 30: 27 Load 29(g_tTex1di4) + 31: 17(ptr) AccessChain 14(c2) 16 + 32: 11(int) Load 31 + 33: 17(ptr) AccessChain 14(c2) 20 + 34: 11(int) Load 33 + 35: 11(int) Load 23(o1) + 37: 36(ivec4) ImageFetch 30 32 Lod Offset 34 35 + 41: 38 Load 40(g_tTex1du4) + 42: 17(ptr) AccessChain 14(c2) 16 + 43: 11(int) Load 42 + 44: 17(ptr) AccessChain 14(c2) 20 + 45: 11(int) Load 44 + 46: 11(int) Load 23(o1) + 48: 47(ivec4) ImageFetch 41 43 Lod Offset 45 46 + 52: 49 Load 51(g_tTex2df4) + 56: 53(ivec3) Load 55(c3) + 57: 12(ivec2) VectorShuffle 56 56 0 1 + 59: 17(ptr) AccessChain 55(c3) 58 + 60: 11(int) Load 59 + 62: 12(ivec2) Load 61(o2) + 63: 25(fvec4) ImageFetch 52 57 Lod Offset 60 62 + 67: 64 Load 66(g_tTex2di4) + 68: 53(ivec3) Load 55(c3) + 69: 12(ivec2) VectorShuffle 68 68 0 1 + 70: 17(ptr) AccessChain 55(c3) 58 + 71: 11(int) Load 70 + 72: 12(ivec2) Load 61(o2) + 73: 36(ivec4) ImageFetch 67 69 Lod Offset 71 72 + 77: 74 Load 76(g_tTex2du4) + 78: 53(ivec3) Load 55(c3) + 79: 12(ivec2) VectorShuffle 78 78 0 1 + 80: 17(ptr) AccessChain 55(c3) 58 + 81: 11(int) Load 80 + 82: 12(ivec2) Load 61(o2) + 83: 47(ivec4) ImageFetch 77 79 Lod Offset 81 82 + 87: 84 Load 86(g_tTex3df4) + 90: 36(ivec4) Load 89(c4) + 91: 53(ivec3) VectorShuffle 90 90 0 1 2 + 93: 17(ptr) AccessChain 89(c4) 92 + 94: 11(int) Load 93 + 96: 53(ivec3) Load 95(o3) + 97: 25(fvec4) ImageFetch 87 91 Lod Offset 94 96 + 101: 98 Load 100(g_tTex3di4) + 102: 36(ivec4) Load 89(c4) + 103: 53(ivec3) VectorShuffle 102 102 0 1 2 + 104: 17(ptr) AccessChain 89(c4) 92 + 105: 11(int) Load 104 + 106: 53(ivec3) Load 95(o3) + 107: 36(ivec4) ImageFetch 101 103 Lod Offset 105 106 + 111: 108 Load 110(g_tTex3du4) + 112: 36(ivec4) Load 89(c4) + 113: 53(ivec3) VectorShuffle 112 112 0 1 2 + 114: 17(ptr) AccessChain 89(c4) 92 + 115: 11(int) Load 114 + 116: 53(ivec3) Load 95(o3) + 117: 47(ivec4) ImageFetch 111 113 Lod Offset 115 116 + 124: 123(ptr) AccessChain 120(psout) 121 + Store 124 122 + 125:118(PS_OUTPUT) Load 120(psout) + ReturnValue 125 + FunctionEnd diff --git a/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out new file mode 100644 index 000000000..13332f2c7 --- /dev/null +++ b/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out @@ -0,0 +1,495 @@ +hlsl.load.offsetarray.dx10.frag +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:70 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:48 Function Parameters: +0:? Sequence +0:52 textureFetchOffset (global 4-component vector of float) +0:52 'g_tTex1df4a' (uniform texture1DArray) +0:52 vector swizzle (temp 2-component vector of int) +0:52 'c3' (uniform 3-component vector of int) +0:52 Sequence +0:52 Constant: +0:52 0 (const int) +0:52 Constant: +0:52 1 (const int) +0:52 direct index (temp int) +0:52 'c3' (uniform 3-component vector of int) +0:52 Constant: +0:52 2 (const int) +0:52 'o1' (uniform int) +0:53 textureFetchOffset (global 4-component vector of int) +0:53 'g_tTex1di4a' (uniform itexture1DArray) +0:53 vector swizzle (temp 2-component vector of int) +0:53 'c3' (uniform 3-component vector of int) +0:53 Sequence +0:53 Constant: +0:53 0 (const int) +0:53 Constant: +0:53 1 (const int) +0:53 direct index (temp int) +0:53 'c3' (uniform 3-component vector of int) +0:53 Constant: +0:53 2 (const int) +0:53 'o1' (uniform int) +0:54 textureFetchOffset (global 4-component vector of uint) +0:54 'g_tTex1du4a' (uniform utexture1DArray) +0:54 vector swizzle (temp 2-component vector of int) +0:54 'c3' (uniform 3-component vector of int) +0:54 Sequence +0:54 Constant: +0:54 0 (const int) +0:54 Constant: +0:54 1 (const int) +0:54 direct index (temp int) +0:54 'c3' (uniform 3-component vector of int) +0:54 Constant: +0:54 2 (const int) +0:54 'o1' (uniform int) +0:57 textureFetchOffset (global 4-component vector of float) +0:57 'g_tTex2df4a' (uniform texture2DArray) +0:57 vector swizzle (temp 3-component vector of int) +0:57 'c4' (uniform 4-component vector of int) +0:57 Sequence +0:57 Constant: +0:57 0 (const int) +0:57 Constant: +0:57 1 (const int) +0:57 Constant: +0:57 2 (const int) +0:57 direct index (temp int) +0:57 'c4' (uniform 4-component vector of int) +0:57 Constant: +0:57 3 (const int) +0:57 'o2' (uniform 2-component vector of int) +0:58 textureFetchOffset (global 4-component vector of int) +0:58 'g_tTex2di4a' (uniform itexture2DArray) +0:58 vector swizzle (temp 3-component vector of int) +0:58 'c4' (uniform 4-component vector of int) +0:58 Sequence +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1 (const int) +0:58 Constant: +0:58 2 (const int) +0:58 direct index (temp int) +0:58 'c4' (uniform 4-component vector of int) +0:58 Constant: +0:58 3 (const int) +0:58 'o2' (uniform 2-component vector of int) +0:59 textureFetchOffset (global 4-component vector of uint) +0:59 'g_tTex2du4a' (uniform utexture2DArray) +0:59 vector swizzle (temp 3-component vector of int) +0:59 'c4' (uniform 4-component vector of int) +0:59 Sequence +0:59 Constant: +0:59 0 (const int) +0:59 Constant: +0:59 1 (const int) +0:59 Constant: +0:59 2 (const int) +0:59 direct index (temp int) +0:59 'c4' (uniform 4-component vector of int) +0:59 Constant: +0:59 3 (const int) +0:59 'o2' (uniform 2-component vector of int) +0:66 move second child to first child (temp float) +0:66 Depth: direct index for structure (temp float FragDepth) +0:66 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:66 Constant: +0:66 1 (const int) +0:66 Constant: +0:66 1.000000 +0:68 Branch: Return with expression +0:68 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:? Linker Objects +0:? 'g_sSamp' (uniform sampler) +0:? 'g_tTex1df4' (uniform texture1D) +0:? 'g_tTex1di4' (uniform itexture1D) +0:? 'g_tTex1du4' (uniform utexture1D) +0:? 'g_tTex2df4' (uniform texture2D) +0:? 'g_tTex2di4' (uniform itexture2D) +0:? 'g_tTex2du4' (uniform utexture2D) +0:? 'g_tTex3df4' (uniform texture3D) +0:? 'g_tTex3di4' (uniform itexture3D) +0:? 'g_tTex3du4' (uniform utexture3D) +0:? 'g_tTexcdf4' (uniform textureCube) +0:? 'g_tTexcdi4' (uniform itextureCube) +0:? 'g_tTexcdu4' (uniform utextureCube) +0:? 'g_tTex1df4a' (uniform texture1DArray) +0:? 'g_tTex1di4a' (uniform itexture1DArray) +0:? 'g_tTex1du4a' (uniform utexture1DArray) +0:? 'g_tTex2df4a' (uniform texture2DArray) +0:? 'g_tTex2di4a' (uniform itexture2DArray) +0:? 'g_tTex2du4a' (uniform utexture2DArray) +0:? 'g_tTexcdf4a' (uniform textureCubeArray) +0:? 'g_tTexcdi4a' (uniform itextureCubeArray) +0:? 'g_tTexcdu4a' (uniform utextureCubeArray) +0:? 'c1' (uniform int) +0:? 'c2' (uniform 2-component vector of int) +0:? 'c3' (uniform 3-component vector of int) +0:? 'c4' (uniform 4-component vector of int) +0:? 'o1' (uniform int) +0:? 'o2' (uniform 2-component vector of int) +0:? 'o3' (uniform 3-component vector of int) +0:? 'o4' (uniform 4-component vector of int) + + +Linked fragment stage: + + +Shader version: 450 +gl_FragCoord origin is upper left +0:? Sequence +0:70 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:48 Function Parameters: +0:? Sequence +0:52 textureFetchOffset (global 4-component vector of float) +0:52 'g_tTex1df4a' (uniform texture1DArray) +0:52 vector swizzle (temp 2-component vector of int) +0:52 'c3' (uniform 3-component vector of int) +0:52 Sequence +0:52 Constant: +0:52 0 (const int) +0:52 Constant: +0:52 1 (const int) +0:52 direct index (temp int) +0:52 'c3' (uniform 3-component vector of int) +0:52 Constant: +0:52 2 (const int) +0:52 'o1' (uniform int) +0:53 textureFetchOffset (global 4-component vector of int) +0:53 'g_tTex1di4a' (uniform itexture1DArray) +0:53 vector swizzle (temp 2-component vector of int) +0:53 'c3' (uniform 3-component vector of int) +0:53 Sequence +0:53 Constant: +0:53 0 (const int) +0:53 Constant: +0:53 1 (const int) +0:53 direct index (temp int) +0:53 'c3' (uniform 3-component vector of int) +0:53 Constant: +0:53 2 (const int) +0:53 'o1' (uniform int) +0:54 textureFetchOffset (global 4-component vector of uint) +0:54 'g_tTex1du4a' (uniform utexture1DArray) +0:54 vector swizzle (temp 2-component vector of int) +0:54 'c3' (uniform 3-component vector of int) +0:54 Sequence +0:54 Constant: +0:54 0 (const int) +0:54 Constant: +0:54 1 (const int) +0:54 direct index (temp int) +0:54 'c3' (uniform 3-component vector of int) +0:54 Constant: +0:54 2 (const int) +0:54 'o1' (uniform int) +0:57 textureFetchOffset (global 4-component vector of float) +0:57 'g_tTex2df4a' (uniform texture2DArray) +0:57 vector swizzle (temp 3-component vector of int) +0:57 'c4' (uniform 4-component vector of int) +0:57 Sequence +0:57 Constant: +0:57 0 (const int) +0:57 Constant: +0:57 1 (const int) +0:57 Constant: +0:57 2 (const int) +0:57 direct index (temp int) +0:57 'c4' (uniform 4-component vector of int) +0:57 Constant: +0:57 3 (const int) +0:57 'o2' (uniform 2-component vector of int) +0:58 textureFetchOffset (global 4-component vector of int) +0:58 'g_tTex2di4a' (uniform itexture2DArray) +0:58 vector swizzle (temp 3-component vector of int) +0:58 'c4' (uniform 4-component vector of int) +0:58 Sequence +0:58 Constant: +0:58 0 (const int) +0:58 Constant: +0:58 1 (const int) +0:58 Constant: +0:58 2 (const int) +0:58 direct index (temp int) +0:58 'c4' (uniform 4-component vector of int) +0:58 Constant: +0:58 3 (const int) +0:58 'o2' (uniform 2-component vector of int) +0:59 textureFetchOffset (global 4-component vector of uint) +0:59 'g_tTex2du4a' (uniform utexture2DArray) +0:59 vector swizzle (temp 3-component vector of int) +0:59 'c4' (uniform 4-component vector of int) +0:59 Sequence +0:59 Constant: +0:59 0 (const int) +0:59 Constant: +0:59 1 (const int) +0:59 Constant: +0:59 2 (const int) +0:59 direct index (temp int) +0:59 'c4' (uniform 4-component vector of int) +0:59 Constant: +0:59 3 (const int) +0:59 'o2' (uniform 2-component vector of int) +0:66 move second child to first child (temp float) +0:66 Depth: direct index for structure (temp float FragDepth) +0:66 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:66 Constant: +0:66 1 (const int) +0:66 Constant: +0:66 1.000000 +0:68 Branch: Return with expression +0:68 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth}) +0:? Linker Objects +0:? 'g_sSamp' (uniform sampler) +0:? 'g_tTex1df4' (uniform texture1D) +0:? 'g_tTex1di4' (uniform itexture1D) +0:? 'g_tTex1du4' (uniform utexture1D) +0:? 'g_tTex2df4' (uniform texture2D) +0:? 'g_tTex2di4' (uniform itexture2D) +0:? 'g_tTex2du4' (uniform utexture2D) +0:? 'g_tTex3df4' (uniform texture3D) +0:? 'g_tTex3di4' (uniform itexture3D) +0:? 'g_tTex3du4' (uniform utexture3D) +0:? 'g_tTexcdf4' (uniform textureCube) +0:? 'g_tTexcdi4' (uniform itextureCube) +0:? 'g_tTexcdu4' (uniform utextureCube) +0:? 'g_tTex1df4a' (uniform texture1DArray) +0:? 'g_tTex1di4a' (uniform itexture1DArray) +0:? 'g_tTex1du4a' (uniform utexture1DArray) +0:? 'g_tTex2df4a' (uniform texture2DArray) +0:? 'g_tTex2di4a' (uniform itexture2DArray) +0:? 'g_tTex2du4a' (uniform utexture2DArray) +0:? 'g_tTexcdf4a' (uniform textureCubeArray) +0:? 'g_tTexcdi4a' (uniform itextureCubeArray) +0:? 'g_tTexcdu4a' (uniform utextureCubeArray) +0:? 'c1' (uniform int) +0:? 'c2' (uniform 2-component vector of int) +0:? 'c3' (uniform 3-component vector of int) +0:? 'c4' (uniform 4-component vector of int) +0:? 'o1' (uniform int) +0:? 'o2' (uniform 2-component vector of int) +0:? 'o3' (uniform 3-component vector of int) +0:? 'o4' (uniform 4-component vector of int) + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 145 + + Capability Shader + Capability ImageGatherExtended + Capability Sampled1D + Capability SampledCubeArray + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source HLSL 450 + Name 4 "main" + Name 9 "g_tTex1df4a" + Name 14 "c3" + Name 23 "o1" + Name 29 "g_tTex1di4a" + Name 40 "g_tTex1du4a" + Name 51 "g_tTex2df4a" + Name 54 "c4" + Name 61 "o2" + Name 66 "g_tTex2di4a" + Name 76 "g_tTex2du4a" + Name 84 "PS_OUTPUT" + MemberName 84(PS_OUTPUT) 0 "Color" + MemberName 84(PS_OUTPUT) 1 "Depth" + Name 86 "psout" + Name 95 "g_sSamp" + Name 98 "g_tTex1df4" + Name 101 "g_tTex1di4" + Name 104 "g_tTex1du4" + Name 107 "g_tTex2df4" + Name 110 "g_tTex2di4" + Name 113 "g_tTex2du4" + Name 116 "g_tTex3df4" + Name 119 "g_tTex3di4" + Name 122 "g_tTex3du4" + Name 125 "g_tTexcdf4" + Name 128 "g_tTexcdi4" + Name 131 "g_tTexcdu4" + Name 134 "g_tTexcdf4a" + Name 137 "g_tTexcdi4a" + Name 140 "g_tTexcdu4a" + Name 141 "c1" + Name 142 "c2" + Name 143 "o3" + Name 144 "o4" + Decorate 9(g_tTex1df4a) DescriptorSet 0 + Decorate 29(g_tTex1di4a) DescriptorSet 0 + Decorate 40(g_tTex1du4a) DescriptorSet 0 + Decorate 51(g_tTex2df4a) DescriptorSet 0 + Decorate 66(g_tTex2di4a) DescriptorSet 0 + Decorate 76(g_tTex2du4a) DescriptorSet 0 + MemberDecorate 84(PS_OUTPUT) 1 BuiltIn FragDepth + Decorate 95(g_sSamp) DescriptorSet 0 + Decorate 98(g_tTex1df4) DescriptorSet 0 + Decorate 101(g_tTex1di4) DescriptorSet 0 + Decorate 104(g_tTex1du4) DescriptorSet 0 + Decorate 107(g_tTex2df4) DescriptorSet 0 + Decorate 110(g_tTex2di4) DescriptorSet 0 + Decorate 113(g_tTex2du4) DescriptorSet 0 + Decorate 116(g_tTex3df4) DescriptorSet 0 + Decorate 119(g_tTex3di4) DescriptorSet 0 + Decorate 122(g_tTex3du4) DescriptorSet 0 + Decorate 125(g_tTexcdf4) DescriptorSet 0 + Decorate 128(g_tTexcdi4) DescriptorSet 0 + Decorate 131(g_tTexcdu4) DescriptorSet 0 + Decorate 134(g_tTexcdf4a) DescriptorSet 0 + Decorate 137(g_tTexcdi4a) DescriptorSet 0 + Decorate 140(g_tTexcdu4a) DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeImage 6(float) 1D array sampled format:Unknown + 8: TypePointer UniformConstant 7 + 9(g_tTex1df4a): 8(ptr) Variable UniformConstant + 11: TypeInt 32 1 + 12: TypeVector 11(int) 3 + 13: TypePointer UniformConstant 12(ivec3) + 14(c3): 13(ptr) Variable UniformConstant + 15: TypeVector 11(int) 2 + 18: TypeInt 32 0 + 19: 18(int) Constant 2 + 20: TypePointer UniformConstant 11(int) + 23(o1): 20(ptr) Variable UniformConstant + 25: TypeVector 6(float) 4 + 27: TypeImage 11(int) 1D array sampled format:Unknown + 28: TypePointer UniformConstant 27 + 29(g_tTex1di4a): 28(ptr) Variable UniformConstant + 36: TypeVector 11(int) 4 + 38: TypeImage 18(int) 1D array sampled format:Unknown + 39: TypePointer UniformConstant 38 + 40(g_tTex1du4a): 39(ptr) Variable UniformConstant + 47: TypeVector 18(int) 4 + 49: TypeImage 6(float) 2D array sampled format:Unknown + 50: TypePointer UniformConstant 49 + 51(g_tTex2df4a): 50(ptr) Variable UniformConstant + 53: TypePointer UniformConstant 36(ivec4) + 54(c4): 53(ptr) Variable UniformConstant + 57: 18(int) Constant 3 + 60: TypePointer UniformConstant 15(ivec2) + 61(o2): 60(ptr) Variable UniformConstant + 64: TypeImage 11(int) 2D array sampled format:Unknown + 65: TypePointer UniformConstant 64 + 66(g_tTex2di4a): 65(ptr) Variable UniformConstant + 74: TypeImage 18(int) 2D array sampled format:Unknown + 75: TypePointer UniformConstant 74 + 76(g_tTex2du4a): 75(ptr) Variable UniformConstant + 84(PS_OUTPUT): TypeStruct 25(fvec4) 6(float) + 85: TypePointer Function 84(PS_OUTPUT) + 87: 11(int) Constant 1 + 88: 6(float) Constant 1065353216 + 89: TypePointer Function 6(float) + 93: TypeSampler + 94: TypePointer UniformConstant 93 + 95(g_sSamp): 94(ptr) Variable UniformConstant + 96: TypeImage 6(float) 1D sampled format:Unknown + 97: TypePointer UniformConstant 96 + 98(g_tTex1df4): 97(ptr) Variable UniformConstant + 99: TypeImage 11(int) 1D sampled format:Unknown + 100: TypePointer UniformConstant 99 + 101(g_tTex1di4): 100(ptr) Variable UniformConstant + 102: TypeImage 18(int) 1D sampled format:Unknown + 103: TypePointer UniformConstant 102 + 104(g_tTex1du4): 103(ptr) Variable UniformConstant + 105: TypeImage 6(float) 2D sampled format:Unknown + 106: TypePointer UniformConstant 105 + 107(g_tTex2df4): 106(ptr) Variable UniformConstant + 108: TypeImage 11(int) 2D sampled format:Unknown + 109: TypePointer UniformConstant 108 + 110(g_tTex2di4): 109(ptr) Variable UniformConstant + 111: TypeImage 18(int) 2D sampled format:Unknown + 112: TypePointer UniformConstant 111 + 113(g_tTex2du4): 112(ptr) Variable UniformConstant + 114: TypeImage 6(float) 3D sampled format:Unknown + 115: TypePointer UniformConstant 114 + 116(g_tTex3df4): 115(ptr) Variable UniformConstant + 117: TypeImage 11(int) 3D sampled format:Unknown + 118: TypePointer UniformConstant 117 + 119(g_tTex3di4): 118(ptr) Variable UniformConstant + 120: TypeImage 18(int) 3D sampled format:Unknown + 121: TypePointer UniformConstant 120 + 122(g_tTex3du4): 121(ptr) Variable UniformConstant + 123: TypeImage 6(float) Cube sampled format:Unknown + 124: TypePointer UniformConstant 123 + 125(g_tTexcdf4): 124(ptr) Variable UniformConstant + 126: TypeImage 11(int) Cube sampled format:Unknown + 127: TypePointer UniformConstant 126 + 128(g_tTexcdi4): 127(ptr) Variable UniformConstant + 129: TypeImage 18(int) Cube sampled format:Unknown + 130: TypePointer UniformConstant 129 + 131(g_tTexcdu4): 130(ptr) Variable UniformConstant + 132: TypeImage 6(float) Cube array sampled format:Unknown + 133: TypePointer UniformConstant 132 +134(g_tTexcdf4a): 133(ptr) Variable UniformConstant + 135: TypeImage 11(int) Cube array sampled format:Unknown + 136: TypePointer UniformConstant 135 +137(g_tTexcdi4a): 136(ptr) Variable UniformConstant + 138: TypeImage 18(int) Cube array sampled format:Unknown + 139: TypePointer UniformConstant 138 +140(g_tTexcdu4a): 139(ptr) Variable UniformConstant + 141(c1): 20(ptr) Variable UniformConstant + 142(c2): 60(ptr) Variable UniformConstant + 143(o3): 13(ptr) Variable UniformConstant + 144(o4): 53(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 86(psout): 85(ptr) Variable Function + 10: 7 Load 9(g_tTex1df4a) + 16: 12(ivec3) Load 14(c3) + 17: 15(ivec2) VectorShuffle 16 16 0 1 + 21: 20(ptr) AccessChain 14(c3) 19 + 22: 11(int) Load 21 + 24: 11(int) Load 23(o1) + 26: 25(fvec4) ImageFetch 10 17 Lod Offset 22 24 + 30: 27 Load 29(g_tTex1di4a) + 31: 12(ivec3) Load 14(c3) + 32: 15(ivec2) VectorShuffle 31 31 0 1 + 33: 20(ptr) AccessChain 14(c3) 19 + 34: 11(int) Load 33 + 35: 11(int) Load 23(o1) + 37: 36(ivec4) ImageFetch 30 32 Lod Offset 34 35 + 41: 38 Load 40(g_tTex1du4a) + 42: 12(ivec3) Load 14(c3) + 43: 15(ivec2) VectorShuffle 42 42 0 1 + 44: 20(ptr) AccessChain 14(c3) 19 + 45: 11(int) Load 44 + 46: 11(int) Load 23(o1) + 48: 47(ivec4) ImageFetch 41 43 Lod Offset 45 46 + 52: 49 Load 51(g_tTex2df4a) + 55: 36(ivec4) Load 54(c4) + 56: 12(ivec3) VectorShuffle 55 55 0 1 2 + 58: 20(ptr) AccessChain 54(c4) 57 + 59: 11(int) Load 58 + 62: 15(ivec2) Load 61(o2) + 63: 25(fvec4) ImageFetch 52 56 Lod Offset 59 62 + 67: 64 Load 66(g_tTex2di4a) + 68: 36(ivec4) Load 54(c4) + 69: 12(ivec3) VectorShuffle 68 68 0 1 2 + 70: 20(ptr) AccessChain 54(c4) 57 + 71: 11(int) Load 70 + 72: 15(ivec2) Load 61(o2) + 73: 36(ivec4) ImageFetch 67 69 Lod Offset 71 72 + 77: 74 Load 76(g_tTex2du4a) + 78: 36(ivec4) Load 54(c4) + 79: 12(ivec3) VectorShuffle 78 78 0 1 2 + 80: 20(ptr) AccessChain 54(c4) 57 + 81: 11(int) Load 80 + 82: 15(ivec2) Load 61(o2) + 83: 47(ivec4) ImageFetch 77 79 Lod Offset 81 82 + 90: 89(ptr) AccessChain 86(psout) 87 + Store 90 88 + 91:84(PS_OUTPUT) Load 86(psout) + ReturnValue 91 + FunctionEnd diff --git a/Test/hlsl.load.array.dx10.frag b/Test/hlsl.load.array.dx10.frag new file mode 100644 index 000000000..253de3e26 --- /dev/null +++ b/Test/hlsl.load.array.dx10.frag @@ -0,0 +1,71 @@ +SamplerState g_sSamp : register(s0); + +uniform Texture1D g_tTex1df4 : register(t0); +Texture1D g_tTex1di4; +Texture1D g_tTex1du4; + +Texture2D g_tTex2df4; +Texture2D g_tTex2di4; +Texture2D g_tTex2du4; + +Texture3D g_tTex3df4; +Texture3D g_tTex3di4; +Texture3D g_tTex3du4; + +TextureCube g_tTexcdf4; +TextureCube g_tTexcdi4; +TextureCube g_tTexcdu4; + +Texture1DArray g_tTex1df4a; +Texture1DArray g_tTex1di4a; +Texture1DArray g_tTex1du4a; + +Texture2DArray g_tTex2df4a; +Texture2DArray g_tTex2di4a; +Texture2DArray g_tTex2du4a; + +TextureCubeArray g_tTexcdf4a; +TextureCubeArray g_tTexcdi4a; +TextureCubeArray g_tTexcdu4a; + +struct PS_OUTPUT +{ + float4 Color : SV_Target0; + float Depth : SV_Depth; +}; + +uniform int c1; +uniform int2 c2; +uniform int3 c3; +uniform int4 c4; + +uniform int o1; +uniform int2 o2; +uniform int3 o3; +uniform int4 o4; + +PS_OUTPUT main() +{ + PS_OUTPUT psout; + + // 1DArray + g_tTex1df4a.Load(c3); + g_tTex1di4a.Load(c3); + g_tTex1du4a.Load(c3); + + // 2DArray + g_tTex2df4a.Load(c4); + g_tTex2di4a.Load(c4); + g_tTex2du4a.Load(c4); + + // Offset has no Cube or CubeArray forms + + // TODO: + // Load, SampleIndex + // Load, SampleIndex, Offset + + psout.Color = 1.0; + psout.Depth = 1.0; + + return psout; +} diff --git a/Test/hlsl.load.basic.dx10.frag b/Test/hlsl.load.basic.dx10.frag new file mode 100644 index 000000000..abb594e3a --- /dev/null +++ b/Test/hlsl.load.basic.dx10.frag @@ -0,0 +1,76 @@ +SamplerState g_sSamp : register(s0); + +uniform Texture1D g_tTex1df4 : register(t0); +Texture1D g_tTex1di4; +Texture1D g_tTex1du4; + +Texture2D g_tTex2df4; +Texture2D g_tTex2di4; +Texture2D g_tTex2du4; + +Texture3D g_tTex3df4; +Texture3D g_tTex3di4; +Texture3D g_tTex3du4; + +TextureCube g_tTexcdf4; +TextureCube g_tTexcdi4; +TextureCube g_tTexcdu4; + +Texture1DArray g_tTex1df4a; +Texture1DArray g_tTex1di4a; +Texture1DArray g_tTex1du4a; + +Texture2DArray g_tTex2df4a; +Texture2DArray g_tTex2di4a; +Texture2DArray g_tTex2du4a; + +TextureCubeArray g_tTexcdf4a; +TextureCubeArray g_tTexcdi4a; +TextureCubeArray g_tTexcdu4a; + +struct PS_OUTPUT +{ + float4 Color : SV_Target0; + float Depth : SV_Depth; +}; + +uniform int c1; +uniform int2 c2; +uniform int3 c3; +uniform int4 c4; + +uniform int o1; +uniform int2 o2; +uniform int3 o3; +uniform int4 o4; + +PS_OUTPUT main() +{ + PS_OUTPUT psout; + + // 1D + g_tTex1df4.Load(c2); + g_tTex1di4.Load(c2); + g_tTex1du4.Load(c2); + + // 2D + g_tTex2df4.Load(c3); + g_tTex2di4.Load(c3); + g_tTex2du4.Load(c3); + + // 3D + g_tTex3df4.Load(c4); + g_tTex3di4.Load(c4); + g_tTex3du4.Load(c4); + + // Offset has no Cube or CubeArray forms + + // TODO: + // Load, SampleIndex + // Load, SampleIndex, Offset + + psout.Color = 1.0; + psout.Depth = 1.0; + + return psout; +} diff --git a/Test/hlsl.load.dx10.frag b/Test/hlsl.load.dx10.frag deleted file mode 100644 index 39c99e351..000000000 --- a/Test/hlsl.load.dx10.frag +++ /dev/null @@ -1,91 +0,0 @@ -SamplerState g_sSamp : register(s0); - -uniform Texture1D g_tTex1df4 : register(t0); -Texture1D g_tTex1di4; -Texture1D g_tTex1du4; - -Texture2D g_tTex2df4; -Texture2D g_tTex2di4; -Texture2D g_tTex2du4; - -Texture3D g_tTex3df4; -Texture3D g_tTex3di4; -Texture3D g_tTex3du4; - -TextureCube g_tTexcdf4; -TextureCube g_tTexcdi4; -TextureCube g_tTexcdu4; - -Texture1DArray g_tTex1df4a; -Texture1DArray g_tTex1di4a; -Texture1DArray g_tTex1du4a; - -Texture2DArray g_tTex2df4a; -Texture2DArray g_tTex2di4a; -Texture2DArray g_tTex2du4a; - -TextureCubeArray g_tTexcdf4a; -TextureCubeArray g_tTexcdi4a; -TextureCubeArray g_tTexcdu4a; - -struct PS_OUTPUT -{ - float4 Color : SV_Target0; - float Depth : SV_Depth; -}; - -PS_OUTPUT main() -{ - PS_OUTPUT psout; - - // Load, no offset - g_tTex1df4.Load(int2(1,2)); - g_tTex1di4.Load(int2(1,2)); - g_tTex1du4.Load(int2(1,2)); - - g_tTex2df4.Load(int3(1,2,3)); - g_tTex2di4.Load(int3(1,2,3)); - g_tTex2du4.Load(int3(1,2,3)); - - g_tTex3df4.Load(int4(1,2,3,4)); - g_tTex3di4.Load(int4(1,2,3,4)); - g_tTex3du4.Load(int4(1,2,3,4)); - - g_tTex1df4a.Load(int3(1,2,3)); - g_tTex1di4a.Load(int3(1,2,3)); - g_tTex1du4a.Load(int3(1,2,3)); - - g_tTex2df4a.Load(int4(1,2,3,4)); - g_tTex2di4a.Load(int4(1,2,3,4)); - g_tTex2du4a.Load(int4(1,2,3,4)); - - // Load, offset - g_tTex1df4.Load(int2(1,2), 3); - g_tTex1di4.Load(int2(1,2), 3); - g_tTex1du4.Load(int2(1,2), 3); - - g_tTex2df4.Load(int3(1,2,3), int2(4,5)); - g_tTex2di4.Load(int3(1,2,3), int2(4,5)); - g_tTex2du4.Load(int3(1,2,3), int2(4,5)); - - g_tTex3df4.Load(int4(1,2,3,4), int3(5,6,7)); - g_tTex3di4.Load(int4(1,2,3,4), int3(5,6,7)); - g_tTex3du4.Load(int4(1,2,3,4), int3(5,6,7)); - - g_tTex1df4a.Load(int3(1,2,3), 4); - g_tTex1di4a.Load(int3(1,2,3), 4); - g_tTex1du4a.Load(int3(1,2,3), 4); - - g_tTex2df4a.Load(int4(1,2,3,4), int2(4,5)); - g_tTex2di4a.Load(int4(1,2,3,4), int2(4,5)); - g_tTex2du4a.Load(int4(1,2,3,4), int2(4,5)); - - // TODO: - // Load, SampleIndex - // Load, SampleIndex, Offset - - psout.Color = 1.0; - psout.Depth = 1.0; - - return psout; -} diff --git a/Test/hlsl.load.offset.dx10.frag b/Test/hlsl.load.offset.dx10.frag new file mode 100644 index 000000000..bc946eead --- /dev/null +++ b/Test/hlsl.load.offset.dx10.frag @@ -0,0 +1,76 @@ +SamplerState g_sSamp : register(s0); + +uniform Texture1D g_tTex1df4 : register(t0); +Texture1D g_tTex1di4; +Texture1D g_tTex1du4; + +Texture2D g_tTex2df4; +Texture2D g_tTex2di4; +Texture2D g_tTex2du4; + +Texture3D g_tTex3df4; +Texture3D g_tTex3di4; +Texture3D g_tTex3du4; + +TextureCube g_tTexcdf4; +TextureCube g_tTexcdi4; +TextureCube g_tTexcdu4; + +Texture1DArray g_tTex1df4a; +Texture1DArray g_tTex1di4a; +Texture1DArray g_tTex1du4a; + +Texture2DArray g_tTex2df4a; +Texture2DArray g_tTex2di4a; +Texture2DArray g_tTex2du4a; + +TextureCubeArray g_tTexcdf4a; +TextureCubeArray g_tTexcdi4a; +TextureCubeArray g_tTexcdu4a; + +struct PS_OUTPUT +{ + float4 Color : SV_Target0; + float Depth : SV_Depth; +}; + +uniform int c1; +uniform int2 c2; +uniform int3 c3; +uniform int4 c4; + +uniform int o1; +uniform int2 o2; +uniform int3 o3; +uniform int4 o4; + +PS_OUTPUT main() +{ + PS_OUTPUT psout; + + // 1D + g_tTex1df4.Load(c2, o1); + g_tTex1di4.Load(c2, o1); + g_tTex1du4.Load(c2, o1); + + // 2D + g_tTex2df4.Load(c3, o2); + g_tTex2di4.Load(c3, o2); + g_tTex2du4.Load(c3, o2); + + // 3D + g_tTex3df4.Load(c4, o3); + g_tTex3di4.Load(c4, o3); + g_tTex3du4.Load(c4, o3); + + // Offset has no Cube or CubeArray forms + + // TODO: + // Load, SampleIndex + // Load, SampleIndex, Offset + + psout.Color = 1.0; + psout.Depth = 1.0; + + return psout; +} diff --git a/Test/hlsl.load.offsetarray.dx10.frag b/Test/hlsl.load.offsetarray.dx10.frag new file mode 100644 index 000000000..12b6a9e5a --- /dev/null +++ b/Test/hlsl.load.offsetarray.dx10.frag @@ -0,0 +1,69 @@ +SamplerState g_sSamp : register(s0); + +uniform Texture1D g_tTex1df4 : register(t0); +Texture1D g_tTex1di4; +Texture1D g_tTex1du4; + +Texture2D g_tTex2df4; +Texture2D g_tTex2di4; +Texture2D g_tTex2du4; + +Texture3D g_tTex3df4; +Texture3D g_tTex3di4; +Texture3D g_tTex3du4; + +TextureCube g_tTexcdf4; +TextureCube g_tTexcdi4; +TextureCube g_tTexcdu4; + +Texture1DArray g_tTex1df4a; +Texture1DArray g_tTex1di4a; +Texture1DArray g_tTex1du4a; + +Texture2DArray g_tTex2df4a; +Texture2DArray g_tTex2di4a; +Texture2DArray g_tTex2du4a; + +TextureCubeArray g_tTexcdf4a; +TextureCubeArray g_tTexcdi4a; +TextureCubeArray g_tTexcdu4a; + +struct PS_OUTPUT +{ + float4 Color : SV_Target0; + float Depth : SV_Depth; +}; + +uniform int c1; +uniform int2 c2; +uniform int3 c3; +uniform int4 c4; + +uniform int o1; +uniform int2 o2; +uniform int3 o3; +uniform int4 o4; + +PS_OUTPUT main() +{ + PS_OUTPUT psout; + + // 1DArray + g_tTex1df4a.Load(c3, o1); + g_tTex1di4a.Load(c3, o1); + g_tTex1du4a.Load(c3, o1); + + // 2DArray + g_tTex2df4a.Load(c4, o2); + g_tTex2di4a.Load(c4, o2); + g_tTex2du4a.Load(c4, o2); + + // TODO: + // Load, SampleIndex + // Load, SampleIndex, Offset + + psout.Color = 1.0; + psout.Depth = 1.0; + + return psout; +} diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index 39a9fff6c..807401770 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -86,6 +86,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler, bool isTexture() const { return !sampler && !image; } bool isShadow() const { return shadow; } bool isArrayed() const { return arrayed; } + bool isMultiSample() const { return ms; } void clear() { diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index d855e7236..6fe5c4ad0 100644 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -1,5 +1,6 @@ // //Copyright (C) 2002-2005 3Dlabs Inc. Ltd. +//Copyright (C) 2016 LunarG, Inc. //All rights reserved. // //Redistribution and use in source and binary forms, with or without @@ -47,6 +48,16 @@ class TInfoSink; namespace glslang { struct TVectorFields { + TVectorFields() { } + + TVectorFields(int c0, int c1, int c2, int c3) : num(4) + { + offsets[0] = c0; + offsets[1] = c1; + offsets[2] = c2; + offsets[3] = c3; + } + int offsets[4]; int num; }; diff --git a/gtests/Hlsl.FromFile.cpp b/gtests/Hlsl.FromFile.cpp index 2923112c2..4e88eee7e 100644 --- a/gtests/Hlsl.FromFile.cpp +++ b/gtests/Hlsl.FromFile.cpp @@ -96,6 +96,10 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.intrinsics.negative.comp", "ComputeShaderFunction"}, {"hlsl.intrinsics.negative.frag", "PixelShaderFunction"}, {"hlsl.intrinsics.negative.vert", "VertexShaderFunction"}, + {"hlsl.load.array.dx10.frag", "main"}, + {"hlsl.load.basic.dx10.frag", "main"}, + {"hlsl.load.offset.dx10.frag", "main"}, + {"hlsl.load.offsetarray.dx10.frag", "main"}, {"hlsl.sample.array.dx10.frag", "main"}, {"hlsl.sample.basic.dx10.frag", "main"}, {"hlsl.sample.offset.dx10.frag", "main"}, diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index 9c62a1c57..af4a76b28 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -1124,6 +1124,71 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType break; } + case EOpMethodLoad: + { + TIntermTyped* argTex = argAggregate->getSequence()[0]->getAsTyped(); + TIntermTyped* argCoord = argAggregate->getSequence()[1]->getAsTyped(); + TIntermTyped* argOffset = nullptr; + TIntermTyped* lodComponent = nullptr; + TIntermTyped* coordSwizzle = nullptr; + + const bool isMS = argTex->getType().getSampler().isMultiSample(); + const TBasicType coordBaseType = argCoord->getType().getBasicType(); + + // Last component of coordinate is the mip level, for non-MS. we separate them here: + if (isMS) { + // MS has no LOD + coordSwizzle = argTex; + } else { + // Extract coordinate + TVectorFields coordFields(0,1,2,3); + coordFields.num = argCoord->getType().getVectorSize() - (isMS ? 0 : 1); + TIntermTyped* coordIdx = intermediate.addSwizzle(coordFields, loc); + coordSwizzle = intermediate.addIndex(EOpVectorSwizzle, argCoord, coordIdx, loc); + coordSwizzle->setType(TType(coordBaseType, EvqTemporary, coordFields.num)); + + // Extract LOD + TIntermTyped* lodIdx = intermediate.addConstantUnion(coordFields.num, loc, true); + lodComponent = intermediate.addIndex(EOpIndexDirect, argCoord, lodIdx, loc); + lodComponent->setType(TType(coordBaseType, EvqTemporary, 1)); + } + + const int numArgs = argAggregate->getSequence().size(); + const bool hasOffset = ((!isMS && numArgs == 3) || (isMS && numArgs == 4)); + + // Obtain offset arg, if there is one. + if (hasOffset) { + const int offsetPos = (isMS ? 3 : 2); + argOffset = argAggregate->getSequence()[offsetPos]->getAsTyped(); + } + + // Create texel fetch + const TOperator fetchOp = (hasOffset ? EOpTextureFetchOffset : EOpTextureFetch); + TIntermAggregate* txfetch = new TIntermAggregate(fetchOp); + + const TSamplerDim dim = argTex->getType().getSampler().dim; + if (dim == EsdBuffer) // TODO: buffers + assert(0); + if (isMS) // TODO: 2DMS sample number + assert(0); + + // Build up the fetch + txfetch->getSequence().push_back(argTex); + txfetch->getSequence().push_back(coordSwizzle); + + if (!isMS) // MS has no LOD + txfetch->getSequence().push_back(lodComponent); + + if (hasOffset) + txfetch->getSequence().push_back(argOffset); + + txfetch->setType(node->getType()); + txfetch->setLoc(loc); + node = txfetch; + + break; + } + default: break; // most pass through unchanged } diff --git a/hlsl/hlslParseables.cpp b/hlsl/hlslParseables.cpp index 06d28aa91..25244f3d6 100755 --- a/hlsl/hlslParseables.cpp +++ b/hlsl/hlslParseables.cpp @@ -593,10 +593,10 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c // { "SampleLevel", /*!O A*/ "V4", nullptr, "@V,S,V,S", "FIU,S,F,F", EShLangAll }, // { "SampleLevel", /* O A*/ "V4", nullptr, "@V,S,V,S,V", "FIU,S,F,F,I", EShLangAll }, - // { "Load", "V4", nullptr, "%V,V", "FIU,I", EShLangAll }, - // { "Load", "V4", nullptr, "@V,V", "FIU,I", EShLangAll }, - // { "Load", /* offset*/ "V4", nullptr, "%V,V,V", "FIU,I,I", EShLangAll }, - // { "Load", /* offset*/ "V4", nullptr, "@V,V,V", "FIU,I,I", EShLangAll }, + { "Load", /*!O !A*/ "V4", nullptr, "%V,V", "FIU,I", EShLangAll }, + { "Load", /*!O A*/ "V4", nullptr, "@V,V", "FIU,I", EShLangAll }, + { "Load", /* O !A*/ "V4", nullptr, "%V,V,V", "FIU,I,I", EShLangAll }, + { "Load", /* O A*/ "V4", nullptr, "@V,V,V", "FIU,I,I", EShLangAll }, // TODO: MS variants of Load // { "Load", /* +sampleidex*/ "V4", nullptr, "$V,V,S", "FIU,I,I", EShLangAll }, // { "Load", /* +samplindex, offset*/ "V4", nullptr, "$V,V,S,V", "FIU,I,I,I", EShLangAll }, @@ -944,7 +944,7 @@ void TBuiltInParseablesHlsl::identifyBuiltIns(int /*version*/, EProfile /*profil symbolTable.relateToOperator("SampleCmpLevelZero", EOpMethodSampleCmpLevelZero); symbolTable.relateToOperator("SampleGrad", EOpMethodSampleGrad); // symbolTable.relateToOperator("SampleLevel", EOpMethodSampleLevel); - // symbolTable.relateToOperator("Load", EOpMethodLoad); + symbolTable.relateToOperator("Load", EOpMethodLoad); symbolTable.relateToOperator("GetDimensions", EOpMethodGetDimensions); }