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:
parent
15fa7ef5f5
commit
bed4e4f7e4
12 changed files with 976 additions and 841 deletions
|
|
@ -130,12 +130,12 @@ Shader version: 500
|
|||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 65
|
||||
// Id's are bound by 70
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 63
|
||||
EntryPoint Vertex 4 "main" 68
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 17 "lookUp(struct-FxaaTex-p1-t21-f11;"
|
||||
|
|
@ -148,23 +148,25 @@ Shader version: 500
|
|||
MemberName 34(FxaaTex) 1 "tex"
|
||||
MemberName 34(FxaaTex) 2 "f"
|
||||
Name 36 "flattenTemp"
|
||||
Name 37 "g_tInputTexture_sampler"
|
||||
Name 39 "g_tInputTexture"
|
||||
Name 43 "tex.smpl"
|
||||
Name 48 "tex.tex"
|
||||
Name 52 "tex.f"
|
||||
Name 57 "param"
|
||||
Name 63 "@entryPointOutput"
|
||||
Decorate 37(g_tInputTexture_sampler) DescriptorSet 0
|
||||
Decorate 39(g_tInputTexture) DescriptorSet 0
|
||||
Decorate 63(@entryPointOutput) Location 0
|
||||
Name 38 "g_tInputTexture_sampler"
|
||||
Name 41 "g_tInputTexture"
|
||||
Name 45 "tex.smpl"
|
||||
Name 50 "tex.tex"
|
||||
Name 54 "tex.f"
|
||||
Name 58 "param"
|
||||
Name 60 "param"
|
||||
Name 62 "param"
|
||||
Name 68 "@entryPointOutput"
|
||||
Decorate 38(g_tInputTexture_sampler) DescriptorSet 0
|
||||
Decorate 41(g_tInputTexture) DescriptorSet 0
|
||||
Decorate 68(@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: TypePointer Function 8(float)
|
||||
12: TypeVector 8(float) 4
|
||||
13: TypeFunction 12(fvec4) 7(ptr) 10(ptr) 11(ptr)
|
||||
|
|
@ -173,24 +175,22 @@ Shader version: 500
|
|||
28: TypeVector 8(float) 2
|
||||
30: 8(float) Constant 0
|
||||
34(FxaaTex): TypeStruct 6 9 8(float)
|
||||
35: TypePointer UniformConstant 34(FxaaTex)
|
||||
36(flattenTemp): 35(ptr) Variable UniformConstant
|
||||
37(g_tInputTexture_sampler): 7(ptr) Variable UniformConstant
|
||||
39(g_tInputTexture): 10(ptr) Variable UniformConstant
|
||||
41: 8(float) Constant 1056964608
|
||||
43(tex.smpl): 7(ptr) Variable UniformConstant
|
||||
44: TypeInt 32 1
|
||||
45: 44(int) Constant 0
|
||||
48(tex.tex): 10(ptr) Variable UniformConstant
|
||||
49: 44(int) Constant 1
|
||||
53: 44(int) Constant 2
|
||||
54: TypePointer UniformConstant 8(float)
|
||||
62: TypePointer Output 12(fvec4)
|
||||
63(@entryPointOutput): 62(ptr) Variable Output
|
||||
35: TypePointer Function 34(FxaaTex)
|
||||
37: TypePointer UniformConstant 6
|
||||
38(g_tInputTexture_sampler): 37(ptr) Variable UniformConstant
|
||||
40: TypePointer UniformConstant 9
|
||||
41(g_tInputTexture): 40(ptr) Variable UniformConstant
|
||||
43: 8(float) Constant 1056964608
|
||||
46: TypeInt 32 1
|
||||
47: 46(int) Constant 0
|
||||
51: 46(int) Constant 1
|
||||
55: 46(int) Constant 2
|
||||
67: TypePointer Output 12(fvec4)
|
||||
68(@entryPointOutput): 67(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
64: 12(fvec4) FunctionCall 20(@main()
|
||||
Store 63(@entryPointOutput) 64
|
||||
69: 12(fvec4) FunctionCall 20(@main()
|
||||
Store 68(@entryPointOutput) 69
|
||||
Return
|
||||
FunctionEnd
|
||||
17(lookUp(struct-FxaaTex-p1-t21-f11;): 12(fvec4) Function None 13
|
||||
|
|
@ -209,23 +209,32 @@ Shader version: 500
|
|||
FunctionEnd
|
||||
20(@main(): 12(fvec4) Function None 19
|
||||
21: Label
|
||||
52(tex.f): 11(ptr) Variable Function
|
||||
57(param): 11(ptr) Variable Function
|
||||
38: 6 Load 37(g_tInputTexture_sampler)
|
||||
40: 9 Load 39(g_tInputTexture)
|
||||
42: 34(FxaaTex) CompositeConstruct 38 40 41
|
||||
Store 36(flattenTemp) 42
|
||||
46: 7(ptr) AccessChain 36(flattenTemp) 45
|
||||
47: 6 Load 46
|
||||
Store 43(tex.smpl) 47
|
||||
50: 10(ptr) AccessChain 36(flattenTemp) 49
|
||||
51: 9 Load 50
|
||||
Store 48(tex.tex) 51
|
||||
55: 54(ptr) AccessChain 36(flattenTemp) 53
|
||||
56: 8(float) Load 55
|
||||
Store 52(tex.f) 56
|
||||
58: 8(float) Load 52(tex.f)
|
||||
Store 57(param) 58
|
||||
59: 12(fvec4) FunctionCall 17(lookUp(struct-FxaaTex-p1-t21-f11;) 43(tex.smpl) 48(tex.tex) 57(param)
|
||||
ReturnValue 59
|
||||
36(flattenTemp): 35(ptr) Variable Function
|
||||
45(tex.smpl): 7(ptr) Variable Function
|
||||
50(tex.tex): 10(ptr) Variable Function
|
||||
54(tex.f): 11(ptr) Variable Function
|
||||
58(param): 7(ptr) Variable Function
|
||||
60(param): 10(ptr) Variable Function
|
||||
62(param): 11(ptr) Variable Function
|
||||
39: 6 Load 38(g_tInputTexture_sampler)
|
||||
42: 9 Load 41(g_tInputTexture)
|
||||
44: 34(FxaaTex) CompositeConstruct 39 42 43
|
||||
Store 36(flattenTemp) 44
|
||||
48: 7(ptr) AccessChain 36(flattenTemp) 47
|
||||
49: 6 Load 48
|
||||
Store 45(tex.smpl) 49
|
||||
52: 10(ptr) AccessChain 36(flattenTemp) 51
|
||||
53: 9 Load 52
|
||||
Store 50(tex.tex) 53
|
||||
56: 11(ptr) AccessChain 36(flattenTemp) 55
|
||||
57: 8(float) Load 56
|
||||
Store 54(tex.f) 57
|
||||
59: 6 Load 45(tex.smpl)
|
||||
Store 58(param) 59
|
||||
61: 9 Load 50(tex.tex)
|
||||
Store 60(param) 61
|
||||
63: 8(float) Load 54(tex.f)
|
||||
Store 62(param) 63
|
||||
64: 12(fvec4) FunctionCall 17(lookUp(struct-FxaaTex-p1-t21-f11;) 58(param) 60(param) 62(param)
|
||||
ReturnValue 64
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue