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:
@@ -100,8 +100,11 @@ gl_FragCoord origin is upper left
|
||||
0:34 1 (const int)
|
||||
0:34 Constant:
|
||||
0:34 1.000000
|
||||
0:36 Branch: Return with expression
|
||||
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:36 Sequence
|
||||
0:36 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:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:36 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
|
||||
@@ -217,8 +220,11 @@ gl_FragCoord origin is upper left
|
||||
0:34 1 (const int)
|
||||
0:34 Constant:
|
||||
0:34 1.000000
|
||||
0:36 Branch: Return with expression
|
||||
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:36 Sequence
|
||||
0:36 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:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:36 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
|
||||
@@ -231,13 +237,13 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 104
|
||||
// Id's are bound by 106
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main"
|
||||
EntryPoint Fragment 4 "main" 102
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval10"
|
||||
@@ -257,7 +263,8 @@ gl_FragCoord origin is upper left
|
||||
MemberName 93(PS_OUTPUT) 0 "Color"
|
||||
MemberName 93(PS_OUTPUT) 1 "Depth"
|
||||
Name 95 "psout"
|
||||
Name 103 "g_tTex1df4a"
|
||||
Name 102 "@entryPointOutput"
|
||||
Name 105 "g_tTex1df4a"
|
||||
Decorate 12(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4) Binding 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
@@ -268,8 +275,8 @@ gl_FragCoord origin is upper left
|
||||
Decorate 72(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 83(g_tTex2du4) DescriptorSet 0
|
||||
MemberDecorate 93(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 103(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 103(g_tTex1df4a) Binding 1
|
||||
Decorate 105(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 105(g_tTex1df4a) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -334,7 +341,9 @@ gl_FragCoord origin is upper left
|
||||
96: 6(float) Constant 1065353216
|
||||
97: 7(fvec4) ConstantComposite 96 96 96 96
|
||||
99: TypePointer Function 6(float)
|
||||
103(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
101: TypePointer Output 93(PS_OUTPUT)
|
||||
102(@entryPointOutput): 101(ptr) Variable Output
|
||||
105(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval10): 8(ptr) Variable Function
|
||||
@@ -378,6 +387,7 @@ gl_FragCoord origin is upper left
|
||||
Store 98 97
|
||||
100: 99(ptr) AccessChain 95(psout) 39
|
||||
Store 100 96
|
||||
101:93(PS_OUTPUT) Load 95(psout)
|
||||
ReturnValue 101
|
||||
103:93(PS_OUTPUT) Load 95(psout)
|
||||
Store 102(@entryPointOutput) 103
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user