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