summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPStructs.cpp
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2023-02-03 13:01:18 +1300
committerScott Mansell <phiren@gmail.com>2023-02-09 18:36:20 +1300
commite0a1631659425948a1e25c159307d81bda961018 (patch)
treeead2940813689938c9e77b0d234c06da5709067b /Source/Core/VideoCommon/BPStructs.cpp
parent43b6a4901206f49cd5b6f08206543d07c9ee875d (diff)
Add comment about "end of frame"
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/BPStructs.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp
index baf3f5fedf..8bb312f1ba 100644
--- a/Source/Core/VideoCommon/BPStructs.cpp
+++ b/Source/Core/VideoCommon/BPStructs.cpp
@@ -343,8 +343,19 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager,
// This is as closest as we have to an "end of the frame"
// It works 99% of the time.
+ // But sometimes games want to render an XFB larger than the EFB's 640x528 pixel resolution
+ // (especially when using the 3xMSAA mode, which cuts EFB resolution to 640x264). So they
+ // render multiple sub-frames and arrange the XFB copies in next to each-other in main memory
+ // so they form a single completed XFB.
+ // See https://dolphin-emu.org/blog/2017/11/19/hybridxfb/ for examples and more detail.
AfterFrameEvent::Trigger();
+ // Note: Theoretically, in the future we could track the VI configuration and try to detect
+ // when an XFB is the last XFB copy of a frame. Not only would we get a clean "end of
+ // the frame", but we would also be able to use ImmediateXFB even for these games.
+ // Might also clean up some issues with games doing XFB copies they don't intend to
+ // display.
+
if (g_ActiveConfig.bImmediateXFB)
{
// below div two to convert from bytes to pixels - it expects width, not stride