mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-21 06:33:22 +00:00
Merge pull request #16087 from unknownbrackets/depth-upload
GPU: Upload depth only on first usage
This commit is contained in:
commit
bb6919ebcb
@ -548,6 +548,7 @@ void FramebufferManagerCommon::SetDepthFrameBuffer(bool isClearingDepth) {
|
||||
}
|
||||
|
||||
// First time use of this framebuffer's depth buffer.
|
||||
bool newlyUsingDepth = (currentRenderVfb_->usageFlags & FB_USAGE_RENDER_DEPTH) == 0;
|
||||
currentRenderVfb_->usageFlags |= FB_USAGE_RENDER_DEPTH;
|
||||
|
||||
// If this first draw call is anything other than a clear, "resolve" the depth buffer,
|
||||
@ -557,7 +558,7 @@ void FramebufferManagerCommon::SetDepthFrameBuffer(bool isClearingDepth) {
|
||||
|
||||
// Need to upload the first line of depth buffers, for Burnout Dominator lens flares. See issue #11100 and comments to #16081.
|
||||
// Might make this more generic and upload the whole depth buffer if we find it's needed for something.
|
||||
if (currentRenderVfb_->lastFrameNewSize == gpuStats.numFlips) {
|
||||
if (newlyUsingDepth) {
|
||||
// Sanity check the depth buffer pointer.
|
||||
if (Memory::IsValidRange(currentRenderVfb_->z_address, currentRenderVfb_->width * 2)) {
|
||||
const u16 *src = (const u16 *)Memory::GetPointerUnchecked(currentRenderVfb_->z_address);
|
||||
|
Loading…
x
Reference in New Issue
Block a user