mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00: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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user