OSDN Git Service

Revert "GL2Encoder: Do not forward GLES API version queries"
authorLingfeng Yang <lfy@google.com>
Fri, 2 Dec 2016 17:43:01 +0000 (17:43 +0000)
committerLingfeng Yang <lfy@google.com>
Fri, 2 Dec 2016 17:43:01 +0000 (17:43 +0000)
This reverts commit dadc6b152a14c98bb49ce9848078a6c8bce9bf9f.

dEQP-GLES2.functional.fbo.completeness.renderable.renderbuffer.color0.rgb10_a2 Pass -> Fail

I will provide a proper fix for this; since we are supporting GLESv3, adding the client version to the tracked state and selectively rejecting such formats with GL_FRAMEBUFFER_UNSUPPORTED.

Change-Id: Id7fc205b6ddd46fa72c62cd9a8c67cadee78d46d

system/GLESv2_enc/GL2Encoder.cpp

index 075523b..544c8cc 100755 (executable)
@@ -33,16 +33,12 @@ static GLubyte *gRendererString= (GLubyte *) "Android HW-GLES 2.0";
 static GLubyte *gVersionString= (GLubyte *) "OpenGL ES 2.0";
 static GLubyte *gExtensionsString= (GLubyte *) "GL_OES_EGL_image_external ";
 
-#define SET_ERROR(err) {                            \
+#define SET_ERROR_IF(condition,err) if((condition)) {                            \
         ALOGE("%s:%s:%d GL error 0x%x\n", __FILE__, __FUNCTION__, __LINE__, err); \
         ctx->setError(err);                                    \
         return;                                                  \
     }
 
-#define SET_ERROR_IF(condition,err) if((condition)) {                            \
-        SET_ERROR(err)                                                           \
-    }
-
 
 #define RET_AND_SET_ERROR_IF(condition,err,ret) if((condition)) {                \
         ALOGE("%s:%s:%d GL error 0x%x\n", __FILE__, __FUNCTION__, __LINE__, err); \
@@ -309,12 +305,6 @@ void GL2Encoder::s_glGetIntegerv(void *self, GLenum param, GLint *ptr)
     GLClientState* state = ctx->m_state;
 
     switch (param) {
-    case GL_MAJOR_VERSION:
-    case GL_MINOR_VERSION:
-        // These two parameters are not supported by GLESv2
-        // TODO: Set *ptr appropriately when GLESv3 support is ready
-        SET_ERROR(GL_INVALID_ENUM);
-
     case GL_NUM_SHADER_BINARY_FORMATS:
         *ptr = 0;
         break;