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:
@@ -40,8 +40,11 @@ gl_FragCoord origin is upper left
|
||||
0:35 1 (const int)
|
||||
0:35 Constant:
|
||||
0:35 1.000000
|
||||
0:37 Branch: Return with expression
|
||||
0:37 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:37 Sequence
|
||||
0:37 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:37 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:37 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_tTexbf4_test' (layout(binding=0 ) uniform samplerBuffer)
|
||||
0:? 'g_tTexbf4' (uniform samplerBuffer)
|
||||
@@ -101,8 +104,11 @@ gl_FragCoord origin is upper left
|
||||
0:35 1 (const int)
|
||||
0:35 Constant:
|
||||
0:35 1.000000
|
||||
0:37 Branch: Return with expression
|
||||
0:37 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:37 Sequence
|
||||
0:37 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:37 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:37 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_tTexbf4_test' (layout(binding=0 ) uniform samplerBuffer)
|
||||
0:? 'g_tTexbf4' (uniform samplerBuffer)
|
||||
@@ -119,13 +125,13 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 69
|
||||
// Id's are bound by 71
|
||||
|
||||
Capability Shader
|
||||
Capability SampledBuffer
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main"
|
||||
EntryPoint Fragment 4 "main" 55
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "r00"
|
||||
@@ -139,20 +145,21 @@ gl_FragCoord origin is upper left
|
||||
MemberName 44(PS_OUTPUT) 0 "Color"
|
||||
MemberName 44(PS_OUTPUT) 1 "Depth"
|
||||
Name 46 "psout"
|
||||
Name 56 "g_tTexbf4_test"
|
||||
Name 59 "c2"
|
||||
Name 62 "c3"
|
||||
Name 64 "c4"
|
||||
Name 65 "o1"
|
||||
Name 66 "o2"
|
||||
Name 67 "o3"
|
||||
Name 68 "o4"
|
||||
Name 55 "@entryPointOutput"
|
||||
Name 58 "g_tTexbf4_test"
|
||||
Name 61 "c2"
|
||||
Name 64 "c3"
|
||||
Name 66 "c4"
|
||||
Name 67 "o1"
|
||||
Name 68 "o2"
|
||||
Name 69 "o3"
|
||||
Name 70 "o4"
|
||||
Decorate 13(g_tTexbf4) DescriptorSet 0
|
||||
Decorate 27(g_tTexbi4) DescriptorSet 0
|
||||
Decorate 39(g_tTexbu4) DescriptorSet 0
|
||||
MemberDecorate 44(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 56(g_tTexbf4_test) DescriptorSet 0
|
||||
Decorate 56(g_tTexbf4_test) Binding 0
|
||||
Decorate 58(g_tTexbf4_test) DescriptorSet 0
|
||||
Decorate 58(g_tTexbf4_test) Binding 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -185,19 +192,21 @@ gl_FragCoord origin is upper left
|
||||
49: 7(fvec4) ConstantComposite 48 48 48 48
|
||||
51: 15(int) Constant 1
|
||||
52: TypePointer Function 6(float)
|
||||
56(g_tTexbf4_test): 12(ptr) Variable UniformConstant
|
||||
57: TypeVector 15(int) 2
|
||||
58: TypePointer UniformConstant 57(ivec2)
|
||||
59(c2): 58(ptr) Variable UniformConstant
|
||||
60: TypeVector 15(int) 3
|
||||
61: TypePointer UniformConstant 60(ivec3)
|
||||
62(c3): 61(ptr) Variable UniformConstant
|
||||
63: TypePointer UniformConstant 21(ivec4)
|
||||
64(c4): 63(ptr) Variable UniformConstant
|
||||
65(o1): 16(ptr) Variable UniformConstant
|
||||
66(o2): 58(ptr) Variable UniformConstant
|
||||
67(o3): 61(ptr) Variable UniformConstant
|
||||
68(o4): 63(ptr) Variable UniformConstant
|
||||
54: TypePointer Output 44(PS_OUTPUT)
|
||||
55(@entryPointOutput): 54(ptr) Variable Output
|
||||
58(g_tTexbf4_test): 12(ptr) Variable UniformConstant
|
||||
59: TypeVector 15(int) 2
|
||||
60: TypePointer UniformConstant 59(ivec2)
|
||||
61(c2): 60(ptr) Variable UniformConstant
|
||||
62: TypeVector 15(int) 3
|
||||
63: TypePointer UniformConstant 62(ivec3)
|
||||
64(c3): 63(ptr) Variable UniformConstant
|
||||
65: TypePointer UniformConstant 21(ivec4)
|
||||
66(c4): 65(ptr) Variable UniformConstant
|
||||
67(o1): 16(ptr) Variable UniformConstant
|
||||
68(o2): 60(ptr) Variable UniformConstant
|
||||
69(o3): 63(ptr) Variable UniformConstant
|
||||
70(o4): 65(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(r00): 8(ptr) Variable Function
|
||||
@@ -223,6 +232,7 @@ gl_FragCoord origin is upper left
|
||||
Store 50 49
|
||||
53: 52(ptr) AccessChain 46(psout) 51
|
||||
Store 53 48
|
||||
54:44(PS_OUTPUT) Load 46(psout)
|
||||
ReturnValue 54
|
||||
56:44(PS_OUTPUT) Load 46(psout)
|
||||
Store 55(@entryPointOutput) 56
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user