Bug 107989

Summary: GLES 3.x context: GL_INVALID_OPERATION in glGenerateMipmap(invalid internal format GL_RED)
Product: Mesa Reporter: Andrei Alexeyev <0x416b617269>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED NOTABUG QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: 18.2   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Andrei Alexeyev 2018-09-19 09:30:24 UTC
Trying to call glGenerateMipmap on a texture with the internal format of GL_RED in an OpenGL ES 3.x context produces a GL_INVALID_OPERATION error. Explicitly sized formats such as GL_R8 work, and so do other formats with no size specified, such as GL_RGBA. Core context is not affected. Tested with the radeonsi and llvmpipe drivers.
Comment 1 Tapani Pälli 2018-09-19 10:07:24 UTC
For me it seems this behavior is according to the OpenGL ES spec:

"An INVALID_OPERATION error is generated if the level base array was not
specified with an unsized internal format from table 8.3 or a sized internal for-
mat that is both color-renderable and texture-filterable according to table 8.10."

Table 8.3 does not list GL_RED.
Comment 2 Andrei Alexeyev 2018-09-19 18:33:56 UTC
@Tapani Pälli: yes, you seem to be right. I somehow missed this bit. Sorry for the false alarm. I guess it's ANGLE exhibiting non-conformant behavior, then (unless it's covered by some extension that I'm not aware of).

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.