Force depth stencil textures to be transient.

This commit is contained in:
Skyth 2025-02-02 00:36:38 +03:00
parent 9930b1a154
commit 52c5822977

View file

@ -3114,8 +3114,9 @@ static void ProcExecutePendingStretchRectCommands(const RenderCommand& cmd)
for (const auto surface : g_pendingSurfaceCopies) for (const auto surface : g_pendingSurfaceCopies)
{ {
bool isDepthStencil = (surface->format == RenderFormat::D32_FLOAT); // Depth stencil textures in this game are guaranteed to be transient.
foundAny |= PopulateBarriersForStretchRect(isDepthStencil ? nullptr : surface, isDepthStencil ? surface : nullptr); if (surface->format != RenderFormat::D32_FLOAT)
foundAny |= PopulateBarriersForStretchRect(surface, nullptr);
} }
if (foundAny) if (foundAny)
@ -3124,8 +3125,13 @@ static void ProcExecutePendingStretchRectCommands(const RenderCommand& cmd)
for (const auto surface : g_pendingSurfaceCopies) for (const auto surface : g_pendingSurfaceCopies)
{ {
bool isDepthStencil = (surface->format == RenderFormat::D32_FLOAT); if (surface->format != RenderFormat::D32_FLOAT)
ExecutePendingStretchRectCommands(isDepthStencil ? nullptr : surface, isDepthStencil ? surface : nullptr); ExecutePendingStretchRectCommands(surface, nullptr);
for (const auto texture : surface->destinationTextures)
texture->sourceSurface = nullptr;
surface->destinationTextures.clear();
} }
} }