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:
@@ -22,8 +22,11 @@ gl_FragCoord origin is upper left
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 Loop Body
|
||||
0:5 Branch: Return with expression
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 Sequence
|
||||
0:5 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (out 4-component vector of float)
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
||||
|
||||
@@ -53,30 +56,36 @@ gl_FragCoord origin is upper left
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 Loop Body
|
||||
0:5 Branch: Return with expression
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 Sequence
|
||||
0:5 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (out 4-component vector of float)
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 31
|
||||
// Id's are bound by 33
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 23
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 23 25
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "PixelShaderFunction"
|
||||
Name 23 "input"
|
||||
Name 23 "@entryPointOutput"
|
||||
Name 25 "input"
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
10: TypeBool
|
||||
11: 10(bool) ConstantFalse
|
||||
20: TypeFloat 32
|
||||
21: TypeVector 20(float) 4
|
||||
22: TypePointer Input 21(fvec4)
|
||||
23(input): 22(ptr) Variable Input
|
||||
28: TypeVector 10(bool) 4
|
||||
22: TypePointer Output 21(fvec4)
|
||||
23(@entryPointOutput): 22(ptr) Variable Output
|
||||
24: TypePointer Input 21(fvec4)
|
||||
25(input): 24(ptr) Variable Input
|
||||
30: TypeVector 10(bool) 4
|
||||
4(PixelShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
Branch 6
|
||||
@@ -102,14 +111,15 @@ gl_FragCoord origin is upper left
|
||||
LoopMerge 18 19 None
|
||||
Branch 17
|
||||
17: Label
|
||||
24: 21(fvec4) Load 23(input)
|
||||
ReturnValue 24
|
||||
26: 21(fvec4) Load 25(input)
|
||||
Store 23(@entryPointOutput) 26
|
||||
Return
|
||||
19: Label
|
||||
26: 21(fvec4) Load 23(input)
|
||||
27: 21(fvec4) Load 23(input)
|
||||
29: 28(bvec4) FOrdEqual 26 27
|
||||
30: 10(bool) All 29
|
||||
BranchConditional 30 16 18
|
||||
28: 21(fvec4) Load 25(input)
|
||||
29: 21(fvec4) Load 25(input)
|
||||
31: 30(bvec4) FOrdEqual 28 29
|
||||
32: 10(bool) All 31
|
||||
BranchConditional 32 16 18
|
||||
18: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user