From 705b34d868c2dab0dfa1b74e3a551985a4bb2634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 17 Aug 2022 23:25:07 +0200 Subject: [PATCH] Show seqCount in candidate list --- GPU/Common/TextureCacheCommon.cpp | 6 +++--- GPU/Common/TextureCacheCommon.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index f0d36ab656..f2c68b5777 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -636,7 +636,7 @@ std::vector TextureCacheCommon::GetFramebufferCandidates(const for (VirtualFramebuffer *framebuffer : framebuffers) { FramebufferMatchInfo match{}; if (MatchFramebuffer(entry, framebuffer, texAddrOffset, channel, &match)) { - candidates.push_back(AttachCandidate{ match, entry, framebuffer, channel }); + candidates.push_back(AttachCandidate{ match, entry, framebuffer, channel, channel == RASTER_COLOR ? framebuffer->colorBindSeq : framebuffer->depthBindSeq }); } } @@ -2150,8 +2150,8 @@ void TextureCacheCommon::ClearNextFrame() { clearCacheNextFrame_ = true; } -std::string AttachCandidate::ToString() { - return StringFromFormat("[C:%08x/%d Z:%08x/%d X:%d Y:%d reint: %s]", this->fb->fb_address, this->fb->fb_stride, this->fb->z_address, this->fb->z_stride, this->match.xOffset, this->match.yOffset, this->match.reinterpret ? "true" : "false"); +std::string AttachCandidate::ToString() const { + return StringFromFormat("[%s seq:%d C:%08x/%d Z:%08x/%d X:%d Y:%d reint: %s]", this->channel == RASTER_COLOR ? "COLOR" : "DEPTH", this->seqCount, this->fb->fb_address, this->fb->fb_stride, this->fb->z_address, this->fb->z_stride, this->match.xOffset, this->match.yOffset, this->match.reinterpret ? "true" : "false"); } bool TextureCacheCommon::PrepareBuildTexture(BuildTexturePlan &plan, TexCacheEntry *entry) { diff --git a/GPU/Common/TextureCacheCommon.h b/GPU/Common/TextureCacheCommon.h index 5ab6c995d1..5c95eb3b87 100644 --- a/GPU/Common/TextureCacheCommon.h +++ b/GPU/Common/TextureCacheCommon.h @@ -218,8 +218,9 @@ struct AttachCandidate { TextureDefinition entry; VirtualFramebuffer *fb; RasterChannel channel; + int seqCount; - std::string ToString(); + std::string ToString() const; }; class FramebufferManagerCommon;