Fix #980: flatten opaque initializers to use aliases.
This commit is contained in:
132
Test/baseResults/hlsl.flattenOpaqueInit.vert.out
Executable file
132
Test/baseResults/hlsl.flattenOpaqueInit.vert.out
Executable file
@@ -0,0 +1,132 @@
|
||||
hlsl.flattenOpaqueInit.vert
|
||||
Shader version: 500
|
||||
0:? Sequence
|
||||
0:5 Function Definition: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
|
||||
0:5 Function Parameters:
|
||||
0:? 'smpl' ( in sampler)
|
||||
0:? 'tex' ( in texture2D)
|
||||
0:? Sequence
|
||||
0:6 Branch: Return with expression
|
||||
0:6 texture ( temp 4-component vector of float)
|
||||
0:6 Construct combined texture-sampler ( temp sampler2D)
|
||||
0:? 'tex' ( in texture2D)
|
||||
0:? 'smpl' ( in sampler)
|
||||
0:? Constant:
|
||||
0:? 0.300000
|
||||
0:? 0.400000
|
||||
0:10 Function Definition: @main( ( temp 4-component vector of float)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:12 Branch: Return with expression
|
||||
0:12 Function Call: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
|
||||
0:? 'g_tInputTexture_sampler' ( uniform sampler)
|
||||
0:? 'g_tInputTexture' ( uniform texture2D)
|
||||
0:10 Function Definition: main( ( temp void)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:10 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:10 Function Call: @main( ( temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'g_tInputTexture_sampler' ( uniform sampler)
|
||||
0:? 'g_tInputTexture' ( uniform texture2D)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
Shader version: 500
|
||||
0:? Sequence
|
||||
0:5 Function Definition: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
|
||||
0:5 Function Parameters:
|
||||
0:? 'smpl' ( in sampler)
|
||||
0:? 'tex' ( in texture2D)
|
||||
0:? Sequence
|
||||
0:6 Branch: Return with expression
|
||||
0:6 texture ( temp 4-component vector of float)
|
||||
0:6 Construct combined texture-sampler ( temp sampler2D)
|
||||
0:? 'tex' ( in texture2D)
|
||||
0:? 'smpl' ( in sampler)
|
||||
0:? Constant:
|
||||
0:? 0.300000
|
||||
0:? 0.400000
|
||||
0:10 Function Definition: @main( ( temp 4-component vector of float)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:12 Branch: Return with expression
|
||||
0:12 Function Call: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
|
||||
0:? 'g_tInputTexture_sampler' ( uniform sampler)
|
||||
0:? 'g_tInputTexture' ( uniform texture2D)
|
||||
0:10 Function Definition: main( ( temp void)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:10 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:10 Function Call: @main( ( temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'g_tInputTexture_sampler' ( uniform sampler)
|
||||
0:? 'g_tInputTexture' ( uniform texture2D)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 40
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 38
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 15 "lookUp(struct-FxaaTex-p1-t211;"
|
||||
Name 13 "smpl"
|
||||
Name 14 "tex"
|
||||
Name 18 "@main("
|
||||
Name 32 "g_tInputTexture_sampler"
|
||||
Name 33 "g_tInputTexture"
|
||||
Name 38 "@entryPointOutput"
|
||||
Decorate 32(g_tInputTexture_sampler) DescriptorSet 0
|
||||
Decorate 33(g_tInputTexture) DescriptorSet 0
|
||||
Decorate 38(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeSampler
|
||||
7: TypePointer UniformConstant 6
|
||||
8: TypeFloat 32
|
||||
9: TypeImage 8(float) 2D sampled format:Unknown
|
||||
10: TypePointer UniformConstant 9
|
||||
11: TypeVector 8(float) 4
|
||||
12: TypeFunction 11(fvec4) 7(ptr) 10(ptr)
|
||||
17: TypeFunction 11(fvec4)
|
||||
22: TypeSampledImage 9
|
||||
24: TypeVector 8(float) 2
|
||||
25: 8(float) Constant 1050253722
|
||||
26: 8(float) Constant 1053609165
|
||||
27: 24(fvec2) ConstantComposite 25 26
|
||||
28: 8(float) Constant 0
|
||||
32(g_tInputTexture_sampler): 7(ptr) Variable UniformConstant
|
||||
33(g_tInputTexture): 10(ptr) Variable UniformConstant
|
||||
37: TypePointer Output 11(fvec4)
|
||||
38(@entryPointOutput): 37(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
39: 11(fvec4) FunctionCall 18(@main()
|
||||
Store 38(@entryPointOutput) 39
|
||||
Return
|
||||
FunctionEnd
|
||||
15(lookUp(struct-FxaaTex-p1-t211;): 11(fvec4) Function None 12
|
||||
13(smpl): 7(ptr) FunctionParameter
|
||||
14(tex): 10(ptr) FunctionParameter
|
||||
16: Label
|
||||
20: 9 Load 14(tex)
|
||||
21: 6 Load 13(smpl)
|
||||
23: 22 SampledImage 20 21
|
||||
29: 11(fvec4) ImageSampleExplicitLod 23 27 Lod 28
|
||||
ReturnValue 29
|
||||
FunctionEnd
|
||||
18(@main(): 11(fvec4) Function None 17
|
||||
19: Label
|
||||
34: 11(fvec4) FunctionCall 15(lookUp(struct-FxaaTex-p1-t211;) 32(g_tInputTexture_sampler) 33(g_tInputTexture)
|
||||
ReturnValue 34
|
||||
FunctionEnd
|
||||
159
Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out
Executable file
159
Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out
Executable file
@@ -0,0 +1,159 @@
|
||||
hlsl.flattenOpaqueInitMix.vert
|
||||
Shader version: 500
|
||||
0:? Sequence
|
||||
0:5 Function Definition: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
|
||||
0:5 Function Parameters:
|
||||
0:? 'smpl' ( in sampler)
|
||||
0:? 'tex' ( in texture2D)
|
||||
0:? 'f' ( in float)
|
||||
0:? Sequence
|
||||
0:6 Branch: Return with expression
|
||||
0:6 texture ( temp 4-component vector of float)
|
||||
0:6 Construct combined texture-sampler ( temp sampler2D)
|
||||
0:? 'tex' ( in texture2D)
|
||||
0:? 'smpl' ( in sampler)
|
||||
0:? Construct vec2 ( temp 2-component vector of float)
|
||||
0:? 'f' ( in float)
|
||||
0:? 'f' ( in float)
|
||||
0:10 Function Definition: @main( ( temp 4-component vector of float)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:11 Sequence
|
||||
0:? Sequence
|
||||
0:11 move second child to first child ( temp float)
|
||||
0:? 'f' ( temp float)
|
||||
0:11 Constant:
|
||||
0:11 0.500000
|
||||
0:12 Branch: Return with expression
|
||||
0:12 Function Call: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
|
||||
0:? 'g_tInputTexture_sampler' ( uniform sampler)
|
||||
0:? 'g_tInputTexture' ( uniform texture2D)
|
||||
0:? 'f' ( temp float)
|
||||
0:10 Function Definition: main( ( temp void)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:10 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:10 Function Call: @main( ( temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'g_tInputTexture_sampler' ( uniform sampler)
|
||||
0:? 'g_tInputTexture' ( uniform texture2D)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
Shader version: 500
|
||||
0:? Sequence
|
||||
0:5 Function Definition: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
|
||||
0:5 Function Parameters:
|
||||
0:? 'smpl' ( in sampler)
|
||||
0:? 'tex' ( in texture2D)
|
||||
0:? 'f' ( in float)
|
||||
0:? Sequence
|
||||
0:6 Branch: Return with expression
|
||||
0:6 texture ( temp 4-component vector of float)
|
||||
0:6 Construct combined texture-sampler ( temp sampler2D)
|
||||
0:? 'tex' ( in texture2D)
|
||||
0:? 'smpl' ( in sampler)
|
||||
0:? Construct vec2 ( temp 2-component vector of float)
|
||||
0:? 'f' ( in float)
|
||||
0:? 'f' ( in float)
|
||||
0:10 Function Definition: @main( ( temp 4-component vector of float)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:11 Sequence
|
||||
0:? Sequence
|
||||
0:11 move second child to first child ( temp float)
|
||||
0:? 'f' ( temp float)
|
||||
0:11 Constant:
|
||||
0:11 0.500000
|
||||
0:12 Branch: Return with expression
|
||||
0:12 Function Call: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
|
||||
0:? 'g_tInputTexture_sampler' ( uniform sampler)
|
||||
0:? 'g_tInputTexture' ( uniform texture2D)
|
||||
0:? 'f' ( temp float)
|
||||
0:10 Function Definition: main( ( temp void)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:10 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:10 Function Call: @main( ( temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'g_tInputTexture_sampler' ( uniform sampler)
|
||||
0:? 'g_tInputTexture' ( uniform texture2D)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 46
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 44
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 17 "lookUp(struct-FxaaTex-p1-t21-f11;"
|
||||
Name 14 "smpl"
|
||||
Name 15 "tex"
|
||||
Name 16 "f"
|
||||
Name 20 "@main("
|
||||
Name 34 "f"
|
||||
Name 36 "g_tInputTexture_sampler"
|
||||
Name 37 "g_tInputTexture"
|
||||
Name 38 "param"
|
||||
Name 44 "@entryPointOutput"
|
||||
Decorate 36(g_tInputTexture_sampler) DescriptorSet 0
|
||||
Decorate 37(g_tInputTexture) DescriptorSet 0
|
||||
Decorate 44(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeSampler
|
||||
7: TypePointer UniformConstant 6
|
||||
8: TypeFloat 32
|
||||
9: TypeImage 8(float) 2D sampled format:Unknown
|
||||
10: TypePointer UniformConstant 9
|
||||
11: TypePointer Function 8(float)
|
||||
12: TypeVector 8(float) 4
|
||||
13: TypeFunction 12(fvec4) 7(ptr) 10(ptr) 11(ptr)
|
||||
19: TypeFunction 12(fvec4)
|
||||
24: TypeSampledImage 9
|
||||
28: TypeVector 8(float) 2
|
||||
30: 8(float) Constant 0
|
||||
35: 8(float) Constant 1056964608
|
||||
36(g_tInputTexture_sampler): 7(ptr) Variable UniformConstant
|
||||
37(g_tInputTexture): 10(ptr) Variable UniformConstant
|
||||
43: TypePointer Output 12(fvec4)
|
||||
44(@entryPointOutput): 43(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
45: 12(fvec4) FunctionCall 20(@main()
|
||||
Store 44(@entryPointOutput) 45
|
||||
Return
|
||||
FunctionEnd
|
||||
17(lookUp(struct-FxaaTex-p1-t21-f11;): 12(fvec4) Function None 13
|
||||
14(smpl): 7(ptr) FunctionParameter
|
||||
15(tex): 10(ptr) FunctionParameter
|
||||
16(f): 11(ptr) FunctionParameter
|
||||
18: Label
|
||||
22: 9 Load 15(tex)
|
||||
23: 6 Load 14(smpl)
|
||||
25: 24 SampledImage 22 23
|
||||
26: 8(float) Load 16(f)
|
||||
27: 8(float) Load 16(f)
|
||||
29: 28(fvec2) CompositeConstruct 26 27
|
||||
31: 12(fvec4) ImageSampleExplicitLod 25 29 Lod 30
|
||||
ReturnValue 31
|
||||
FunctionEnd
|
||||
20(@main(): 12(fvec4) Function None 19
|
||||
21: Label
|
||||
34(f): 11(ptr) Variable Function
|
||||
38(param): 11(ptr) Variable Function
|
||||
Store 34(f) 35
|
||||
39: 8(float) Load 34(f)
|
||||
Store 38(param) 39
|
||||
40: 12(fvec4) FunctionCall 17(lookUp(struct-FxaaTex-p1-t21-f11;) 36(g_tInputTexture_sampler) 37(g_tInputTexture) 38(param)
|
||||
ReturnValue 40
|
||||
FunctionEnd
|
||||
Reference in New Issue
Block a user