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:
@@ -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
|
||||
Name 4 "main"
|
||||
Name 7 "MemberTest"
|
||||
@@ -59,9 +59,10 @@ Linked fragment stage:
|
||||
MemberName 171(PS_OUTPUT) 0 "Color"
|
||||
MemberName 171(PS_OUTPUT) 1 "Depth"
|
||||
Name 173 "psout"
|
||||
Name 180 "g_sSamp2d"
|
||||
Name 181 "g_sSamp2D_b"
|
||||
Name 182 "g_tTex1df4a"
|
||||
Name 180 "@entryPointOutput"
|
||||
Name 182 "g_sSamp2d"
|
||||
Name 183 "g_sSamp2D_b"
|
||||
Name 184 "g_tTex1df4a"
|
||||
Decorate 41(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 41(g_tTex1df4) Binding 0
|
||||
Decorate 45(g_sSamp) DescriptorSet 0
|
||||
@@ -78,10 +79,10 @@ Linked fragment stage:
|
||||
Decorate 156(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 165(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 171(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 180(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 181(g_sSamp2D_b) DescriptorSet 0
|
||||
Decorate 182(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 182(g_tTex1df4a) Binding 1
|
||||
Decorate 182(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 183(g_sSamp2D_b) DescriptorSet 0
|
||||
Decorate 184(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 184(g_tTex1df4a) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
@@ -181,9 +182,11 @@ Linked fragment stage:
|
||||
174: 35(float) Constant 1065353216
|
||||
175: 36(fvec4) ConstantComposite 174 174 174 174
|
||||
177: TypePointer Function 35(float)
|
||||
180(g_sSamp2d): 44(ptr) Variable UniformConstant
|
||||
181(g_sSamp2D_b): 44(ptr) Variable UniformConstant
|
||||
182(g_tTex1df4a): 40(ptr) Variable UniformConstant
|
||||
179: TypePointer Output 171(PS_OUTPUT)
|
||||
180(@entryPointOutput): 179(ptr) Variable Output
|
||||
182(g_sSamp2d): 44(ptr) Variable UniformConstant
|
||||
183(g_sSamp2D_b): 44(ptr) Variable UniformConstant
|
||||
184(g_tTex1df4a): 40(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(mtest): 8(ptr) Variable Function
|
||||
@@ -288,6 +291,7 @@ Linked fragment stage:
|
||||
Store 176 175
|
||||
178: 177(ptr) AccessChain 173(psout) 10
|
||||
Store 178 174
|
||||
179:171(PS_OUTPUT) Load 173(psout)
|
||||
ReturnValue 179
|
||||
181:171(PS_OUTPUT) Load 173(psout)
|
||||
Store 180(@entryPointOutput) 181
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user