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
|
|
@ -1060,8 +1060,11 @@ gl_FragCoord origin is upper left
|
|||
0:277 1 (const int)
|
||||
0:277 Constant:
|
||||
0:277 1.000000
|
||||
0:279 Branch: Return with expression
|
||||
0:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:279 Sequence
|
||||
0:279 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:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:279 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
|
|
@ -2157,8 +2160,11 @@ gl_FragCoord origin is upper left
|
|||
0:277 1 (const int)
|
||||
0:277 Constant:
|
||||
0:277 1.000000
|
||||
0:279 Branch: Return with expression
|
||||
0:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:279 Sequence
|
||||
0:279 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:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:279 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
|
|
@ -2191,7 +2197,7 @@ gl_FragCoord origin is upper left
|
|||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 538
|
||||
// Id's are bound by 540
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
|
|
@ -2200,7 +2206,7 @@ gl_FragCoord origin is upper left
|
|||
Capability ImageQuery
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main"
|
||||
EntryPoint Fragment 4 "main" 534
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "sizeQueryTemp"
|
||||
|
|
@ -2288,7 +2294,8 @@ gl_FragCoord origin is upper left
|
|||
MemberName 522(PS_OUTPUT) 0 "Color"
|
||||
MemberName 522(PS_OUTPUT) 1 "Depth"
|
||||
Name 524 "psout"
|
||||
Name 537 "g_sSamp"
|
||||
Name 534 "@entryPointOutput"
|
||||
Name 539 "g_sSamp"
|
||||
Decorate 12(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4) Binding 0
|
||||
Decorate 29(g_tTex1di4) DescriptorSet 0
|
||||
|
|
@ -2318,8 +2325,8 @@ gl_FragCoord origin is upper left
|
|||
Decorate 496(g_tTex2dmsi4a) DescriptorSet 0
|
||||
Decorate 510(g_tTex2dmsu4a) DescriptorSet 0
|
||||
MemberDecorate 522(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 537(g_sSamp) DescriptorSet 0
|
||||
Decorate 537(g_sSamp) Binding 0
|
||||
Decorate 539(g_sSamp) DescriptorSet 0
|
||||
Decorate 539(g_sSamp) Binding 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
|
|
@ -2426,9 +2433,11 @@ gl_FragCoord origin is upper left
|
|||
528: TypePointer Function 521(fvec4)
|
||||
530: 14(int) Constant 1
|
||||
531: TypePointer Function 9(float)
|
||||
535: TypeSampler
|
||||
536: TypePointer UniformConstant 535
|
||||
537(g_sSamp): 536(ptr) Variable UniformConstant
|
||||
533: TypePointer Output 522(PS_OUTPUT)
|
||||
534(@entryPointOutput): 533(ptr) Variable Output
|
||||
537: TypeSampler
|
||||
538: TypePointer UniformConstant 537
|
||||
539(g_sSamp): 538(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(sizeQueryTemp): 7(ptr) Variable Function
|
||||
|
|
@ -3042,6 +3051,7 @@ gl_FragCoord origin is upper left
|
|||
Store 529 527
|
||||
532: 531(ptr) AccessChain 524(psout) 530
|
||||
Store 532 526
|
||||
533:522(PS_OUTPUT) Load 524(psout)
|
||||
ReturnValue 533
|
||||
535:522(PS_OUTPUT) Load 524(psout)
|
||||
Store 534(@entryPointOutput) 535
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue