mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 16:23:35 +01:00
Make the implementations of CopyFramebufferDepth more similar.
Also avoid matching framebuffers with bad z for copies.
This commit is contained in:
1 parent
181ddd842a
commit
d0f7b1e30f
10 files changed
+29
-28
No files matched your search
@@ -273,17 +273,12 @@ void FramebufferManagerVulkan::ReformatFramebufferFrom(VirtualFramebuffer *vfb,
|
||||
void FramebufferManagerVulkan::BlitFramebufferDepth(VirtualFramebuffer *src, VirtualFramebuffer *dst) {
|
||||
bool matchingDepthBuffer = src->z_address == dst->z_address && src->z_stride != 0 && dst->z_stride != 0;
|
||||
bool matchingSize = src->width == dst->width && src->height == dst->height;
|
||||
bool matchingRenderSize = src->renderWidth == dst->renderWidth && src->renderHeight == dst->renderHeight;
|
||||
if (matchingDepthBuffer && matchingRenderSize && matchingSize) {
|
||||
// TODO: Currently, this copies depth AND stencil, which is a problem. See #9740.
|
||||
draw_->CopyFramebufferImage(src->fbo, 0, 0, 0, 0, dst->fbo, 0, 0, 0, 0, src->renderWidth, src->renderHeight, 1, Draw::FB_DEPTH_BIT, "BlitFramebufferDepth");
|
||||
dst->last_frame_depth_updated = gpuStats.numFlips;
|
||||
} else if (matchingDepthBuffer && matchingSize) {
|
||||
/*
|
||||
if (matchingDepthBuffer && matchingSize) {
|
||||
int w = std::min(src->renderWidth, dst->renderWidth);
|
||||
int h = std::min(src->renderHeight, dst->renderHeight);
|
||||
draw_->BlitFramebuffer(src->fbo, 0, 0, w, h, dst->fbo, 0, 0, w, h, Draw::FB_DEPTH_BIT, Draw::FB_BLIT_NEAREST);
|
||||
*/
|
||||
// TODO: Currently, this copies depth AND stencil, which is a problem. See #9740.
|
||||
draw_->CopyFramebufferImage(src->fbo, 0, 0, 0, 0, dst->fbo, 0, 0, 0, 0, w, h, 1, Draw::FB_DEPTH_BIT, "BlitFramebufferDepth");
|
||||
dst->last_frame_depth_updated = gpuStats.numFlips;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user