From 3be5a6036b69ae2f3824400dbcbcca70c1b15447 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Mon, 25 May 2015 17:31:27 +0200 Subject: [PATCH] gsdx-ogl: remove assertion + debug message opengl use a different object to compute the vertex count --- plugins/GSdx/GSDeviceOGL.cpp | 2 +- plugins/GSdx/GSRendererOGL.cpp | 7 ++++++- plugins/GSdx/GSState.cpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index 84c9915af6..6b5044603b 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -415,7 +415,7 @@ void GSDeviceOGL::DrawIndexedPrimitive() void GSDeviceOGL::DrawIndexedPrimitive(int offset, int count) { - ASSERT(offset + count <= (int)m_index.count); + //ASSERT(offset + count <= (int)m_index.count); BeforeDraw(); m_va->DrawIndexedPrimitive(offset, count); diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 5e4f686dcf..0cffc776cc 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -198,15 +198,20 @@ void GSRendererOGL::SendDraw(bool require_barrier) ASSERT(m_vt.m_primclass != GS_LINE_CLASS); ASSERT(GLLoader::found_geometry_shader); - // FIXME: Investigate: do a dynamic check to pack as many primitives as possibles + // FIXME: Investigate: a dynamic check to pack as many primitives as possibles + // I'm nearly sure GSdx already have this kind of code (maybe we can adapt GSDirtyRect) size_t nb_vertex = (m_vt.m_primclass == GS_TRIANGLE_CLASS) ? 3 : 2; + GL_PUSH("Split the draw"); + GL_PERF("Split single draw in %d draw", m_index.tail/nb_vertex); for (size_t p = 0; p < m_index.tail; p += nb_vertex) { gl_TextureBarrier(); dev->DrawIndexedPrimitive(p, nb_vertex); } + + GL_POP(); } } diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 1f3bc1b64c..16fbd40b49 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -5530,7 +5530,7 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) #ifdef ENABLE_OGL_DEBUG } else if (fi.TME) { if(fi.TPSM == PSM_PSMZ32 || fi.TPSM == PSM_PSMZ24 || fi.TPSM == PSM_PSMZ16 || fi.TPSM == PSM_PSMZ16S) - GL_INS("!!! Depth Texture !!!"); + GL_INS("!!! Depth Texture 0x%x!!!", fi.TPSM); #endif }