Bug 94458

Summary: dEQP-GLES3.functional.state_query.fbo.framebuffer_attachment_x_size_initial fails
Product: Mesa Reporter: Kenneth Graunke <kenneth>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 94448    

Description Kenneth Graunke 2016-03-09 02:01:58 UTC
dEQP-GLES3.functional.state_query.fbo.framebuffer_attachment_x_size_initial queries GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE on the window system depth buffer, and expects to get a proper value (16, 24, 32); we are incorrectly returning 0.

intel_alloc_private_renderbuffer_storage does:

   rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);

Here, internalFormat is GL_DEPTH_COMPONENT.  _mesa_base_fbo_format only returns GL_DEPTH_COMPONENT in desktop GL.  In ES, it returns 0.

So, we don't get a proper rb->_BaseFormat set, and this makes the query fail.
Comment 1 Kenneth Graunke 2016-03-09 04:19:19 UTC
I'm testing a patch for this.  I think we can just do _mesa_get_format_base_format() instead.
Comment 2 Kenneth Graunke 2016-03-09 04:51:24 UTC
Patch on mailing list (no piglit regressions, fixes the deqp test):
https://lists.freedesktop.org/archives/mesa-dev/2016-March/109464.html
Comment 3 Kenneth Graunke 2016-03-10 19:29:04 UTC
commit 9ea00c6f6b2924befe41f6ef55244e6aa20c702a
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Tue Mar 8 20:00:06 2016 -0800

    i965: Set a proper _BaseFormat for window system renderbuffers in ES.

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.