HLSL: Pass opaques by local copy, instead of by interface original.
Also, remove assumption that if something is opaque that it must be in the UniformConstant storage class. This allows function declarations to know all parameters will be in the Function storage class.
This commit is contained in:
@@ -166,12 +166,12 @@ Shader version: 500
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 74
|
||||
// Id's are bound by 80
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 72
|
||||
EntryPoint Vertex 4 "main" 78
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 15 "lookUp(struct-FxaaTex-p1-t211;"
|
||||
@@ -183,27 +183,29 @@ Shader version: 500
|
||||
Name 19 "fillOpaque("
|
||||
Name 22 "@main("
|
||||
Name 36 "t.smpl"
|
||||
Name 37 "g_tInputTexture_sampler"
|
||||
Name 39 "t.tex"
|
||||
Name 40 "g_tInputTexture"
|
||||
Name 43 "t"
|
||||
Name 47 "flattenTemp"
|
||||
Name 51 "tex1.smpl"
|
||||
Name 56 "tex1.tex"
|
||||
Name 60 "flattenTemp"
|
||||
Name 62 "tex2.smpl"
|
||||
Name 65 "tex2.tex"
|
||||
Name 72 "@entryPointOutput"
|
||||
Decorate 37(g_tInputTexture_sampler) DescriptorSet 0
|
||||
Decorate 40(g_tInputTexture) DescriptorSet 0
|
||||
Decorate 72(@entryPointOutput) Location 0
|
||||
Name 38 "g_tInputTexture_sampler"
|
||||
Name 40 "t.tex"
|
||||
Name 42 "g_tInputTexture"
|
||||
Name 45 "t"
|
||||
Name 49 "flattenTemp"
|
||||
Name 53 "tex1.smpl"
|
||||
Name 58 "tex1.tex"
|
||||
Name 62 "flattenTemp"
|
||||
Name 64 "tex2.smpl"
|
||||
Name 67 "tex2.tex"
|
||||
Name 70 "param"
|
||||
Name 72 "param"
|
||||
Name 78 "@entryPointOutput"
|
||||
Decorate 38(g_tInputTexture_sampler) DescriptorSet 0
|
||||
Decorate 42(g_tInputTexture) DescriptorSet 0
|
||||
Decorate 78(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeSampler
|
||||
7: TypePointer UniformConstant 6
|
||||
7: TypePointer Function 6
|
||||
8: TypeFloat 32
|
||||
9: TypeImage 8(float) 2D sampled format:Unknown
|
||||
10: TypePointer UniformConstant 9
|
||||
10: TypePointer Function 9
|
||||
11: TypeVector 8(float) 4
|
||||
12: TypeFunction 11(fvec4) 7(ptr) 10(ptr)
|
||||
17(FxaaTex): TypeStruct 6 9
|
||||
@@ -215,27 +217,20 @@ Shader version: 500
|
||||
30: 8(float) Constant 1053609165
|
||||
31: 28(fvec2) ConstantComposite 29 30
|
||||
32: 8(float) Constant 0
|
||||
36(t.smpl): 7(ptr) Variable UniformConstant
|
||||
37(g_tInputTexture_sampler): 7(ptr) Variable UniformConstant
|
||||
39(t.tex): 10(ptr) Variable UniformConstant
|
||||
40(g_tInputTexture): 10(ptr) Variable UniformConstant
|
||||
42: TypePointer UniformConstant 17(FxaaTex)
|
||||
43(t): 42(ptr) Variable UniformConstant
|
||||
47(flattenTemp): 42(ptr) Variable UniformConstant
|
||||
51(tex1.smpl): 7(ptr) Variable UniformConstant
|
||||
52: TypeInt 32 1
|
||||
53: 52(int) Constant 0
|
||||
56(tex1.tex): 10(ptr) Variable UniformConstant
|
||||
57: 52(int) Constant 1
|
||||
60(flattenTemp): 42(ptr) Variable UniformConstant
|
||||
62(tex2.smpl): 7(ptr) Variable UniformConstant
|
||||
65(tex2.tex): 10(ptr) Variable UniformConstant
|
||||
71: TypePointer Output 11(fvec4)
|
||||
72(@entryPointOutput): 71(ptr) Variable Output
|
||||
37: TypePointer UniformConstant 6
|
||||
38(g_tInputTexture_sampler): 37(ptr) Variable UniformConstant
|
||||
41: TypePointer UniformConstant 9
|
||||
42(g_tInputTexture): 41(ptr) Variable UniformConstant
|
||||
44: TypePointer Function 17(FxaaTex)
|
||||
54: TypeInt 32 1
|
||||
55: 54(int) Constant 0
|
||||
59: 54(int) Constant 1
|
||||
77: TypePointer Output 11(fvec4)
|
||||
78(@entryPointOutput): 77(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
73: 11(fvec4) FunctionCall 22(@main()
|
||||
Store 72(@entryPointOutput) 73
|
||||
79: 11(fvec4) FunctionCall 22(@main()
|
||||
Store 78(@entryPointOutput) 79
|
||||
Return
|
||||
FunctionEnd
|
||||
15(lookUp(struct-FxaaTex-p1-t211;): 11(fvec4) Function None 12
|
||||
@@ -250,33 +245,48 @@ Shader version: 500
|
||||
FunctionEnd
|
||||
19(fillOpaque(): 17(FxaaTex) Function None 18
|
||||
20: Label
|
||||
38: 6 Load 37(g_tInputTexture_sampler)
|
||||
Store 36(t.smpl) 38
|
||||
41: 9 Load 40(g_tInputTexture)
|
||||
Store 39(t.tex) 41
|
||||
44: 17(FxaaTex) Load 43(t)
|
||||
ReturnValue 44
|
||||
36(t.smpl): 7(ptr) Variable Function
|
||||
40(t.tex): 10(ptr) Variable Function
|
||||
45(t): 44(ptr) Variable Function
|
||||
39: 6 Load 38(g_tInputTexture_sampler)
|
||||
Store 36(t.smpl) 39
|
||||
43: 9 Load 42(g_tInputTexture)
|
||||
Store 40(t.tex) 43
|
||||
46: 17(FxaaTex) Load 45(t)
|
||||
ReturnValue 46
|
||||
FunctionEnd
|
||||
22(@main(): 11(fvec4) Function None 21
|
||||
23: Label
|
||||
48: 6 Load 37(g_tInputTexture_sampler)
|
||||
49: 9 Load 40(g_tInputTexture)
|
||||
50: 17(FxaaTex) CompositeConstruct 48 49
|
||||
Store 47(flattenTemp) 50
|
||||
54: 7(ptr) AccessChain 47(flattenTemp) 53
|
||||
55: 6 Load 54
|
||||
Store 51(tex1.smpl) 55
|
||||
58: 10(ptr) AccessChain 47(flattenTemp) 57
|
||||
59: 9 Load 58
|
||||
Store 56(tex1.tex) 59
|
||||
61: 17(FxaaTex) FunctionCall 19(fillOpaque()
|
||||
Store 60(flattenTemp) 61
|
||||
63: 7(ptr) AccessChain 60(flattenTemp) 53
|
||||
64: 6 Load 63
|
||||
Store 62(tex2.smpl) 64
|
||||
66: 10(ptr) AccessChain 60(flattenTemp) 57
|
||||
67: 9 Load 66
|
||||
Store 65(tex2.tex) 67
|
||||
68: 11(fvec4) FunctionCall 15(lookUp(struct-FxaaTex-p1-t211;) 51(tex1.smpl) 56(tex1.tex)
|
||||
ReturnValue 68
|
||||
49(flattenTemp): 44(ptr) Variable Function
|
||||
53(tex1.smpl): 7(ptr) Variable Function
|
||||
58(tex1.tex): 10(ptr) Variable Function
|
||||
62(flattenTemp): 44(ptr) Variable Function
|
||||
64(tex2.smpl): 7(ptr) Variable Function
|
||||
67(tex2.tex): 10(ptr) Variable Function
|
||||
70(param): 7(ptr) Variable Function
|
||||
72(param): 10(ptr) Variable Function
|
||||
50: 6 Load 38(g_tInputTexture_sampler)
|
||||
51: 9 Load 42(g_tInputTexture)
|
||||
52: 17(FxaaTex) CompositeConstruct 50 51
|
||||
Store 49(flattenTemp) 52
|
||||
56: 7(ptr) AccessChain 49(flattenTemp) 55
|
||||
57: 6 Load 56
|
||||
Store 53(tex1.smpl) 57
|
||||
60: 10(ptr) AccessChain 49(flattenTemp) 59
|
||||
61: 9 Load 60
|
||||
Store 58(tex1.tex) 61
|
||||
63: 17(FxaaTex) FunctionCall 19(fillOpaque()
|
||||
Store 62(flattenTemp) 63
|
||||
65: 7(ptr) AccessChain 62(flattenTemp) 55
|
||||
66: 6 Load 65
|
||||
Store 64(tex2.smpl) 66
|
||||
68: 10(ptr) AccessChain 62(flattenTemp) 59
|
||||
69: 9 Load 68
|
||||
Store 67(tex2.tex) 69
|
||||
71: 6 Load 53(tex1.smpl)
|
||||
Store 70(param) 71
|
||||
73: 9 Load 58(tex1.tex)
|
||||
Store 72(param) 73
|
||||
74: 11(fvec4) FunctionCall 15(lookUp(struct-FxaaTex-p1-t211;) 70(param) 72(param)
|
||||
ReturnValue 74
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user