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:
John Kessenich
2016-08-28 15:00:23 -06:00
parent 81cd764b5f
commit 6a70eb7161
91 changed files with 5158 additions and 4130 deletions

View File

@@ -239,9 +239,12 @@ gl_FragCoord origin is upper left
0:? 10.000000
0:? 11.000000
0:? 12.000000
0:45 Branch: Return with expression
0:45 Constant:
0:45 0.000000
0:45 Sequence
0:45 move second child to first child (temp float)
0:? '@entryPointOutput' (out float)
0:45 Constant:
0:45 0.000000
0:45 Branch: Return
0:? Linker Objects
@@ -488,20 +491,23 @@ gl_FragCoord origin is upper left
0:? 10.000000
0:? 11.000000
0:? 12.000000
0:45 Branch: Return with expression
0:45 Constant:
0:45 0.000000
0:45 Sequence
0:45 move second child to first child (temp float)
0:? '@entryPointOutput' (out float)
0:45 Constant:
0:45 0.000000
0:45 Branch: Return
0:? Linker Objects
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 145
// Id's are bound by 147
Capability Shader
Capability Float64
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction"
EntryPoint Fragment 4 "PixelShaderFunction" 145
ExecutionMode 4 OriginUpperLeft
Name 4 "PixelShaderFunction"
Name 9 "r00"
@@ -532,6 +538,7 @@ gl_FragCoord origin is upper left
Name 131 "r62"
Name 136 "r65"
Name 141 "r66"
Name 145 "@entryPointOutput"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -644,6 +651,8 @@ gl_FragCoord origin is upper left
140: TypePointer Function 139
142: 7(fvec4) ConstantComposite 112 113 114 116
143: 139 ConstantComposite 14 137 142
144: TypePointer Output 6(float)
145(@entryPointOutput): 144(ptr) Variable Output
4(PixelShaderFunction): 2 Function None 3
5: Label
9(r00): 8(ptr) Variable Function
@@ -702,5 +711,6 @@ gl_FragCoord origin is upper left
Store 131(r62) 133
Store 136(r65) 138
Store 141(r66) 143
ReturnValue 106
Store 145(@entryPointOutput) 106
Return
FunctionEnd