mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
More lenient heuristic for uploading depth buffers. Still behind compat flag. See #11100
This commit is contained in:
parent
594139885e
commit
188ab67d6a
1 changed files with 2 additions and 2 deletions
|
@ -553,10 +553,10 @@ void FramebufferManagerCommon::SetDepthFrameBuffer(bool isClearingDepth) {
|
|||
CopyToDepthFromOverlappingFramebuffers(currentRenderVfb_);
|
||||
|
||||
// Special compatibility trick for Burnout Dominator lens flares. Not sure how to best generalize this. See issue #11100
|
||||
if (PSP_CoreParameter().compat.flags().UploadDepthForCLUTTextures && (currentRenderVfb_->usageFlags & FB_USAGE_CLUT) != 0) {
|
||||
if (PSP_CoreParameter().compat.flags().UploadDepthForCLUTTextures && currentRenderVfb_->z_address > 0x04110000) {
|
||||
// Set the flag, then upload memory contents to depth channel.
|
||||
// Sanity check the depth buffer pointer.
|
||||
if (currentRenderVfb_->z_address != 0 && currentRenderVfb_->z_address != currentRenderVfb_->fb_address) {
|
||||
if (currentRenderVfb_->z_address > 0x04110000 && currentRenderVfb_->z_address != 0 && currentRenderVfb_->z_address != currentRenderVfb_->fb_address) {
|
||||
if (Memory::IsValidRange(currentRenderVfb_->z_address, currentRenderVfb_->width * 2)) {
|
||||
const u16 *src = (const u16 *)Memory::GetPointerUnchecked(currentRenderVfb_->z_address);
|
||||
DrawPixels(currentRenderVfb_, 0, 0, (const u8 *)src, GE_FORMAT_DEPTH16, currentRenderVfb_->z_stride, currentRenderVfb_->width, currentRenderVfb_->height, RASTER_DEPTH, "Depth Upload");
|
||||
|
|
Loading…
Add table
Reference in a new issue