HLSL: Add gather, improve proto generator machine for upcoming 2DMS/Shadow
This commit is contained in:
parent
630e1bc636
commit
a2f3d285a8
15 changed files with 2266 additions and 329 deletions
359
Test/baseResults/hlsl.gather.array.dx10.frag.out
Normal file
359
Test/baseResults/hlsl.gather.array.dx10.frag.out
Normal file
|
|
@ -0,0 +1,359 @@
|
|||
hlsl.gather.array.dx10.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:44 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:24 Function Parameters:
|
||||
0:? Sequence
|
||||
0:29 Sequence
|
||||
0:29 move second child to first child (temp 4-component vector of float)
|
||||
0:29 'txval20' (temp 4-component vector of float)
|
||||
0:29 textureGather (global 4-component vector of float)
|
||||
0:29 Construct combined texture-sampler (temp sampler2DArray)
|
||||
0:29 'g_tTex2df4a' (uniform texture2DArray)
|
||||
0:29 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.100000
|
||||
0:? 0.200000
|
||||
0:? 0.300000
|
||||
0:30 Sequence
|
||||
0:30 move second child to first child (temp 4-component vector of int)
|
||||
0:30 'txval21' (temp 4-component vector of int)
|
||||
0:30 textureGather (global 4-component vector of int)
|
||||
0:30 Construct combined texture-sampler (temp isampler2DArray)
|
||||
0:30 'g_tTex2di4a' (uniform itexture2DArray)
|
||||
0:30 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.300000
|
||||
0:? 0.400000
|
||||
0:? 0.500000
|
||||
0:31 Sequence
|
||||
0:31 move second child to first child (temp 4-component vector of uint)
|
||||
0:31 'txval22' (temp 4-component vector of uint)
|
||||
0:31 textureGather (global 4-component vector of uint)
|
||||
0:31 Construct combined texture-sampler (temp usampler2DArray)
|
||||
0:31 'g_tTex2du4a' (uniform utexture2DArray)
|
||||
0:31 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.500000
|
||||
0:? 0.600000
|
||||
0:? 0.700000
|
||||
0:35 Sequence
|
||||
0:35 move second child to first child (temp 4-component vector of float)
|
||||
0:35 'txval40' (temp 4-component vector of float)
|
||||
0:35 textureGather (global 4-component vector of float)
|
||||
0:35 Construct combined texture-sampler (temp samplerCubeArray)
|
||||
0:35 'g_tTexcdf4a' (uniform textureCubeArray)
|
||||
0:35 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.100000
|
||||
0:? 0.200000
|
||||
0:? 0.300000
|
||||
0:? 0.400000
|
||||
0:36 Sequence
|
||||
0:36 move second child to first child (temp 4-component vector of int)
|
||||
0:36 'txval41' (temp 4-component vector of int)
|
||||
0:36 textureGather (global 4-component vector of int)
|
||||
0:36 Construct combined texture-sampler (temp isamplerCubeArray)
|
||||
0:36 'g_tTexcdi4a' (uniform itextureCubeArray)
|
||||
0:36 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.400000
|
||||
0:? 0.500000
|
||||
0:? 0.600000
|
||||
0:? 0.700000
|
||||
0:37 Sequence
|
||||
0:37 move second child to first child (temp 4-component vector of uint)
|
||||
0:37 'txval42' (temp 4-component vector of uint)
|
||||
0:37 textureGather (global 4-component vector of uint)
|
||||
0:37 Construct combined texture-sampler (temp usamplerCubeArray)
|
||||
0:37 'g_tTexcdu4a' (uniform utextureCubeArray)
|
||||
0:37 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.700000
|
||||
0:? 0.800000
|
||||
0:? 0.900000
|
||||
0:? 1.000000
|
||||
0:40 move second child to first child (temp float)
|
||||
0:40 Depth: direct index for structure (temp float FragDepth)
|
||||
0:40 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:40 Constant:
|
||||
0:40 1 (const int)
|
||||
0:40 Constant:
|
||||
0:40 1.000000
|
||||
0:42 Branch: Return with expression
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (uniform sampler)
|
||||
0:? 'g_tTex1df4a' (uniform texture1DArray)
|
||||
0:? 'g_tTex1df4' (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)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:44 Function Definition: main( (global structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:24 Function Parameters:
|
||||
0:? Sequence
|
||||
0:29 Sequence
|
||||
0:29 move second child to first child (temp 4-component vector of float)
|
||||
0:29 'txval20' (temp 4-component vector of float)
|
||||
0:29 textureGather (global 4-component vector of float)
|
||||
0:29 Construct combined texture-sampler (temp sampler2DArray)
|
||||
0:29 'g_tTex2df4a' (uniform texture2DArray)
|
||||
0:29 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.100000
|
||||
0:? 0.200000
|
||||
0:? 0.300000
|
||||
0:30 Sequence
|
||||
0:30 move second child to first child (temp 4-component vector of int)
|
||||
0:30 'txval21' (temp 4-component vector of int)
|
||||
0:30 textureGather (global 4-component vector of int)
|
||||
0:30 Construct combined texture-sampler (temp isampler2DArray)
|
||||
0:30 'g_tTex2di4a' (uniform itexture2DArray)
|
||||
0:30 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.300000
|
||||
0:? 0.400000
|
||||
0:? 0.500000
|
||||
0:31 Sequence
|
||||
0:31 move second child to first child (temp 4-component vector of uint)
|
||||
0:31 'txval22' (temp 4-component vector of uint)
|
||||
0:31 textureGather (global 4-component vector of uint)
|
||||
0:31 Construct combined texture-sampler (temp usampler2DArray)
|
||||
0:31 'g_tTex2du4a' (uniform utexture2DArray)
|
||||
0:31 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.500000
|
||||
0:? 0.600000
|
||||
0:? 0.700000
|
||||
0:35 Sequence
|
||||
0:35 move second child to first child (temp 4-component vector of float)
|
||||
0:35 'txval40' (temp 4-component vector of float)
|
||||
0:35 textureGather (global 4-component vector of float)
|
||||
0:35 Construct combined texture-sampler (temp samplerCubeArray)
|
||||
0:35 'g_tTexcdf4a' (uniform textureCubeArray)
|
||||
0:35 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.100000
|
||||
0:? 0.200000
|
||||
0:? 0.300000
|
||||
0:? 0.400000
|
||||
0:36 Sequence
|
||||
0:36 move second child to first child (temp 4-component vector of int)
|
||||
0:36 'txval41' (temp 4-component vector of int)
|
||||
0:36 textureGather (global 4-component vector of int)
|
||||
0:36 Construct combined texture-sampler (temp isamplerCubeArray)
|
||||
0:36 'g_tTexcdi4a' (uniform itextureCubeArray)
|
||||
0:36 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.400000
|
||||
0:? 0.500000
|
||||
0:? 0.600000
|
||||
0:? 0.700000
|
||||
0:37 Sequence
|
||||
0:37 move second child to first child (temp 4-component vector of uint)
|
||||
0:37 'txval42' (temp 4-component vector of uint)
|
||||
0:37 textureGather (global 4-component vector of uint)
|
||||
0:37 Construct combined texture-sampler (temp usamplerCubeArray)
|
||||
0:37 'g_tTexcdu4a' (uniform utextureCubeArray)
|
||||
0:37 'g_sSamp' (uniform sampler)
|
||||
0:? Constant:
|
||||
0:? 0.700000
|
||||
0:? 0.800000
|
||||
0:? 0.900000
|
||||
0:? 1.000000
|
||||
0:40 move second child to first child (temp float)
|
||||
0:40 Depth: direct index for structure (temp float FragDepth)
|
||||
0:40 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:40 Constant:
|
||||
0:40 1 (const int)
|
||||
0:40 Constant:
|
||||
0:40 1.000000
|
||||
0:42 Branch: Return with expression
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (uniform sampler)
|
||||
0:? 'g_tTex1df4a' (uniform texture1DArray)
|
||||
0:? 'g_tTex1df4' (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)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 108
|
||||
|
||||
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 "txval20"
|
||||
Name 12 "g_tTex2df4a"
|
||||
Name 16 "g_sSamp"
|
||||
Name 30 "txval21"
|
||||
Name 33 "g_tTex2di4a"
|
||||
Name 45 "txval22"
|
||||
Name 48 "g_tTex2du4a"
|
||||
Name 57 "txval40"
|
||||
Name 60 "g_tTexcdf4a"
|
||||
Name 67 "txval41"
|
||||
Name 70 "g_tTexcdi4a"
|
||||
Name 77 "txval42"
|
||||
Name 80 "g_tTexcdu4a"
|
||||
Name 90 "PS_OUTPUT"
|
||||
MemberName 90(PS_OUTPUT) 0 "Color"
|
||||
MemberName 90(PS_OUTPUT) 1 "Depth"
|
||||
Name 92 "psout"
|
||||
Name 100 "g_tTex1df4a"
|
||||
Name 101 "g_tTex1df4"
|
||||
Name 104 "g_tTex1di4a"
|
||||
Name 107 "g_tTex1du4a"
|
||||
Decorate 12(g_tTex2df4a) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
Decorate 33(g_tTex2di4a) DescriptorSet 0
|
||||
Decorate 48(g_tTex2du4a) DescriptorSet 0
|
||||
Decorate 60(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 70(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 80(g_tTexcdu4a) DescriptorSet 0
|
||||
MemberDecorate 90(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 100(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 101(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 104(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 107(g_tTex1du4a) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Function 7(fvec4)
|
||||
10: TypeImage 6(float) 2D array sampled format:Unknown
|
||||
11: TypePointer UniformConstant 10
|
||||
12(g_tTex2df4a): 11(ptr) Variable UniformConstant
|
||||
14: TypeSampler
|
||||
15: TypePointer UniformConstant 14
|
||||
16(g_sSamp): 15(ptr) Variable UniformConstant
|
||||
18: TypeSampledImage 10
|
||||
20: TypeVector 6(float) 3
|
||||
21: 6(float) Constant 1036831949
|
||||
22: 6(float) Constant 1045220557
|
||||
23: 6(float) Constant 1050253722
|
||||
24: 20(fvec3) ConstantComposite 21 22 23
|
||||
25: TypeInt 32 1
|
||||
26: 25(int) Constant 0
|
||||
28: TypeVector 25(int) 4
|
||||
29: TypePointer Function 28(ivec4)
|
||||
31: TypeImage 25(int) 2D array sampled format:Unknown
|
||||
32: TypePointer UniformConstant 31
|
||||
33(g_tTex2di4a): 32(ptr) Variable UniformConstant
|
||||
36: TypeSampledImage 31
|
||||
38: 6(float) Constant 1053609165
|
||||
39: 6(float) Constant 1056964608
|
||||
40: 20(fvec3) ConstantComposite 23 38 39
|
||||
42: TypeInt 32 0
|
||||
43: TypeVector 42(int) 4
|
||||
44: TypePointer Function 43(ivec4)
|
||||
46: TypeImage 42(int) 2D array sampled format:Unknown
|
||||
47: TypePointer UniformConstant 46
|
||||
48(g_tTex2du4a): 47(ptr) Variable UniformConstant
|
||||
51: TypeSampledImage 46
|
||||
53: 6(float) Constant 1058642330
|
||||
54: 6(float) Constant 1060320051
|
||||
55: 20(fvec3) ConstantComposite 39 53 54
|
||||
58: TypeImage 6(float) Cube array sampled format:Unknown
|
||||
59: TypePointer UniformConstant 58
|
||||
60(g_tTexcdf4a): 59(ptr) Variable UniformConstant
|
||||
63: TypeSampledImage 58
|
||||
65: 7(fvec4) ConstantComposite 21 22 23 38
|
||||
68: TypeImage 25(int) Cube array sampled format:Unknown
|
||||
69: TypePointer UniformConstant 68
|
||||
70(g_tTexcdi4a): 69(ptr) Variable UniformConstant
|
||||
73: TypeSampledImage 68
|
||||
75: 7(fvec4) ConstantComposite 38 39 53 54
|
||||
78: TypeImage 42(int) Cube array sampled format:Unknown
|
||||
79: TypePointer UniformConstant 78
|
||||
80(g_tTexcdu4a): 79(ptr) Variable UniformConstant
|
||||
83: TypeSampledImage 78
|
||||
85: 6(float) Constant 1061997773
|
||||
86: 6(float) Constant 1063675494
|
||||
87: 6(float) Constant 1065353216
|
||||
88: 7(fvec4) ConstantComposite 54 85 86 87
|
||||
90(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
|
||||
91: TypePointer Function 90(PS_OUTPUT)
|
||||
93: 25(int) Constant 1
|
||||
94: TypePointer Function 6(float)
|
||||
98: TypeImage 6(float) 1D array sampled format:Unknown
|
||||
99: TypePointer UniformConstant 98
|
||||
100(g_tTex1df4a): 99(ptr) Variable UniformConstant
|
||||
101(g_tTex1df4): 99(ptr) Variable UniformConstant
|
||||
102: TypeImage 25(int) 1D array sampled format:Unknown
|
||||
103: TypePointer UniformConstant 102
|
||||
104(g_tTex1di4a): 103(ptr) Variable UniformConstant
|
||||
105: TypeImage 42(int) 1D array sampled format:Unknown
|
||||
106: TypePointer UniformConstant 105
|
||||
107(g_tTex1du4a): 106(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval20): 8(ptr) Variable Function
|
||||
30(txval21): 29(ptr) Variable Function
|
||||
45(txval22): 44(ptr) Variable Function
|
||||
57(txval40): 8(ptr) Variable Function
|
||||
67(txval41): 29(ptr) Variable Function
|
||||
77(txval42): 44(ptr) Variable Function
|
||||
92(psout): 91(ptr) Variable Function
|
||||
13: 10 Load 12(g_tTex2df4a)
|
||||
17: 14 Load 16(g_sSamp)
|
||||
19: 18 SampledImage 13 17
|
||||
27: 7(fvec4) ImageGather 19 24 26
|
||||
Store 9(txval20) 27
|
||||
34: 31 Load 33(g_tTex2di4a)
|
||||
35: 14 Load 16(g_sSamp)
|
||||
37: 36 SampledImage 34 35
|
||||
41: 28(ivec4) ImageGather 37 40 26
|
||||
Store 30(txval21) 41
|
||||
49: 46 Load 48(g_tTex2du4a)
|
||||
50: 14 Load 16(g_sSamp)
|
||||
52: 51 SampledImage 49 50
|
||||
56: 43(ivec4) ImageGather 52 55 26
|
||||
Store 45(txval22) 56
|
||||
61: 58 Load 60(g_tTexcdf4a)
|
||||
62: 14 Load 16(g_sSamp)
|
||||
64: 63 SampledImage 61 62
|
||||
66: 7(fvec4) ImageGather 64 65 26
|
||||
Store 57(txval40) 66
|
||||
71: 68 Load 70(g_tTexcdi4a)
|
||||
72: 14 Load 16(g_sSamp)
|
||||
74: 73 SampledImage 71 72
|
||||
76: 28(ivec4) ImageGather 74 75 26
|
||||
Store 67(txval41) 76
|
||||
81: 78 Load 80(g_tTexcdu4a)
|
||||
82: 14 Load 16(g_sSamp)
|
||||
84: 83 SampledImage 81 82
|
||||
89: 43(ivec4) ImageGather 84 88 26
|
||||
Store 77(txval42) 89
|
||||
95: 94(ptr) AccessChain 92(psout) 93
|
||||
Store 95 87
|
||||
96:90(PS_OUTPUT) Load 92(psout)
|
||||
ReturnValue 96
|
||||
FunctionEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue