mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-01 06:23:42 +00:00
Reimplement gl2_get_flags to no longer be reliant on shader driver's
get flags implementation
This commit is contained in:
parent
1a8b185c5e
commit
cd77093588
@ -4129,15 +4129,42 @@ static float gl2_get_refresh_rate(void *data)
|
||||
|
||||
static uint32_t gl2_get_flags(void *data)
|
||||
{
|
||||
gl_t *gl = (gl_t*)data;
|
||||
uint32_t flags = 0;
|
||||
unsigned i;
|
||||
uint32_t shader_driver_count = 0;
|
||||
uint32_t flags = 0;
|
||||
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_HARD_SYNC);
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_BLACK_FRAME_INSERTION);
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING);
|
||||
|
||||
if (gl && gl->shader->get_flags)
|
||||
gl->shader->get_flags(&flags);
|
||||
#ifdef HAVE_GLSL
|
||||
shader_driver_count++;
|
||||
#endif
|
||||
#ifdef HAVE_CG
|
||||
shader_driver_count++;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GLSL
|
||||
for (i = 0; i < shader_driver_count; i++)
|
||||
{
|
||||
if (string_is_equal(gl2_shader_ctx_drivers[i]->ident, "glsl"))
|
||||
{
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_GLSL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CG
|
||||
for (i = 0; i < shader_driver_count; i++)
|
||||
{
|
||||
if (string_is_equal(gl2_shader_ctx_drivers[i]->ident, "cg"))
|
||||
{
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_CG);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
@ -1236,5 +1236,5 @@ const shader_backend_t gl_cg_backend = {
|
||||
gl_cg_get_flags,
|
||||
|
||||
RARCH_SHADER_CG,
|
||||
"gl_cg"
|
||||
"cg"
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user