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.
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.
I'm testing a patch for this. I think we can just do _mesa_get_format_base_format() instead.
Patch on mailing list (no piglit regressions, fixes the deqp test):
Author: Kenneth Graunke <email@example.com>
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.