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:
@@ -262,8 +262,11 @@ gl_FragCoord origin is upper left
|
||||
0:68 1 (const int)
|
||||
0:68 Constant:
|
||||
0:68 1.000000
|
||||
0:70 Branch: Return with expression
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Sequence
|
||||
0:70 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_sSamp2d' (uniform sampler)
|
||||
@@ -548,8 +551,11 @@ gl_FragCoord origin is upper left
|
||||
0:68 1 (const int)
|
||||
0:68 Constant:
|
||||
0:68 1.000000
|
||||
0:70 Branch: Return with expression
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Sequence
|
||||
0:70 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_sSamp2d' (uniform sampler)
|
||||
@@ -569,14 +575,14 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 220
|
||||
// Id's are bound by 222
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main"
|
||||
EntryPoint Fragment 4 "main" 204
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval00"
|
||||
@@ -616,12 +622,13 @@ gl_FragCoord origin is upper left
|
||||
MemberName 195(PS_OUTPUT) 0 "Color"
|
||||
MemberName 195(PS_OUTPUT) 1 "Depth"
|
||||
Name 197 "psout"
|
||||
Name 205 "g_sSamp2d"
|
||||
Name 208 "g_tTex1df4a"
|
||||
Name 211 "g_tTex1di4a"
|
||||
Name 214 "g_tTex1du4a"
|
||||
Name 216 "c1"
|
||||
Name 219 "c2"
|
||||
Name 204 "@entryPointOutput"
|
||||
Name 207 "g_sSamp2d"
|
||||
Name 210 "g_tTex1df4a"
|
||||
Name 213 "g_tTex1di4a"
|
||||
Name 216 "g_tTex1du4a"
|
||||
Name 218 "c1"
|
||||
Name 221 "c2"
|
||||
Decorate 12(g_tTex2df4a) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) Binding 0
|
||||
@@ -631,11 +638,11 @@ gl_FragCoord origin is upper left
|
||||
Decorate 124(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 134(g_tTexcdu4a) DescriptorSet 0
|
||||
MemberDecorate 195(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 205(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 208(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 208(g_tTex1df4a) Binding 0
|
||||
Decorate 211(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 214(g_tTex1du4a) DescriptorSet 0
|
||||
Decorate 207(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 210(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 210(g_tTex1df4a) Binding 0
|
||||
Decorate 213(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 216(g_tTex1du4a) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -688,21 +695,23 @@ gl_FragCoord origin is upper left
|
||||
198: 6(float) Constant 1065353216
|
||||
199: 7(fvec4) ConstantComposite 198 198 198 198
|
||||
201: TypePointer Function 6(float)
|
||||
205(g_sSamp2d): 15(ptr) Variable UniformConstant
|
||||
206: TypeImage 6(float) 1D array sampled format:Unknown
|
||||
207: TypePointer UniformConstant 206
|
||||
208(g_tTex1df4a): 207(ptr) Variable UniformConstant
|
||||
209: TypeImage 24(int) 1D array sampled format:Unknown
|
||||
210: TypePointer UniformConstant 209
|
||||
211(g_tTex1di4a): 210(ptr) Variable UniformConstant
|
||||
212: TypeImage 39(int) 1D array sampled format:Unknown
|
||||
213: TypePointer UniformConstant 212
|
||||
214(g_tTex1du4a): 213(ptr) Variable UniformConstant
|
||||
215: TypePointer UniformConstant 6(float)
|
||||
216(c1): 215(ptr) Variable UniformConstant
|
||||
217: TypeVector 6(float) 2
|
||||
218: TypePointer UniformConstant 217(fvec2)
|
||||
219(c2): 218(ptr) Variable UniformConstant
|
||||
203: TypePointer Output 195(PS_OUTPUT)
|
||||
204(@entryPointOutput): 203(ptr) Variable Output
|
||||
207(g_sSamp2d): 15(ptr) Variable UniformConstant
|
||||
208: TypeImage 6(float) 1D array sampled format:Unknown
|
||||
209: TypePointer UniformConstant 208
|
||||
210(g_tTex1df4a): 209(ptr) Variable UniformConstant
|
||||
211: TypeImage 24(int) 1D array sampled format:Unknown
|
||||
212: TypePointer UniformConstant 211
|
||||
213(g_tTex1di4a): 212(ptr) Variable UniformConstant
|
||||
214: TypeImage 39(int) 1D array sampled format:Unknown
|
||||
215: TypePointer UniformConstant 214
|
||||
216(g_tTex1du4a): 215(ptr) Variable UniformConstant
|
||||
217: TypePointer UniformConstant 6(float)
|
||||
218(c1): 217(ptr) Variable UniformConstant
|
||||
219: TypeVector 6(float) 2
|
||||
220: TypePointer UniformConstant 219(fvec2)
|
||||
221(c2): 220(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval00): 8(ptr) Variable Function
|
||||
@@ -878,6 +887,7 @@ gl_FragCoord origin is upper left
|
||||
Store 200 199
|
||||
202: 201(ptr) AccessChain 197(psout) 57
|
||||
Store 202 198
|
||||
203:195(PS_OUTPUT) Load 197(psout)
|
||||
ReturnValue 203
|
||||
205:195(PS_OUTPUT) Load 197(psout)
|
||||
Store 204(@entryPointOutput) 205
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user