summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Present.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2024-04-09 18:59:33 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2024-04-09 18:59:33 -0500
commitabf380b7057991678c9e4591837aea37069ef202 (patch)
tree75adacfeeea5c825104d3a735cebc7bfe7953c9e /Source/Core/VideoCommon/Present.cpp
parente5b7b2e9eebb21ed19924c821ddde97576a65480 (diff)
VideoCommon: add xfb hash values (if available) to present information
Diffstat (limited to 'Source/Core/VideoCommon/Present.cpp')
-rw-r--r--Source/Core/VideoCommon/Present.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Present.cpp b/Source/Core/VideoCommon/Present.cpp
index 0cc19d6e14..a90ffaf687 100644
--- a/Source/Core/VideoCommon/Present.cpp
+++ b/Source/Core/VideoCommon/Present.cpp
@@ -178,6 +178,25 @@ void Presenter::ViSwap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height,
present_info.reason = PresentInfo::PresentReason::VideoInterface;
}
+ if (m_xfb_entry)
+ {
+ // With no references, this XFB copy wasn't stitched together
+ // so just use its name directly
+ if (m_xfb_entry->references.empty())
+ {
+ if (!m_xfb_entry->texture_info_name.empty())
+ present_info.xfb_copy_hashes.push_back(m_xfb_entry->texture_info_name);
+ }
+ else
+ {
+ for (const auto& reference : m_xfb_entry->references)
+ {
+ if (!reference->texture_info_name.empty())
+ present_info.xfb_copy_hashes.push_back(reference->texture_info_name);
+ }
+ }
+ }
+
BeforePresentEvent::Trigger(present_info);
if (!is_duplicate || !g_ActiveConfig.bSkipPresentingDuplicateXFBs)