1
0
mirror of https://github.com/libretro/RetroArch synced 2025-01-31 15:32:59 +00:00

Take out make_current_context

This commit is contained in:
twinaphex 2015-02-16 23:41:49 +01:00
parent a1d519ad9d
commit 8f5809ee46
23 changed files with 0 additions and 150 deletions

@ -324,12 +324,6 @@ CFStringRef)BOXSTRING(symbol_name)
);
}
static void apple_gfx_ctx_make_current_context(void *data)
{
(void)data;
[g_hw_ctx makeCurrentContext];
}
static void apple_gfx_ctx_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
{
@ -390,7 +384,6 @@ const gfx_ctx_driver_t gfx_ctx_apple = {
apple_gfx_ctx_swap_buffers,
apple_gfx_ctx_input_driver,
apple_gfx_ctx_get_proc_address,
apple_gfx_ctx_make_current_context,
NULL,
"apple",
apple_gfx_ctx_bind_hw_render,

@ -1237,17 +1237,6 @@ bool rarch_environment_cb(unsigned cmd, void *data)
break;
case RETRO_ENVIRONMENT_MAKE_CURRENT_CONTEXT:
{
struct retro_hw_make_current_context_callback *cb =
(struct retro_hw_make_current_context_callback*)data;
RARCH_LOG("Environ MAKE_CURRENT_CONTEXT.\n");
cb->make_current_context = video_driver_make_current_context;
break;
}
default:
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);
return false;

@ -1609,7 +1609,6 @@ static const video_poke_interface_t exynos_poke_interface = {
NULL, /* get_current_framebuffer */
#endif
NULL, /* get_proc_address */
NULL, /* make_current_context */
exynos_set_aspect_ratio,
exynos_apply_state_changes,
#ifdef HAVE_MENU

@ -3088,21 +3088,12 @@ static struct video_shader *gl_get_current_shader(void *data)
return (gl && gl->shader) ? gl->shader->get_current_shader() : NULL;
}
static void gl_make_current_context(void *data)
{
gl_t *gl = (gl_t*)data;
if (gl && gl->ctx_driver->make_current_context)
gl->ctx_driver->make_current_context(gl);
}
static const video_poke_interface_t gl_poke_interface = {
NULL,
#ifdef HAVE_FBO
gl_get_current_framebuffer,
#endif
gl_get_proc_address,
gl_make_current_context,
gl_set_aspect_ratio,
gl_apply_state_changes,
#if defined(HAVE_MENU)

@ -721,7 +721,6 @@ static video_poke_interface_t sdl2_video_poke_interface = {
#ifdef HAVE_FBO
NULL,
#endif
NULL,
NULL,
sdl2_poke_set_aspect_ratio,
sdl2_poke_apply_state_changes,

@ -316,16 +316,6 @@ static gfx_ctx_proc_t android_gfx_ctx_get_proc_address(
return ret;
}
static void android_gfx_ctx_make_current_context(void *data)
{
gfx_ctx_android_data_t *android = (gfx_ctx_android_data_t*)
driver.video_context_data;
if (android)
eglMakeCurrent(android->g_egl_dpy, android->g_egl_surf,
android->g_egl_surf, android->g_egl_hw_ctx);
}
static bool android_gfx_ctx_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
@ -400,7 +390,6 @@ const gfx_ctx_driver_t gfx_ctx_android = {
android_gfx_ctx_swap_buffers,
android_gfx_ctx_input_driver,
android_gfx_ctx_get_proc_address,
android_gfx_ctx_make_current_context,
#ifdef HAVE_EGL
NULL,
NULL,

@ -398,14 +398,6 @@ static gfx_ctx_proc_t gfx_ctx_qnx_get_proc_address(const char *symbol)
return ret;
}
static void gfx_ctx_qnx_make_current_context(void *data)
{
(void)data;
eglMakeCurrent(g_egl_dpy, g_egl_surf,
g_egl_surf, g_egl_hw_ctx);
}
static bool gfx_ctx_qnx_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
@ -469,7 +461,6 @@ const gfx_ctx_driver_t gfx_ctx_bbqnx = {
gfx_ctx_qnx_swap_buffers,
gfx_ctx_qnx_input_driver,
gfx_ctx_qnx_get_proc_address,
gfx_ctx_qnx_make_current_context,
#ifdef HAVE_EGL
NULL,
NULL,

@ -898,15 +898,6 @@ static gfx_ctx_proc_t gfx_ctx_drm_egl_get_proc_address(const char *symbol)
return eglGetProcAddress(symbol);
}
static void gfx_ctx_drm_egl_make_current_context(void *data)
{
gfx_ctx_drm_egl_data_t *drm = (gfx_ctx_drm_egl_data_t*)data;
if (drm)
eglMakeCurrent(drm->g_egl_dpy, drm->g_egl_surf,
drm->g_egl_surf, drm->g_egl_hw_ctx);
}
static bool gfx_ctx_drm_egl_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
@ -976,7 +967,6 @@ const gfx_ctx_driver_t gfx_ctx_drm_egl = {
gfx_ctx_drm_egl_swap_buffers,
gfx_ctx_drm_egl_input_driver,
gfx_ctx_drm_egl_get_proc_address,
gfx_ctx_drm_egl_make_current_context,
NULL,
NULL,
NULL,

@ -150,7 +150,6 @@ const gfx_ctx_driver_t gfx_ctx_null = {
gfx_ctx_null_swap_buffers,
gfx_ctx_null_input_driver,
NULL,
NULL,
#ifdef HAVE_EGL
NULL,
NULL,

@ -686,15 +686,6 @@ static gfx_ctx_proc_t gfx_ctx_glx_get_proc_address(const char *symbol)
return glXGetProcAddress((const GLubyte*)symbol);
}
static void gfx_ctx_glx_make_current_context(void *data)
{
gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)driver.video_context_data;
if (glx)
glXMakeContextCurrent(glx->g_dpy, glx->g_glx_win,
glx->g_glx_win, glx->g_use_hw_ctx ? glx->g_hw_ctx : glx->g_ctx);
}
static bool gfx_ctx_glx_bind_api(void *data, enum gfx_ctx_api api,
unsigned major, unsigned minor)
{
@ -752,7 +743,6 @@ const gfx_ctx_driver_t gfx_ctx_glx = {
gfx_ctx_glx_swap_buffers,
gfx_ctx_glx_input_driver,
gfx_ctx_glx_get_proc_address,
gfx_ctx_glx_make_current_context,
#ifdef HAVE_EGL
NULL,
NULL,

@ -285,12 +285,6 @@ static gfx_ctx_proc_t gfx_ctx_mali_fbdev_get_proc_address(const char *symbol)
return ret;
}
static void gfx_ctx_mali_fbdev_make_current_context(void *data)
{
/* FIXME : Hookup bind_hw_render */
eglMakeCurrent(g_egl_dpy, g_egl_surf, g_egl_surf, g_egl_ctx);
}
static bool gfx_ctx_mali_fbdev_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
@ -334,7 +328,6 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = {
gfx_ctx_mali_fbdev_swap_buffers,
gfx_ctx_mali_fbdev_input_driver,
gfx_ctx_mali_fbdev_get_proc_address,
gfx_ctx_mali_fbdev_make_current_context,
#ifdef HAVE_EGL
NULL,
NULL,

@ -390,7 +390,6 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = {
gfx_ctx_ps3_input_driver,
NULL,
NULL,
NULL,
"ps3",
};

@ -407,12 +407,6 @@ static gfx_ctx_proc_t sdl_ctx_get_proc_address(const char *name)
return (gfx_ctx_proc_t)SDL_GL_GetProcAddress(name);
}
static void sdl_ctx_make_current_context(void *data)
{
/* TODO/FIXME: implement */
(void)data;
}
static void sdl_ctx_show_mouse(void *data, bool state)
{
(void)data;
@ -437,7 +431,6 @@ const gfx_ctx_driver_t gfx_ctx_sdl_gl =
sdl_ctx_swap_buffers,
sdl_ctx_input_driver,
sdl_ctx_get_proc_address,
sdl_ctx_make_current_context,
#ifdef HAVE_EGL
NULL,
NULL,

@ -442,13 +442,6 @@ static gfx_ctx_proc_t gfx_ctx_vc_get_proc_address(const char *symbol)
return eglGetProcAddress(symbol);
}
static gfx_ctx_proc_t gfx_ctx_vc_make_current_context(void *data)
{
(void)data;
eglMakeCurrent(g_egl_dpy, g_egl_surf, g_egl_surf, g_egl_hw_ctx);
}
static float gfx_ctx_vc_translate_aspect(void *data,
unsigned width, unsigned height)
{
@ -613,7 +606,6 @@ const gfx_ctx_driver_t gfx_ctx_videocore = {
gfx_ctx_vc_swap_buffers,
gfx_ctx_vc_input_driver,
gfx_ctx_vc_get_proc_address,
gfx_ctx_vc_make_current_context,
gfx_ctx_vc_init_egl_image_buffer,
gfx_ctx_vc_write_egl_image,
NULL,

@ -270,13 +270,6 @@ static gfx_ctx_proc_t gfx_ctx_vivante_get_proc_address(const char *symbol)
return ret;
}
static void gfx_ctx_vivante_make_current_context(void *data)
{
/* TODO/FIXME: Implement bind_hw_render */
(void)data;
eglMakeCurrent(g_egl_dpy, g_egl_surf, g_egl_surf, g_egl_ctx);
}
static bool gfx_ctx_vivante_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
@ -320,7 +313,6 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = {
gfx_ctx_vivante_swap_buffers,
gfx_ctx_vivante_input_driver,
gfx_ctx_vivante_get_proc_address,
gfx_ctx_vivante_make_current_context,
#ifdef HAVE_EGL
NULL,
NULL,

@ -682,15 +682,6 @@ static gfx_ctx_proc_t gfx_ctx_wl_get_proc_address(const char *symbol)
return eglGetProcAddress(symbol);
}
static void gfx_ctx_wl_make_current_context(void *data)
{
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
if (wl)
eglMakeCurrent(wl->g_egl_dpy, wl->g_egl_surf, wl->g_egl_surf,
wl->g_egl_hw_ctx);
}
static bool gfx_ctx_wl_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
@ -899,7 +890,6 @@ const gfx_ctx_driver_t gfx_ctx_wayland = {
gfx_ctx_wl_swap_buffers,
gfx_ctx_wl_input_driver,
gfx_ctx_wl_get_proc_address,
gfx_ctx_wl_make_current_context,
NULL,
NULL,
NULL,

@ -652,12 +652,6 @@ static gfx_ctx_proc_t gfx_ctx_wgl_get_proc_address(const char *symbol)
return (gfx_ctx_proc_t)GetProcAddress(dll_handle, symbol);
}
static void gfx_ctx_wgl_make_current_context(void *data)
{
(void)data;
wglMakeCurrent(g_hdc, g_hw_hrc);
}
static bool gfx_ctx_wgl_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
@ -700,7 +694,6 @@ const gfx_ctx_driver_t gfx_ctx_wgl = {
gfx_ctx_wgl_swap_buffers,
gfx_ctx_wgl_input_driver,
gfx_ctx_wgl_get_proc_address,
gfx_ctx_wgl_make_current_context,
gfx_ctx_wgl_show_mouse,
"wgl",
gfx_ctx_wgl_bind_hw_render,

@ -742,12 +742,6 @@ static gfx_ctx_proc_t gfx_ctx_xegl_get_proc_address(const char *symbol)
return eglGetProcAddress(symbol);
}
static void gfx_ctx_xegl_make_current_context(void *data)
{
eglMakeCurrent(g_egl_dpy, g_egl_surf,
g_egl_surf, g_egl_hw_ctx);
}
static bool gfx_ctx_xegl_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
@ -815,7 +809,6 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = {
gfx_ctx_xegl_swap_buffers,
gfx_ctx_xegl_input_driver,
gfx_ctx_xegl_get_proc_address,
gfx_ctx_xegl_make_current_context,
NULL,
NULL,
gfx_ctx_xegl_show_mouse,

@ -110,8 +110,6 @@ typedef struct gfx_ctx_driver
* Does not take opaque, to avoid lots of ugly wrapper code. */
gfx_ctx_proc_t (*get_proc_address)(const char*);
void (*make_current_context)(void *data);
#ifdef HAVE_EGL
/* Returns true if this context supports EGLImage buffers for
* screen drawing and was initalized correctly. */

@ -226,12 +226,6 @@ retro_proc_address_t video_driver_get_proc_address(const char *sym)
return NULL;
}
void video_driver_make_current_context(void)
{
if (driver.video_poke && driver.video_poke->make_current_context)
driver.video_poke->make_current_context(driver.video_data);
}
bool video_driver_is_alive(void)
{
/* Possible race issue, return true */

@ -97,7 +97,6 @@ typedef struct video_poke_interface
uintptr_t (*get_current_framebuffer)(void *data);
#endif
retro_proc_address_t (*get_proc_address)(void *data, const char *sym);
void (*make_current_context)(void *data);
void (*set_aspect_ratio)(void *data, unsigned aspectratio_index);
void (*apply_state_changes)(void *data);
@ -248,8 +247,6 @@ uintptr_t video_driver_get_current_framebuffer(void);
retro_proc_address_t video_driver_get_proc_address(const char *sym);
void video_driver_make_current_context(void);
bool video_driver_is_alive(void);
bool video_driver_has_focus(void);

@ -855,7 +855,6 @@ static const video_poke_interface_t thread_poke = {
#ifdef HAVE_FBO
NULL,
#endif
NULL,
NULL,
thread_set_aspect_ratio,
thread_apply_state_changes,

@ -852,10 +852,6 @@ enum retro_mod
* It can be used by the core for localization purposes.
*/
#define RETRO_ENVIRONMENT_MAKE_CURRENT_CONTEXT (40 | RETRO_ENVIRONMENT_EXPERIMENTAL)
/* struct retro_hw_make_current_context_callback *
*/
#define RETRO_MEMDESC_CONST (1 << 0) /* The frontend will never change this memory area once retro_load_game has returned. */
#define RETRO_MEMDESC_BIGENDIAN (1 << 1) /* The memory area contains big endian data. Default is little endian. */
#define RETRO_MEMDESC_ALIGN_2 (1 << 16) /* All memory access in this area is aligned to their own size, or 2, whichever is smaller. */
@ -1471,15 +1467,6 @@ enum retro_hw_context_type
RETRO_HW_CONTEXT_DUMMY = INT_MAX
};
/* Call video context driver's 'make current context' function */
typedef void (*retro_hw_make_current_context)(void);
struct retro_hw_make_current_context_callback
{
/* Set by frontend. */
retro_hw_make_current_context make_current_context;
};
struct retro_hw_render_callback
{
/* Which API to use. Set by libretro core. */