Skip to content

Commit

Permalink
Comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Aug 16, 2022
1 parent e4c195e commit d5c4f51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions GPU/Common/FramebufferManagerCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ VirtualFramebuffer *FramebufferManagerCommon::GetVFBAt(u32 addr) const {
VirtualFramebuffer *v = vfbs_[i];
if (v->fb_address == addr) {
// Could check w too but whatever
// NOTE: This gets the OLDEST image at the address - is that good?
if (match == nullptr || match->last_frame_render < v->last_frame_render) {
match = v;
}
Expand Down Expand Up @@ -2083,6 +2084,7 @@ bool FramebufferManagerCommon::GetFramebuffer(u32 fb_address, int fb_stride, GEB
bool FramebufferManagerCommon::GetDepthbuffer(u32 fb_address, int fb_stride, u32 z_address, int z_stride, GPUDebugBuffer &buffer) {
VirtualFramebuffer *vfb = currentRenderVfb_;
if (!vfb) {
// TODO: This is flawed, as it looks for color buffers at the address, not depth.
vfb = GetVFBAt(fb_address);
}

Expand Down
4 changes: 3 additions & 1 deletion GPU/Common/FramebufferManagerCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ class FramebufferManagerCommon {
VirtualFramebuffer *GetCurrentRenderVFB() const {
return currentRenderVfb_;
}
// TODO: Break out into some form of FBO manager

// This only checks for the color channel.
VirtualFramebuffer *GetVFBAt(u32 addr) const;

VirtualFramebuffer *GetDisplayVFB() const {
return GetVFBAt(displayFramebufPtr_);
}
Expand Down
1 change: 1 addition & 0 deletions GPU/Directx9/FramebufferManagerDX9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ namespace DX9 {
bool FramebufferManagerDX9::GetDepthbuffer(u32 fb_address, int fb_stride, u32 z_address, int z_stride, GPUDebugBuffer &buffer) {
VirtualFramebuffer *vfb = currentRenderVfb_;
if (!vfb) {
// TODO: This is flawed, as it looks for color buffers at the address, not depth.
vfb = GetVFBAt(fb_address);
}

Expand Down

0 comments on commit d5c4f51

Please sign in to comment.