From a065a1d918a1d46a97d6882db1200e062fc63572 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Mon, 27 Jun 2016 18:03:35 +0200 Subject: [PATCH] gsdx ogl: don't use GL_ARB_clear_texture for the depth buffer It creates some slowdowns for unknown reason. My best hypothesis is that stencil will be cleared too which is slow. Let's keep the code for the future when stencil will be dropped. Fix #1420 --- plugins/GSdx/GSDeviceOGL.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index f83c944bc0..dbe5136428 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -706,7 +706,14 @@ void GSDeviceOGL::ClearDepth(GSTexture* t, float c) GL_PUSH("Clear Depth %d", T->GetID()); - if (GLLoader::found_GL_ARB_clear_texture) { + if (0 && GLLoader::found_GL_ARB_clear_texture) { + // I don't know what the driver does but it creates + // some slowdowns on Harry Potter PS + // Maybe it triggers some texture relocations, or maybe + // it clears also the stencil value (2 times slower) + // + // Let's disable this code for the moment. + // Don't bother with Depth_Stencil insanity ASSERT(c == 0.0f); T->Clear(NULL);