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
|
|
@ -110,12 +110,12 @@ gl_FragCoord origin is upper left
|
|||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 53
|
||||
// Id's are bound by 59
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 51
|
||||
EntryPoint Fragment 4 "main" 57
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
|
|
@ -125,25 +125,27 @@ gl_FragCoord origin is upper left
|
|||
Name 16 "s.tex"
|
||||
Name 20 "@main("
|
||||
Name 35 "os.ss"
|
||||
Name 36 "gss2"
|
||||
Name 38 "gss"
|
||||
Name 40 "os.tex"
|
||||
Name 41 "gtex"
|
||||
Name 43 "os.a"
|
||||
Name 45 "param"
|
||||
Name 51 "@entryPointOutput"
|
||||
Decorate 36(gss2) DescriptorSet 0
|
||||
Decorate 38(gss) DescriptorSet 0
|
||||
Decorate 41(gtex) DescriptorSet 0
|
||||
Decorate 51(@entryPointOutput) Location 0
|
||||
Name 37 "gss2"
|
||||
Name 39 "gss"
|
||||
Name 41 "os.tex"
|
||||
Name 43 "gtex"
|
||||
Name 45 "os.a"
|
||||
Name 47 "param"
|
||||
Name 49 "param"
|
||||
Name 51 "param"
|
||||
Name 57 "@entryPointOutput"
|
||||
Decorate 37(gss2) DescriptorSet 0
|
||||
Decorate 39(gss) DescriptorSet 0
|
||||
Decorate 43(gtex) DescriptorSet 0
|
||||
Decorate 57(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeSampler
|
||||
7: TypePointer UniformConstant 6
|
||||
7: TypePointer Function 6
|
||||
8: TypeFloat 32
|
||||
9: TypePointer Function 8(float)
|
||||
10: TypeImage 8(float) 2D sampled format:Unknown
|
||||
11: TypePointer UniformConstant 10
|
||||
11: TypePointer Function 10
|
||||
12: TypeVector 8(float) 4
|
||||
13: TypeFunction 12(fvec4) 7(ptr) 9(ptr) 11(ptr)
|
||||
19: TypeFunction 12(fvec4)
|
||||
|
|
@ -152,18 +154,18 @@ gl_FragCoord origin is upper left
|
|||
28: 8(float) Constant 1045220557
|
||||
29: 8(float) Constant 1050253722
|
||||
30: 27(fvec2) ConstantComposite 28 29
|
||||
35(os.ss): 7(ptr) Variable UniformConstant
|
||||
36(gss2): 7(ptr) Variable UniformConstant
|
||||
38(gss): 7(ptr) Variable UniformConstant
|
||||
40(os.tex): 11(ptr) Variable UniformConstant
|
||||
41(gtex): 11(ptr) Variable UniformConstant
|
||||
44: 8(float) Constant 1077936128
|
||||
50: TypePointer Output 12(fvec4)
|
||||
51(@entryPointOutput): 50(ptr) Variable Output
|
||||
36: TypePointer UniformConstant 6
|
||||
37(gss2): 36(ptr) Variable UniformConstant
|
||||
39(gss): 36(ptr) Variable UniformConstant
|
||||
42: TypePointer UniformConstant 10
|
||||
43(gtex): 42(ptr) Variable UniformConstant
|
||||
46: 8(float) Constant 1077936128
|
||||
56: TypePointer Output 12(fvec4)
|
||||
57(@entryPointOutput): 56(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
52: 12(fvec4) FunctionCall 20(@main()
|
||||
Store 51(@entryPointOutput) 52
|
||||
58: 12(fvec4) FunctionCall 20(@main()
|
||||
Store 57(@entryPointOutput) 58
|
||||
Return
|
||||
FunctionEnd
|
||||
17(osCall(struct-OS-p1-f1-t211;): 12(fvec4) Function None 13
|
||||
|
|
@ -181,17 +183,25 @@ gl_FragCoord origin is upper left
|
|||
FunctionEnd
|
||||
20(@main(): 12(fvec4) Function None 19
|
||||
21: Label
|
||||
43(os.a): 9(ptr) Variable Function
|
||||
45(param): 9(ptr) Variable Function
|
||||
37: 6 Load 36(gss2)
|
||||
Store 35(os.ss) 37
|
||||
39: 6 Load 38(gss)
|
||||
Store 35(os.ss) 39
|
||||
42: 10 Load 41(gtex)
|
||||
Store 40(os.tex) 42
|
||||
Store 43(os.a) 44
|
||||
46: 8(float) Load 43(os.a)
|
||||
Store 45(param) 46
|
||||
47: 12(fvec4) FunctionCall 17(osCall(struct-OS-p1-f1-t211;) 35(os.ss) 45(param) 40(os.tex)
|
||||
ReturnValue 47
|
||||
35(os.ss): 7(ptr) Variable Function
|
||||
41(os.tex): 11(ptr) Variable Function
|
||||
45(os.a): 9(ptr) Variable Function
|
||||
47(param): 7(ptr) Variable Function
|
||||
49(param): 9(ptr) Variable Function
|
||||
51(param): 11(ptr) Variable Function
|
||||
38: 6 Load 37(gss2)
|
||||
Store 35(os.ss) 38
|
||||
40: 6 Load 39(gss)
|
||||
Store 35(os.ss) 40
|
||||
44: 10 Load 43(gtex)
|
||||
Store 41(os.tex) 44
|
||||
Store 45(os.a) 46
|
||||
48: 6 Load 35(os.ss)
|
||||
Store 47(param) 48
|
||||
50: 8(float) Load 45(os.a)
|
||||
Store 49(param) 50
|
||||
52: 10 Load 41(os.tex)
|
||||
Store 51(param) 52
|
||||
53: 12(fvec4) FunctionCall 17(osCall(struct-OS-p1-f1-t211;) 47(param) 49(param) 51(param)
|
||||
ReturnValue 53
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue