GPU/HW: Treat fill-like sprites as fills if TC is enabled

Umihara Kawase Shun clears the framebuffer with a single large
sprite, which causes the texture cache to think the pages have
been drawn.
This commit is contained in:
Stenzek 2025-01-28 17:34:53 +10:00
parent d7c78eedce
commit 7188ab863a
No known key found for this signature in database
1 changed files with 7 additions and 0 deletions

View File

@ -2663,6 +2663,13 @@ void GPU_HW::DrawLine(const GSVector4 bounds, u32 col0, u32 col1, float depth)
void GPU_HW::DrawSprite(const GPUBackendDrawRectangleCommand* cmd)
{
// Treat non-textured sprite draws as fills, so we don't break the TC on framebuffer clears.
if (m_use_texture_cache && !cmd->transparency_enable && !cmd->shading_enable && !cmd->texture_enable)
{
FillVRAM(cmd->x, cmd->y, cmd->width, cmd->height, cmd->color, cmd->interlaced_rendering, cmd->active_line_lsb);
return;
}
const GSVector2i pos = GSVector2i::load<true>(&cmd->x);
const GSVector2i size = GSVector2i::load<true>(&cmd->width).u16to32();
const GSVector4i rect = GSVector4i::xyxy(pos, pos.add32(size));