diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-10 07:24:19 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-10 07:24:19 +0000 |
commit | 569bdf4a3c734a1b3812b1a25008075ee2d913e9 (patch) | |
tree | e453d27ad98ff75479119f7596aea9cc859d4dc4 | |
parent | 629d0ec617aded8618a130b65382d78e7302d283 (diff) | |
parent | 691b44d51b02a1b4fc6fd00605e5dd6098d217b9 (diff) | |
download | device_generic_goldfish-opengl-569bdf4a3c734a1b3812b1a25008075ee2d913e9.tar.gz device_generic_goldfish-opengl-569bdf4a3c734a1b3812b1a25008075ee2d913e9.tar.bz2 device_generic_goldfish-opengl-569bdf4a3c734a1b3812b1a25008075ee2d913e9.zip |
Snap for 4773106 from 691b44d51b02a1b4fc6fd00605e5dd6098d217b9 to pi-release
Change-Id: I05c05a22f2527ef85bce431f1a2af97b10d20730
-rw-r--r-- | system/GLESv1/gl.cpp | 30 | ||||
-rw-r--r-- | system/GLESv2/gl2.cpp | 28 | ||||
-rw-r--r-- | system/egl/egl.cpp | 10 |
3 files changed, 34 insertions, 34 deletions
diff --git a/system/GLESv1/gl.cpp b/system/GLESv1/gl.cpp index 2020a725..6e07004e 100644 --- a/system/GLESv1/gl.cpp +++ b/system/GLESv1/gl.cpp @@ -86,27 +86,31 @@ void glEGLImageTargetTexture2DOES(void * self, GLenum target, GLeglImageOES img) } } -void glEGLImageTargetRenderbufferStorageOES(void *self, GLenum target, GLeglImageOES image) +void glEGLImageTargetRenderbufferStorageOES(void *self, GLenum target, GLeglImageOES img) { (void)self; (void)target; - DBG("glEGLImageTargetRenderbufferStorageOES v1 target=%#x image=%p", - target, image); + DBG("glEGLImageTargetRenderbufferStorageOES v1 image=%p\n", img); //TODO: check error - we don't have a way to set gl error - android_native_buffer_t* native_buffer = ((EGLImage_t*)image)->native_buffer; + EGLImage_t *image = (EGLImage_t*)img; - if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) { - return; - } + if (image->target == EGL_NATIVE_BUFFER_ANDROID) { + android_native_buffer_t* native_buffer = ((EGLImage_t*)image)->native_buffer; - if (native_buffer->common.version != sizeof(android_native_buffer_t)) { - return; - } + if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) { + return; + } - DEFINE_AND_VALIDATE_HOST_CONNECTION(); - rcEnc->rcBindRenderbuffer(rcEnc, - ((cb_handle_t *)(native_buffer->handle))->hostHandle); + if (native_buffer->common.version != sizeof(android_native_buffer_t)) { + return; + } + + DEFINE_AND_VALIDATE_HOST_CONNECTION(); + rcEnc->rcBindRenderbuffer(rcEnc, ((cb_handle_t *)(native_buffer->handle))->hostHandle); + } else { + //TODO + } return; } diff --git a/system/GLESv2/gl2.cpp b/system/GLESv2/gl2.cpp index 283bd95f..331da78a 100644 --- a/system/GLESv2/gl2.cpp +++ b/system/GLESv2/gl2.cpp @@ -88,25 +88,31 @@ void glEGLImageTargetTexture2DOES(void * self, GLenum target, GLeglImageOES img) } } -void glEGLImageTargetRenderbufferStorageOES(void *self, GLenum target, GLeglImageOES image) +void glEGLImageTargetRenderbufferStorageOES(void *self, GLenum target, GLeglImageOES img) { (void)self; (void)target; - DBG("glEGLImageTargetRenderbufferStorageOES v2 image=%p\n", image); + DBG("glEGLImageTargetRenderbufferStorageOES v2 image=%p\n", img); //TODO: check error - we don't have a way to set gl error - android_native_buffer_t* native_buffer = ((EGLImage_t*)image)->native_buffer; + EGLImage_t *image = (EGLImage_t*)img; - if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) { - return; - } + if (image->target == EGL_NATIVE_BUFFER_ANDROID) { + android_native_buffer_t* native_buffer = ((EGLImage_t*)image)->native_buffer; - if (native_buffer->common.version != sizeof(android_native_buffer_t)) { - return; - } + if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) { + return; + } - DEFINE_AND_VALIDATE_HOST_CONNECTION(); - rcEnc->rcBindRenderbuffer(rcEnc, ((cb_handle_t *)(native_buffer->handle))->hostHandle); + if (native_buffer->common.version != sizeof(android_native_buffer_t)) { + return; + } + + DEFINE_AND_VALIDATE_HOST_CONNECTION(); + rcEnc->rcBindRenderbuffer(rcEnc, ((cb_handle_t *)(native_buffer->handle))->hostHandle); + } else { + //TODO + } return; } diff --git a/system/egl/egl.cpp b/system/egl/egl.cpp index 395deadc..16285f9e 100644 --- a/system/egl/egl.cpp +++ b/system/egl/egl.cpp @@ -1469,16 +1469,6 @@ EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_c RETURN_ERROR(EGL_NO_CONTEXT,EGL_BAD_ATTRIBUTE); } break; - case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR: - switch (attrib_val) { - case EGL_NO_RESET_NOTIFICATION_KHR: - case EGL_LOSE_CONTEXT_ON_RESET_KHR: - break; - default: - RETURN_ERROR(EGL_NO_CONTEXT,EGL_BAD_ATTRIBUTE); - } - reset_notification_strategy = attrib_val; - break; case EGL_CONTEXT_PRIORITY_LEVEL_IMG: // According to the spec, we are allowed not to honor this hint. // https://www.khronos.org/registry/EGL/extensions/IMG/EGL_IMG_context_priority.txt |