From c4ebdd1f37ac6018f67663bc6f7f01aa6f5f6708 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 3 Apr 2016 12:30:14 +0200 Subject: [PATCH] gsdx ogl: allow to read the depth buffer Unfortunately can't be tested on gs dump Ought to impact #1276 (Incognito/Eat Sleep Play's games, Nocturne too) --- plugins/GSdx/GSTextureCache.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 09d1988953..4fbf330d23 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -719,6 +719,14 @@ void GSTextureCache::InvalidateLocalMem(GSOffset* off, const GSVector4i& r) // No depth handling please. if (psm == PSM_PSMZ32 || psm == PSM_PSMZ24 || psm == PSM_PSMZ16 || psm == PSM_PSMZ16S) { GL_INS("ERROR: InvalidateLocalMem depth format isn't supported"); + if (m_can_convert_depth) { + for(auto t : m_dst[DepthStencil]) { + if(GSUtil::HasSharedBits(bp, psm, t->m_TEX0.TBP0, t->m_TEX0.PSM)) { + // Read the full depth buffer for easy testing + Read(t, t->m_valid); + } + } + } return; }