HLSL: Emulate write-to-output on return-from-entry-point, for return value.
This fixes issue #487 and #480. It also correctly handles output parameters from the entry point.
This commit is contained in:
parent
81cd764b5f
commit
6a70eb7161
91 changed files with 5158 additions and 4130 deletions
|
|
@ -9,22 +9,25 @@ gl_FragCoord origin is upper left
|
|||
0:7 'a3' (in int)
|
||||
0:7 'a4' (in int)
|
||||
0:? Sequence
|
||||
0:8 Branch: Return with expression
|
||||
0:8 add (temp int)
|
||||
0:8 left-shift (temp int)
|
||||
0:8 add (temp int)
|
||||
0:8 component-wise multiply (temp int)
|
||||
0:8 'a1' (in int)
|
||||
0:8 'a2' (in int)
|
||||
0:8 'a3' (in int)
|
||||
0:8 'a4' (in int)
|
||||
0:8 left-shift (temp int)
|
||||
0:8 'a1' (in int)
|
||||
0:8 add (temp int)
|
||||
0:8 'a2' (in int)
|
||||
0:8 component-wise multiply (temp int)
|
||||
0:8 Sequence
|
||||
0:8 move second child to first child (temp int)
|
||||
0:? '@entryPointOutput' (out int)
|
||||
0:8 add (temp int)
|
||||
0:8 left-shift (temp int)
|
||||
0:8 add (temp int)
|
||||
0:8 component-wise multiply (temp int)
|
||||
0:8 'a1' (in int)
|
||||
0:8 'a2' (in int)
|
||||
0:8 'a3' (in int)
|
||||
0:8 'a4' (in int)
|
||||
0:8 'a4' (in int)
|
||||
0:8 left-shift (temp int)
|
||||
0:8 'a1' (in int)
|
||||
0:8 add (temp int)
|
||||
0:8 'a2' (in int)
|
||||
0:8 component-wise multiply (temp int)
|
||||
0:8 'a3' (in int)
|
||||
0:8 'a4' (in int)
|
||||
0:8 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
||||
|
||||
|
|
@ -41,62 +44,69 @@ gl_FragCoord origin is upper left
|
|||
0:7 'a3' (in int)
|
||||
0:7 'a4' (in int)
|
||||
0:? Sequence
|
||||
0:8 Branch: Return with expression
|
||||
0:8 add (temp int)
|
||||
0:8 left-shift (temp int)
|
||||
0:8 add (temp int)
|
||||
0:8 component-wise multiply (temp int)
|
||||
0:8 'a1' (in int)
|
||||
0:8 'a2' (in int)
|
||||
0:8 'a3' (in int)
|
||||
0:8 'a4' (in int)
|
||||
0:8 left-shift (temp int)
|
||||
0:8 'a1' (in int)
|
||||
0:8 add (temp int)
|
||||
0:8 'a2' (in int)
|
||||
0:8 component-wise multiply (temp int)
|
||||
0:8 Sequence
|
||||
0:8 move second child to first child (temp int)
|
||||
0:? '@entryPointOutput' (out int)
|
||||
0:8 add (temp int)
|
||||
0:8 left-shift (temp int)
|
||||
0:8 add (temp int)
|
||||
0:8 component-wise multiply (temp int)
|
||||
0:8 'a1' (in int)
|
||||
0:8 'a2' (in int)
|
||||
0:8 'a3' (in int)
|
||||
0:8 'a4' (in int)
|
||||
0:8 'a4' (in int)
|
||||
0:8 left-shift (temp int)
|
||||
0:8 'a1' (in int)
|
||||
0:8 add (temp int)
|
||||
0:8 'a2' (in int)
|
||||
0:8 component-wise multiply (temp int)
|
||||
0:8 'a3' (in int)
|
||||
0:8 'a4' (in int)
|
||||
0:8 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 28
|
||||
// Id's are bound by 30
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 8 10 13 16
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 8 10 12 15 18
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "PixelShaderFunction"
|
||||
Name 8 "a1"
|
||||
Name 10 "a2"
|
||||
Name 13 "a3"
|
||||
Name 16 "a4"
|
||||
Name 8 "@entryPointOutput"
|
||||
Name 10 "a1"
|
||||
Name 12 "a2"
|
||||
Name 15 "a3"
|
||||
Name 18 "a4"
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
7: TypePointer Input 6(int)
|
||||
8(a1): 7(ptr) Variable Input
|
||||
10(a2): 7(ptr) Variable Input
|
||||
13(a3): 7(ptr) Variable Input
|
||||
16(a4): 7(ptr) Variable Input
|
||||
7: TypePointer Output 6(int)
|
||||
8(@entryPointOutput): 7(ptr) Variable Output
|
||||
9: TypePointer Input 6(int)
|
||||
10(a1): 9(ptr) Variable Input
|
||||
12(a2): 9(ptr) Variable Input
|
||||
15(a3): 9(ptr) Variable Input
|
||||
18(a4): 9(ptr) Variable Input
|
||||
4(PixelShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
9: 6(int) Load 8(a1)
|
||||
11: 6(int) Load 10(a2)
|
||||
12: 6(int) IMul 9 11
|
||||
14: 6(int) Load 13(a3)
|
||||
15: 6(int) IAdd 12 14
|
||||
17: 6(int) Load 16(a4)
|
||||
18: 6(int) ShiftLeftLogical 15 17
|
||||
19: 6(int) Load 8(a1)
|
||||
20: 6(int) Load 10(a2)
|
||||
21: 6(int) Load 13(a3)
|
||||
22: 6(int) Load 16(a4)
|
||||
23: 6(int) IMul 21 22
|
||||
24: 6(int) IAdd 20 23
|
||||
25: 6(int) ShiftLeftLogical 19 24
|
||||
26: 6(int) IAdd 18 25
|
||||
ReturnValue 26
|
||||
11: 6(int) Load 10(a1)
|
||||
13: 6(int) Load 12(a2)
|
||||
14: 6(int) IMul 11 13
|
||||
16: 6(int) Load 15(a3)
|
||||
17: 6(int) IAdd 14 16
|
||||
19: 6(int) Load 18(a4)
|
||||
20: 6(int) ShiftLeftLogical 17 19
|
||||
21: 6(int) Load 10(a1)
|
||||
22: 6(int) Load 12(a2)
|
||||
23: 6(int) Load 15(a3)
|
||||
24: 6(int) Load 18(a4)
|
||||
25: 6(int) IMul 23 24
|
||||
26: 6(int) IAdd 22 25
|
||||
27: 6(int) ShiftLeftLogical 21 26
|
||||
28: 6(int) IAdd 20 27
|
||||
Store 8(@entryPointOutput) 28
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue