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:
parent
81cd764b5f
commit
6a70eb7161
91 changed files with 5158 additions and 4130 deletions
|
|
@ -175,8 +175,11 @@ gl_FragCoord origin is upper left
|
|||
0:40 1 (const int)
|
||||
0:40 Constant:
|
||||
0:40 1.000000
|
||||
0:42 Branch: Return with expression
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Sequence
|
||||
0:42 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:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
|
||||
|
|
@ -370,8 +373,11 @@ gl_FragCoord origin is upper left
|
|||
0:40 1 (const int)
|
||||
0:40 Constant:
|
||||
0:40 1.000000
|
||||
0:42 Branch: Return with expression
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Sequence
|
||||
0:42 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:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
|
||||
|
|
@ -387,14 +393,14 @@ gl_FragCoord origin is upper left
|
|||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 126
|
||||
// Id's are bound by 128
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main"
|
||||
EntryPoint Fragment 4 "main" 124
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval10"
|
||||
|
|
@ -420,7 +426,8 @@ gl_FragCoord origin is upper left
|
|||
MemberName 113(PS_OUTPUT) 0 "Color"
|
||||
MemberName 113(PS_OUTPUT) 1 "Depth"
|
||||
Name 115 "psout"
|
||||
Name 125 "g_tTex1df4a"
|
||||
Name 124 "@entryPointOutput"
|
||||
Name 127 "g_tTex1df4a"
|
||||
Decorate 12(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4) Binding 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
|
|
@ -434,8 +441,8 @@ gl_FragCoord origin is upper left
|
|||
Decorate 98(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 107(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 113(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 125(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 125(g_tTex1df4a) Binding 1
|
||||
Decorate 127(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 127(g_tTex1df4a) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -507,7 +514,9 @@ gl_FragCoord origin is upper left
|
|||
118: 7(fvec4) ConstantComposite 117 117 117 117
|
||||
120: 27(int) Constant 1
|
||||
121: TypePointer Function 6(float)
|
||||
125(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
123: TypePointer Output 113(PS_OUTPUT)
|
||||
124(@entryPointOutput): 123(ptr) Variable Output
|
||||
127(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval10): 8(ptr) Variable Function
|
||||
|
|
@ -569,6 +578,7 @@ gl_FragCoord origin is upper left
|
|||
Store 119 118
|
||||
122: 121(ptr) AccessChain 115(psout) 120
|
||||
Store 122 117
|
||||
123:113(PS_OUTPUT) Load 115(psout)
|
||||
ReturnValue 123
|
||||
125:113(PS_OUTPUT) Load 115(psout)
|
||||
Store 124(@entryPointOutput) 125
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue