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:
@@ -88,8 +88,11 @@ gl_FragCoord origin is upper left
|
||||
0:52 1 (const int)
|
||||
0:52 Constant:
|
||||
0:52 1.000000
|
||||
0:54 Branch: Return with expression
|
||||
0:54 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:54 Sequence
|
||||
0:54 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:54 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:54 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex2dmsf4' (uniform texture2DMS)
|
||||
@@ -200,8 +203,11 @@ gl_FragCoord origin is upper left
|
||||
0:52 1 (const int)
|
||||
0:52 Constant:
|
||||
0:52 1.000000
|
||||
0:54 Branch: Return with expression
|
||||
0:54 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:54 Sequence
|
||||
0:54 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:54 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:54 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex2dmsf4' (uniform texture2DMS)
|
||||
@@ -221,14 +227,14 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 103
|
||||
// Id's are bound by 105
|
||||
|
||||
Capability Shader
|
||||
Capability ImageGatherExtended
|
||||
Capability ImageMSArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main"
|
||||
EntryPoint Fragment 4 "main" 92
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "g_tTex2dmsf4"
|
||||
@@ -244,12 +250,13 @@ gl_FragCoord origin is upper left
|
||||
MemberName 80(PS_OUTPUT) 0 "Color"
|
||||
MemberName 80(PS_OUTPUT) 1 "Depth"
|
||||
Name 82 "psout"
|
||||
Name 95 "g_sSamp"
|
||||
Name 97 "c1"
|
||||
Name 99 "c4"
|
||||
Name 100 "o1"
|
||||
Name 101 "o3"
|
||||
Name 102 "o4"
|
||||
Name 92 "@entryPointOutput"
|
||||
Name 97 "g_sSamp"
|
||||
Name 99 "c1"
|
||||
Name 101 "c4"
|
||||
Name 102 "o1"
|
||||
Name 103 "o3"
|
||||
Name 104 "o4"
|
||||
Decorate 9(g_tTex2dmsf4) DescriptorSet 0
|
||||
Decorate 21(g_tTex2dmsi4) DescriptorSet 0
|
||||
Decorate 29(g_tTex2dmsu4) DescriptorSet 0
|
||||
@@ -257,8 +264,8 @@ gl_FragCoord origin is upper left
|
||||
Decorate 58(g_tTex2dmsi4a) DescriptorSet 0
|
||||
Decorate 64(g_tTex2dmsu4a) DescriptorSet 0
|
||||
MemberDecorate 80(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 95(g_sSamp) DescriptorSet 0
|
||||
Decorate 95(g_sSamp) Binding 0
|
||||
Decorate 97(g_sSamp) DescriptorSet 0
|
||||
Decorate 97(g_sSamp) Binding 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -301,16 +308,18 @@ gl_FragCoord origin is upper left
|
||||
86: TypePointer Function 17(fvec4)
|
||||
88: 11(int) Constant 1
|
||||
89: TypePointer Function 6(float)
|
||||
93: TypeSampler
|
||||
94: TypePointer UniformConstant 93
|
||||
95(g_sSamp): 94(ptr) Variable UniformConstant
|
||||
96: TypePointer UniformConstant 11(int)
|
||||
97(c1): 96(ptr) Variable UniformConstant
|
||||
98: TypePointer UniformConstant 24(ivec4)
|
||||
99(c4): 98(ptr) Variable UniformConstant
|
||||
100(o1): 96(ptr) Variable UniformConstant
|
||||
101(o3): 52(ptr) Variable UniformConstant
|
||||
102(o4): 98(ptr) Variable UniformConstant
|
||||
91: TypePointer Output 80(PS_OUTPUT)
|
||||
92(@entryPointOutput): 91(ptr) Variable Output
|
||||
95: TypeSampler
|
||||
96: TypePointer UniformConstant 95
|
||||
97(g_sSamp): 96(ptr) Variable UniformConstant
|
||||
98: TypePointer UniformConstant 11(int)
|
||||
99(c1): 98(ptr) Variable UniformConstant
|
||||
100: TypePointer UniformConstant 24(ivec4)
|
||||
101(c4): 100(ptr) Variable UniformConstant
|
||||
102(o1): 98(ptr) Variable UniformConstant
|
||||
103(o3): 52(ptr) Variable UniformConstant
|
||||
104(o4): 100(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
82(psout): 81(ptr) Variable Function
|
||||
@@ -360,6 +369,7 @@ gl_FragCoord origin is upper left
|
||||
Store 87 85
|
||||
90: 89(ptr) AccessChain 82(psout) 88
|
||||
Store 90 84
|
||||
91:80(PS_OUTPUT) Load 82(psout)
|
||||
ReturnValue 91
|
||||
93:80(PS_OUTPUT) Load 82(psout)
|
||||
Store 92(@entryPointOutput) 93
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user