diff options
Diffstat (limited to 'opengl/libs')
-rw-r--r-- | opengl/libs/Android.mk | 2 | ||||
-rw-r--r-- | opengl/libs/EGL/egl.cpp | 8 | ||||
-rw-r--r-- | opengl/libs/EGL/gpu.cpp | 5 |
3 files changed, 11 insertions, 4 deletions
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk index 5ba6b76..23304d5 100644 --- a/opengl/libs/Android.mk +++ b/opengl/libs/Android.mk @@ -39,7 +39,7 @@ LOCAL_SRC_FILES:= \ GLES_CM/gl.cpp.arm \ # -LOCAL_SHARED_LIBRARIES += libcutils libutils libui libEGL +LOCAL_SHARED_LIBRARIES += libcutils libEGL LOCAL_LDLIBS := -lpthread -ldl LOCAL_MODULE:= libGLESv1_CM diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 25e31ee..de323b3 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -1052,23 +1052,25 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, if (!validate_display_context(dpy, ctx)) return EGL_FALSE; + EGLSurface impl_draw = EGL_NO_SURFACE; + EGLSurface impl_read = EGL_NO_SURFACE; egl_context_t * const c = get_context(ctx); if (draw != EGL_NO_SURFACE) { egl_surface_t const * d = get_surface(draw); if (!d) return setError(EGL_BAD_SURFACE, EGL_FALSE); if (d->impl != c->impl) return setError(EGL_BAD_MATCH, EGL_FALSE); - draw = d->surface; + impl_draw = d->surface; } if (read != EGL_NO_SURFACE) { egl_surface_t const * r = get_surface(read); if (!r) return setError(EGL_BAD_SURFACE, EGL_FALSE); if (r->impl != c->impl) return setError(EGL_BAD_MATCH, EGL_FALSE); - read = r->surface; + impl_read = r->surface; } EGLBoolean result = c->cnx->hooks->egl.eglMakeCurrent( - dp->dpys[c->impl], draw, read, c->context); + dp->dpys[c->impl], impl_draw, impl_read, c->context); if (result == EGL_TRUE) { setGlThreadSpecific(c->cnx->hooks); diff --git a/opengl/libs/EGL/gpu.cpp b/opengl/libs/EGL/gpu.cpp index f9dc5f1..4c902c8 100644 --- a/opengl/libs/EGL/gpu.cpp +++ b/opengl/libs/EGL/gpu.cpp @@ -118,6 +118,11 @@ request_gpu_t* gpu_acquire(void* user) return 0; } + if (info.regs == 0) { + LOGD("requestGPU() failed"); + return 0; + } + bool failed = false; request_gpu_t* gpu = &gRegions; memset(gpu, 0, sizeof(*gpu)); |