diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index dcf5ff89b8..6c33e09ed8 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -673,7 +673,7 @@ GSTexture* GSDeviceOGL::CopyOffscreen(GSTexture* src, const GSVector4& sRect, in format = GL_RGBA8; ASSERT(src); - ASSERT(format == GL_RGBA8 || format == GL_R16UI); + ASSERT(format == GL_RGBA8 || format == GL_R16UI || format == GL_R32UI); GSTexture* dst = CreateOffscreen(w, h, format); diff --git a/plugins/GSdx/GSDeviceOGL.h b/plugins/GSdx/GSDeviceOGL.h index 24a956ad7c..421c64bb24 100644 --- a/plugins/GSdx/GSDeviceOGL.h +++ b/plugins/GSdx/GSDeviceOGL.h @@ -306,7 +306,7 @@ class GSDeviceOGL : public GSDevice uint32 tcoffsethack:1; //uint32 point_sampler:1; Not tested, so keep the bit for blend uint32 iip:1; - // Next param will be handle by subroutine + // Next param will be handle by subroutine (broken currently) uint32 colclip:2; uint32 atst:3; diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index 0d4af0ec02..169b1e4e8b 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -308,7 +308,7 @@ void GSRendererHW::Draw() { if(m_dev->IsLost() || GSRenderer::IsBadFrame(m_skip, m_userhacks_skipdraw)) { if (s_dump) { - fprintf(stderr, "Warning skipping a draw call\n"); + fprintf(stderr, "Warning skipping a draw call (%d)\n", s_n); } s_n += 3; // Keep it sync with SW renderer return; diff --git a/plugins/GSdx/GSTextureCacheOGL.cpp b/plugins/GSdx/GSTextureCacheOGL.cpp index 743103c7d2..572550f671 100644 --- a/plugins/GSdx/GSTextureCacheOGL.cpp +++ b/plugins/GSdx/GSTextureCacheOGL.cpp @@ -30,13 +30,6 @@ GSTextureCacheOGL::GSTextureCacheOGL(GSRenderer* r) void GSTextureCacheOGL::Read(Target* t, const GSVector4i& r) { - if(t->m_type != RenderTarget) - { - ASSERT(0); - - return; - } - if(!t->m_dirty.empty()) { return; @@ -63,17 +56,18 @@ void GSTextureCacheOGL::Read(Target* t, const GSVector4i& r) case PSM_PSMZ32: fmt = GL_R32UI; ps_shader = 10; - return; + break; case PSM_PSMZ24: fmt = GL_R32UI; ps_shader = 10; - return; + break; case PSM_PSMZ16: + case PSM_PSMZ16S: fmt = GL_R16UI; ps_shader = 10; - return; + break; default: return; @@ -112,6 +106,17 @@ void GSTextureCacheOGL::Read(Target* t, const GSVector4i& r) case PSM_PSMCT16S: m_renderer->m_mem.WritePixel16(m.bits, m.pitch, off, r); break; + + case PSM_PSMZ32: + m_renderer->m_mem.WritePixel32(m.bits, m.pitch, off, r); + break; + case PSM_PSMZ24: + m_renderer->m_mem.WritePixel24(m.bits, m.pitch, off, r); + break; + case PSM_PSMZ16: + case PSM_PSMZ16S: + m_renderer->m_mem.WritePixel16(m.bits, m.pitch, off, r); + default: ASSERT(0); } diff --git a/plugins/GSdx/GSTextureOGL.cpp b/plugins/GSdx/GSTextureOGL.cpp index 6bc2c2c9c7..b84da5ee1e 100644 --- a/plugins/GSdx/GSTextureOGL.cpp +++ b/plugins/GSdx/GSTextureOGL.cpp @@ -210,9 +210,10 @@ GSTextureOGL::GSTextureOGL(int type, int w, int h, int format, GLuint fbo_read) // Bunch of constant parameter switch (m_format) { + case GL_R32UI: case GL_R32I: m_int_format = GL_RED_INTEGER; - m_int_type = GL_INT; + m_int_type = (m_format == GL_R32UI) ? GL_UNSIGNED_INT : GL_INT; m_int_alignment = 4; m_int_shift = 2; break;