mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
(context drivers) Start exposing core GL flag
This commit is contained in:
parent
a0425dfb14
commit
8136683ffc
@ -540,7 +540,7 @@ static void *android_gfx_ctx_get_context_data(void *data)
|
||||
static uint32_t android_gfx_ctx_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_android = {
|
||||
|
@ -401,7 +401,7 @@ static void gfx_ctx_qnx_get_video_size(void *data,
|
||||
static uint32_t gfx_ctx_qnx_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_bbqnx = {
|
||||
|
@ -343,7 +343,7 @@ error:
|
||||
static uint32_t gfx_ctx_cgl_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_cgl = {
|
||||
|
@ -598,7 +598,7 @@ static void cocoagl_gfx_ctx_bind_hw_render(void *data, bool enable)
|
||||
static uint32_t cocoagl_gfx_ctx_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_cocoagl = {
|
||||
|
@ -305,7 +305,7 @@ static bool gfx_ctx_d3d_get_metrics(void *data,
|
||||
static uint32_t gfx_ctx_d3d_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_d3d = {
|
||||
|
@ -872,8 +872,10 @@ static void gfx_ctx_drm_bind_hw_render(void *data, bool enable)
|
||||
|
||||
static uint32_t gfx_ctx_drm_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data;
|
||||
if ((drm->egl.major * 1000 + drm->egl.minor) >= 3001)
|
||||
return (1UL << GFX_CTX_FLAGS_GL_CORE_CONTEXT);
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_drm = {
|
||||
|
@ -306,7 +306,7 @@ static void gfx_ctx_emscripten_bind_hw_render(void *data, bool enable)
|
||||
static uint32_t gfx_ctx_emscripten_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_emscripten = {
|
||||
|
@ -136,7 +136,7 @@ static void *gfx_ctx_null_init(void *video_driver)
|
||||
static uint32_t gfx_ctx_null_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_null = {
|
||||
|
@ -294,7 +294,7 @@ static void gfx_ctx_mali_fbdev_bind_hw_render(void *data, bool enable)
|
||||
static uint32_t gfx_ctx_mali_fbdev_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_mali_fbdev = {
|
||||
|
@ -270,7 +270,7 @@ static void gfx_ctx_opendingux_bind_hw_render(void *data, bool enable)
|
||||
static uint32_t gfx_ctx_opendingux_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev = {
|
||||
|
@ -417,7 +417,7 @@ static void gfx_ctx_ps3_get_video_output_next(void *data)
|
||||
static uint32_t gfx_ctx_ps3_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_ps3 = {
|
||||
|
@ -403,7 +403,7 @@ static void sdl_ctx_show_mouse(void *data, bool state)
|
||||
static uint32_t sdl_ctx_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_sdl_gl =
|
||||
|
@ -627,7 +627,7 @@ static gfx_ctx_proc_t gfx_ctx_vc_get_proc_address(const char *symbol)
|
||||
static uint32_t gfx_ctx_vc_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_videocore = {
|
||||
|
@ -264,7 +264,7 @@ static void gfx_ctx_vivante_swap_buffers(void *data)
|
||||
static uint32_t gfx_ctx_vivante_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = {
|
||||
|
@ -1140,8 +1140,10 @@ static void gfx_ctx_wl_bind_hw_render(void *data, bool enable)
|
||||
|
||||
static uint32_t gfx_ctx_wl_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
if ((wl->egl.major * 1000 + wl->egl.minor) >= 3001)
|
||||
return (1UL << GFX_CTX_FLAGS_GL_CORE_CONTEXT);
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_wayland = {
|
||||
|
@ -451,7 +451,9 @@ static void gfx_ctx_wgl_bind_hw_render(void *data, bool enable)
|
||||
static uint32_t gfx_ctx_wgl_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
if ((g_major * 1000 + g_minor) >= 3001)
|
||||
return (1UL << GFX_CTX_FLAGS_GL_CORE_CONTEXT);
|
||||
return (1UL << GFX_CTX_FLAGS_NONE);
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_wgl = {
|
||||
|
@ -888,8 +888,10 @@ static void *gfx_ctx_x_get_context_data(void *data)
|
||||
|
||||
static uint32_t gfx_ctx_x_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data;
|
||||
if (x->g_core_es || x->g_core_es_core)
|
||||
return (1UL << GFX_CTX_FLAGS_GL_CORE_CONTEXT);
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_x = {
|
||||
|
@ -576,8 +576,11 @@ static gfx_ctx_proc_t gfx_ctx_xegl_get_proc_address(const char *symbol)
|
||||
|
||||
static uint32_t gfx_ctx_xegl_get_flags(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return GFX_CTX_FLAGS_NONE;
|
||||
xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data;
|
||||
|
||||
if ((xegl->egl.major * 1000 + xegl->egl.minor) >= 3001)
|
||||
return (1UL << GFX_CTX_FLAGS_GL_CORE_CONTEXT);
|
||||
return 1UL << GFX_CTX_FLAGS_NONE;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_x_egl =
|
||||
|
@ -55,7 +55,7 @@ enum display_metric_types
|
||||
enum display_flags
|
||||
{
|
||||
GFX_CTX_FLAGS_NONE = 0,
|
||||
GFX_CTX_FLAGS_CORE_GL
|
||||
GFX_CTX_FLAGS_GL_CORE_CONTEXT
|
||||
};
|
||||
|
||||
enum gfx_ctx_ctl_state
|
||||
|
Loading…
Reference in New Issue
Block a user