GL/Context: Disable fbfetch on Adreno GLES <502

This commit is contained in:
Stenzek 2023-12-03 21:43:57 +10:00
parent 90b14d6237
commit 81e8abdc1e
No known key found for this signature in database
1 changed files with 16 additions and 0 deletions

View File

@ -75,6 +75,22 @@ static void DisableBrokenExtensions(const char* gl_vendor, const char* gl_render
GLAD_GL_EXT_disjoint_timer_query = 0;
}
}
else if (std::strstr(gl_vendor, "Qualcomm") && std::strstr(gl_renderer, "Adreno"))
{
// Framebuffer fetch appears to be broken in drivers ?? >= 464 < 502.
int gl_major_version = 0, gl_minor_version = 0, major_version = 0;
if ((std::sscanf(gl_version, "OpenGL ES %d.%d V@%d", &gl_major_version, &gl_minor_version, &major_version) == 3 &&
gl_major_version >= 3 && gl_minor_version >= 2 && major_version < 502))
{
Log_VerboseFmt("Disabling GL_EXT_shader_framebuffer_fetch on Adreno version {}", major_version);
GLAD_GL_EXT_shader_framebuffer_fetch = 0;
GLAD_GL_ARM_shader_framebuffer_fetch = 0;
}
else
{
Log_VerboseFmt("Keeping GL_EXT_shader_framebuffer_fetch on Adreno version {}", major_version);
}
}
// If we're missing GLES 3.2, but have OES_draw_elements_base_vertex, redirect the function pointers.
if (!glad_glDrawElementsBaseVertex && GLAD_GL_OES_draw_elements_base_vertex && !GLAD_GL_ES_VERSION_3_2)