Bug 99076

Summary: dEQP-GLES3.functional.negative_api.texture#teximage3d fails due to wrong Error code
Product: Mesa Reporter: Randy <randy.xu>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED NOTOURBUG QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: chadversary, gary.c.wang
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 94448    

Description Randy 2016-12-14 02:26:00 UTC
<Section Name="" Description="GL_INVALID_OPERATION is generated if target is GL_TEXTURE_3D and format is GL_DEPTH_COMPONENT, or GL_DEPTH_STENCIL.">
<Text>glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 1, 1, 1, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_BYTE, 0);</Text>
<Text>glGetError();</Text>
<Text>// GL_INVALID_ENUM returned</Text>
<Text>// ERROR: expected GL_INVALID_OPERATION</Text>
<Text>glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 1, 1, 1, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, 0);</Text>
<Text>glGetError();</Text>
<Text>// GL_INVALID_OPERATION returned</Text>


/* From OpenGL 3.3 spec, page 220:
"If the format is DEPTH_STENCIL, then values are taken from
both the depth buffer and the stencil buffer. If there is no
depth buffer or if there is no stencil buffer, then the error
INVALID_OPERATION occurs. If the type parameter is not
UNSIGNED_INT_24_8 or FLOAT_32_UNSIGNED_INT_24_8_REV, then the
error INVALID_ENUM occurs."
*
OpenGL ES still generates GL_INVALID_OPERATION because glReadPixels
cannot be used to read depth or stencil in that API.
*/

Mesa master: da3389a331b07d3e58aa9ad8df6864cc04f877e4
dEQP master: b28ca98dd64d74475f78ac4b19309fc41076d26e
Comment 1 Randy 2016-12-21 02:41:34 UTC
The patch https://android-review.googlesource.com/#/c/291429/ for GLES3.1 has been merged to dEQP master branch, so expect the GLES3 change should be merged also. 

In this case, we don’t need Mesa patch, close the bug
Comment 2 Chad Versace 2016-12-22 19:38:08 UTC
(In reply to Randy from comment #1)
> The patch https://android-review.googlesource.com/#/c/291429/ for GLES3.1
> has been merged to dEQP master branch, so expect the GLES3 change should be
> merged also. 

The dEQP maitainers won't automatically port the fix to GLES3. So I submitted the patch to the aosp/master branch [https://android-review.googlesource.com/#/c/317196/] and requested they cherry pick it to the nougat branches too.

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.