[Bug 94847] [ES3.1CTS] es31-cts.draw_buffers_indexed.color_masks fails

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 6 21:34:54 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=94847

--- Comment #2 from Kenneth Graunke <kenneth at whitecape.org> ---
I believe I've tracked down the problem.

The application is binding multiple draw buffers.  Each draw buffer has
associated color mask and blending state.  (In Mesa, ctx->Color.ColorMask[i]
corresponds to the color mask for GL_DRAW_BUFFERi.)

It then calls glClearBufferfv to clear an individual draw buffer.  This is
handled by _mesa_meta_glsl_Clear (fast clears are skipped due to color
masking).  In order to clear a single draw buffer,
_mesa_meta_drawbuffers_from_bitfield() calls glDrawBuffers() to try and disable
any attachments that we don't want to clear.  It also leaves the color masking
in place, because it should take effect.

However, this has a problem: it binds all the same color attachments, but in a
different order.  So, what was GL_DRAW_BUFFER5 will now be bound as
GL_DRAW_BUFFER0.  This means that Meta uses ctx->Color.ColorMask[0] instead of
ctx->Color.ColorMask[5]...which is the wrong state.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20160406/dc0db26c/attachment.html>


More information about the intel-3d-bugs mailing list