When resolving the HiZ buffer Mesa uses the meta API with some internal GL calls. However when using GLES this fails because it tries to bind a renderbuffer to GL_DRAW_FRAMEBUFFER but Mesa asserts that this binding point is only used when the API is GL. I'm attaching a patch but I'm not sure if it's the best solution because I've copied the condition for whether GL_DRAW_FRAMEBUFFER is allowed into gen6_hiz.c. This could be quite awkward to maintain. For example if Mesa ever gets support for the GL_ANGLE_framebuffer_blit extension then we'd have to remember to change this check in two places. I wonder if the check should just be removed instead? Mesa already lets you bind to GL_DRAW_FRAMEBUFFER, just not add a renderbuffer so it's already not completely validated.
Created attachment 54010 [details] Test case
Created attachment 54011 [details] [review] gen6_hiz: Don't bind GL_DRAW_FRAMEBUFFER on GLES When using Mesa with a GLES API, calling _mesa_FramebufferRenderbuffer with GL_DRAW_FRAMEBUFFER will report a 'user error' because get_framebuffer_target validates that this enum from the framebuffer blit extension is only used on GL. To work around it this patch makes it use the GL_FRAMEBUFFER enum instead in that case.
I made a modification to the patch, and posted it to mesa-dev for review. http://article.gmane.org/gmane.comp.video.mesa3d.devel/35980
Mark RESOLVED/FIXED. My change to the patch broke it because I wrongly assumed that the extension bit for EXT_framebuffer_blit was off in an ES context, since the extension doesn't exist there. But that's not how Mesa's extension works, which I should have known; I plumbed it before. Neil, your original patch has been pushed to the master and 8.0 branches. master: 9462b8447864c754252cd2580c9e1e4d36d5cc63 8.0: 399b9799de9980b8ebc0ba46304be207b28b7825
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.