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

@ -7,13 +7,13 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 183
// Id's are bound by 185
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 180
ExecutionMode 4 OriginUpperLeft
Decorate 41 DescriptorSet 0
Decorate 41 Binding 0
@ -31,10 +31,10 @@ Linked fragment stage:
Decorate 156 DescriptorSet 0
Decorate 165 DescriptorSet 0
MemberDecorate 171 1 BuiltIn FragDepth
Decorate 180 DescriptorSet 0
Decorate 181 DescriptorSet 0
Decorate 182 DescriptorSet 0
Decorate 182 Binding 1
Decorate 183 DescriptorSet 0
Decorate 184 DescriptorSet 0
Decorate 184 Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@ -134,9 +134,11 @@ Linked fragment stage:
174: 35(float) Constant 1065353216
175: 36(fvec4) ConstantComposite 174 174 174 174
177: TypePointer Function 35(float)
180: 44(ptr) Variable UniformConstant
181: 44(ptr) Variable UniformConstant
182: 40(ptr) Variable UniformConstant
179: TypePointer Output 171(struct)
180: 179(ptr) Variable Output
182: 44(ptr) Variable UniformConstant
183: 44(ptr) Variable UniformConstant
184: 40(ptr) Variable UniformConstant
4: 2 Function None 3
5: Label
9: 8(ptr) Variable Function
@ -241,6 +243,7 @@ Linked fragment stage:
Store 176 175
178: 177(ptr) AccessChain 173 10
Store 178 174
179: 171(struct) Load 173
ReturnValue 179
181: 171(struct) Load 173
Store 180 181
Return
FunctionEnd