From f2a8a73322b4661c32cbd5e62472281c311600c1 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 5 Jan 2014 22:29:57 +0100 Subject: [PATCH] Add workaround for ATI Catalyst's lack of GL_RGB565 support. --- gfx/gl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gfx/gl.c b/gfx/gl.c index 04bbc45724..cb8a51f1f3 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -1676,7 +1676,13 @@ static bool resolve_extensions(gl_t *gl) } // GL_RGB565 internal format support. - gl->have_es2_compat = gl_query_extension(gl, "ARB_ES2_compatibility"); + // Even though es2 support is claimed, the format is not supported on older ATI catalyst drivers. + // The speed gain from using GL_RGB565 is worth adding some workarounds for. + const char *vendor = (const char*)glGetString(GL_VENDOR); + if (!vendor || !strstr(vendor, "ATI")) + gl->have_es2_compat = gl_query_extension(gl, "ARB_ES2_compatibility"); + else + RARCH_LOG("[GL]: ATI card detected, skipping check for GL_RGB565 support.\n"); #endif #ifdef HAVE_GL_SYNC