We recently added HDR render target support to our mobile renderer and had some trouble with Adreno 4xx+ devices. At the moment we are asking EGL for an OGLES 2.0 context and using the OGLES 2.0 extensions: GL_oes_texture_half_float, GL_oes_texture_half_float_linear, and GL_ext_color_buffer_half_float. We create our fp16 render target using the following: glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, wd, ht, 0, GL_RGBA, GL_HALF_FLOAT_OES, ptr ); This works fine on iOS, NVidia, Mali, PowerVR, and Adreno 3xx GPUs, but on Adreno 4xx+ I get an FRAMEBUFFER_INCOMPLETE_ATTACHMENT error when attaching the texture to an FBO. After looking at the OGLES 3.0 documentation I changed the internalFormat and format of the glTexImage2D api call to GL_RGBA16F, GL_HALF_FLOAT and everything worked fine. I ended up using these parameters on all android devices that support ES 3.0+, but it seems to me that if I request a ES 2.0 context and rely on the ES 2.0 extension GL_oes_texture_half_float then the ES 2.0 method of creating the texture should work fine (which it does on the older Adreno 3xx devices), seems like an oversight in the new ES 3.1 driver. Honestly the whole ES 3.x is a super-set of ES 2.0 gets muddy when using extensions.
GL_oes_texture_half_float + GL_ext_color_buffer_half_float OpenGLES 3.1 driver bug
Posted: Tue, 2016-05-31 13:14
We're investigating this, but after an initial look, you may be correct about those 2.0 extensions not being available in our ES 3.1 driver. Hoping your workaround is sufficent.
Also we'd recommend using glTexStorage instead of glTexImage for performance reasons.