(context drivers) Start exposing core GL flag

This commit is contained in:
twinaphex 2016-05-05 05:46:00 +02:00
parent a0425dfb14
commit 8136683ffc
19 changed files with 34 additions and 23 deletions

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 =

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 =

View File

@ -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