mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 16:15:29 +03: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
|
// Depth/Stencil Render Target Setup
|
||||||
auto depthRenderTargetView{GetDepthRenderTarget()};
|
auto depthRenderTargetView{GetDepthRenderTarget()};
|
||||||
std::optional<std::scoped_lock<TextureView>> depthTargetLock;
|
std::optional<std::scoped_lock<TextureView>> depthTargetLock;
|
||||||
if (depthRenderTargetView)
|
if (depthRenderTargetView) {
|
||||||
depthTargetLock.emplace(*depthRenderTargetView);
|
depthTargetLock.emplace(*depthRenderTargetView);
|
||||||
|
executor.AttachTexture(depthRenderTargetView);
|
||||||
|
}
|
||||||
|
|
||||||
// Draw Persistent Storage
|
// Draw Persistent Storage
|
||||||
struct DrawStorage {
|
struct DrawStorage {
|
||||||
|
Loading…
Reference in New Issue
Block a user