diff options
| author | 2016-12-12 08:53:56 +0000 | |
|---|---|---|
| committer | 2016-12-12 08:53:56 +0000 | |
| commit | 75b45262f333704723bedca9b2e8897725a9f59b (patch) | |
| tree | cff646ee7797b4ba08a0f492324b9520c1458122 | |
| parent | 0f70df22c1b950aeacb6edd3d2396a6439674643 (diff) | |
| parent | f48a46f167b0032e1c2b27878022679a101a927a (diff) | |
Allow both RENDER and TEXTURE flags when creating native client buffers. am: 304f78173f
am: f48a46f167
Change-Id: I696fd5adabe200d623d7dfff2ce9f0f40184891e
| -rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 6 | ||||
| -rw-r--r-- | opengl/specs/EGL_ANDROID_create_native_client_buffer.txt | 11 |
2 files changed, 2 insertions, 15 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 3d3df766a8..8d9fa5a2f7 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -1847,12 +1847,6 @@ EGLClientBuffer eglCreateNativeClientBufferANDROID(const EGLint *attrib_list) if (value & EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID) { usage |= GRALLOC_USAGE_HW_TEXTURE; } - // The buffer must be used for either a texture or a - // renderbuffer. - if ((value & EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID) && - (value & EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID)) { - return setError(EGL_BAD_PARAMETER, (EGLClientBuffer)0); - } break; default: return setError(EGL_BAD_PARAMETER, (EGLClientBuffer)0); diff --git a/opengl/specs/EGL_ANDROID_create_native_client_buffer.txt b/opengl/specs/EGL_ANDROID_create_native_client_buffer.txt index 9b2bbbcb92..4c5551ca61 100644 --- a/opengl/specs/EGL_ANDROID_create_native_client_buffer.txt +++ b/opengl/specs/EGL_ANDROID_create_native_client_buffer.txt @@ -129,12 +129,10 @@ Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors) desirable) do not route the entire composition to the external sink. EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID: The buffer will be - used to create a renderbuffer. This flag must not be set if - EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID is set. + used to create a color-renderable texture. EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID: The buffer will be used to - create a texture. This flag must not be set if - EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID is set. + create a filterable texture. Errors @@ -154,11 +152,6 @@ Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors) with the value of EGL_FORMAT, the error EGL_BAD_PARAMETER is Generated. - * If both the EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID and - EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID are set in the value of - EGL_NATIVE_BUFFER_USAGE_ANDROID, the error EGL_BAD_PARAMETER is - Generated." - Issues 1. Should this extension define what combinations of formats and usage flags |