mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 22:54:16 +01:00
Attach depth RT to command executor before draws
This enforces that the depth RT outlives the draw, without this the depth RT could be freed while in active use by command executor leading to UAFs and crashes.
This commit is contained in:
parent
0182fabc50
commit
b1f10865a0
@ -2569,8 +2569,10 @@ namespace skyline::gpu::interconnect {
|
||||
// Depth/Stencil Render Target Setup
|
||||
auto depthRenderTargetView{GetDepthRenderTarget()};
|
||||
std::optional<std::scoped_lock<TextureView>> depthTargetLock;
|
||||
if (depthRenderTargetView)
|
||||
if (depthRenderTargetView) {
|
||||
depthTargetLock.emplace(*depthRenderTargetView);
|
||||
executor.AttachTexture(depthRenderTargetView);
|
||||
}
|
||||
|
||||
// Draw Persistent Storage
|
||||
struct DrawStorage {
|
||||
|
Loading…
Reference in New Issue
Block a user