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
|
|
@ -59,7 +59,7 @@ gl_FragCoord origin is upper left
|
|||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 26
|
||||
// Id's are bound by 27
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
|
|
@ -68,44 +68,45 @@ gl_FragCoord origin is upper left
|
|||
ExecutionMode 4 OriginUpperLeft
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 14 "TexFunc(t21;vf3;"
|
||||
Name 12 "t2D"
|
||||
Name 13 "RGB"
|
||||
Name 16 "@main("
|
||||
Name 13 "TexFunc(t21;vf3;"
|
||||
Name 11 "t2D"
|
||||
Name 12 "RGB"
|
||||
Name 15 "@main("
|
||||
Name 20 "MyTexture"
|
||||
Name 21 "final_RGB"
|
||||
Name 22 "param"
|
||||
Name 22 "final_RGB"
|
||||
Name 23 "param"
|
||||
Decorate 20(MyTexture) DescriptorSet 0
|
||||
Decorate 20(MyTexture) Binding 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeImage 6(float) 2D sampled format:Unknown
|
||||
8: TypePointer UniformConstant 7
|
||||
9: TypeVector 6(float) 3
|
||||
10: TypePointer Function 9(fvec3)
|
||||
11: TypeFunction 2 8(ptr) 10(ptr)
|
||||
18: 6(float) Constant 0
|
||||
19: 9(fvec3) ConstantComposite 18 18 18
|
||||
20(MyTexture): 8(ptr) Variable UniformConstant
|
||||
8: TypeVector 6(float) 3
|
||||
9: TypePointer Function 8(fvec3)
|
||||
10: TypeFunction 2 7 9(ptr)
|
||||
17: 6(float) Constant 0
|
||||
18: 8(fvec3) ConstantComposite 17 17 17
|
||||
19: TypePointer UniformConstant 7
|
||||
20(MyTexture): 19(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
25: 2 FunctionCall 16(@main()
|
||||
26: 2 FunctionCall 15(@main()
|
||||
Return
|
||||
FunctionEnd
|
||||
14(TexFunc(t21;vf3;): 2 Function None 11
|
||||
12(t2D): 8(ptr) FunctionParameter
|
||||
13(RGB): 10(ptr) FunctionParameter
|
||||
15: Label
|
||||
Store 13(RGB) 19
|
||||
13(TexFunc(t21;vf3;): 2 Function None 10
|
||||
11(t2D): 7 FunctionParameter
|
||||
12(RGB): 9(ptr) FunctionParameter
|
||||
14: Label
|
||||
Store 12(RGB) 18
|
||||
Return
|
||||
FunctionEnd
|
||||
16(@main(): 2 Function None 3
|
||||
17: Label
|
||||
21(final_RGB): 10(ptr) Variable Function
|
||||
22(param): 10(ptr) Variable Function
|
||||
23: 2 FunctionCall 14(TexFunc(t21;vf3;) 20(MyTexture) 22(param)
|
||||
24: 9(fvec3) Load 22(param)
|
||||
Store 21(final_RGB) 24
|
||||
15(@main(): 2 Function None 3
|
||||
16: Label
|
||||
22(final_RGB): 9(ptr) Variable Function
|
||||
23(param): 9(ptr) Variable Function
|
||||
21: 7 Load 20(MyTexture)
|
||||
24: 2 FunctionCall 13(TexFunc(t21;vf3;) 21 23(param)
|
||||
25: 8(fvec3) Load 23(param)
|
||||
Store 22(final_RGB) 25
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue