mirror of
https://github.com/libretro/RetroArch
synced 2025-02-01 09:32:58 +00:00
Revert "(EMSCRIPTEN) add shared context support"
This reverts commit 96feb074d085977345fe11363a1844136303ab68.
This commit is contained in:
parent
96feb074d0
commit
7dfb9d0437
@ -57,8 +57,7 @@ HAVE_SDL = 0
|
|||||||
HAVE_ZLIB = 1
|
HAVE_ZLIB = 1
|
||||||
HAVE_FBO = 1
|
HAVE_FBO = 1
|
||||||
WANT_MINIZ = 1
|
WANT_MINIZ = 1
|
||||||
#MEMORY = 67108864
|
MEMORY = 67108864
|
||||||
MEMORY = 134217728
|
|
||||||
LTO = 0
|
LTO = 0
|
||||||
# XXX: setting this to 1/2 currently crashes Firefox nightly
|
# XXX: setting this to 1/2 currently crashes Firefox nightly
|
||||||
PRECISE_F32 = 0
|
PRECISE_F32 = 0
|
||||||
|
@ -32,14 +32,12 @@
|
|||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
#include <EGL/eglext.h>
|
#include <EGL/eglext.h>
|
||||||
|
|
||||||
static EGLContext g_egl_hw_ctx;
|
|
||||||
static EGLContext g_egl_ctx;
|
static EGLContext g_egl_ctx;
|
||||||
static EGLSurface g_egl_surf;
|
static EGLSurface g_egl_surf;
|
||||||
static EGLDisplay g_egl_dpy;
|
static EGLDisplay g_egl_dpy;
|
||||||
static EGLConfig g_config;
|
static EGLConfig g_config;
|
||||||
|
|
||||||
static bool g_inited;
|
static bool g_inited;
|
||||||
static bool g_use_hw_ctx;
|
|
||||||
|
|
||||||
static unsigned g_fb_width;
|
static unsigned g_fb_width;
|
||||||
static unsigned g_fb_height;
|
static unsigned g_fb_height;
|
||||||
@ -155,16 +153,6 @@ static bool gfx_ctx_init(void *data)
|
|||||||
if (!g_egl_ctx)
|
if (!g_egl_ctx)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (g_use_hw_ctx)
|
|
||||||
{
|
|
||||||
g_egl_hw_ctx = eglCreateContext(g_egl_dpy, g_config, g_egl_ctx,
|
|
||||||
context_attributes);
|
|
||||||
RARCH_LOG("[VC/EGL]: Created shared context: %p.\n", (void*)g_egl_hw_ctx);
|
|
||||||
|
|
||||||
if (g_egl_hw_ctx == EGL_NO_CONTEXT)
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
// create an EGL window surface
|
// create an EGL window surface
|
||||||
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, 0, NULL);
|
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, 0, NULL);
|
||||||
if (!g_egl_surf)
|
if (!g_egl_surf)
|
||||||
@ -283,14 +271,6 @@ static bool gfx_ctx_write_egl_image(void *data, const void *frame, unsigned widt
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_ctx_bind_hw_render(void *data, bool enable)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
g_use_hw_ctx = enable;
|
|
||||||
if (g_egl_dpy && g_egl_surf)
|
|
||||||
eglMakeCurrent(g_egl_dpy, g_egl_surf, g_egl_surf, enable ? g_egl_hw_ctx : g_egl_ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
const gfx_ctx_driver_t gfx_ctx_emscripten = {
|
const gfx_ctx_driver_t gfx_ctx_emscripten = {
|
||||||
gfx_ctx_init,
|
gfx_ctx_init,
|
||||||
gfx_ctx_destroy,
|
gfx_ctx_destroy,
|
||||||
@ -310,5 +290,4 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = {
|
|||||||
gfx_ctx_write_egl_image,
|
gfx_ctx_write_egl_image,
|
||||||
NULL,
|
NULL,
|
||||||
"emscripten",
|
"emscripten",
|
||||||
gfx_ctx_bind_hw_render,
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user