[Mesa-dev] [PATCH 2/2] i965: Fix clears of layered framebuffers with mismatched layer counts.
Paul Berry
stereotype441 at gmail.com
Thu Jan 9 18:42:06 PST 2014
On 9 January 2014 18:19, Chris Forbes <chrisf at ijw.co.nz> wrote:
> I'm not convinced this is correct/safe, at least for the meta clear.
>
> The GL 3.2 spec says, on page 221 (page 235 of the PDF):
>
> * If the number of layers of each attachment are not all identical,
> rendering
> will be limited to the smallest number of layers of any attachment.
>
> And then in the description of layered framebuffers on page 240 (page
> 254 of the PDF):
>
> If the fragment’s layer number is negative, or greater than the
> minimum number of layers of any attachment,
> the effects of the fragment on the framebuffer contents are undefined.
>
> Blorp clears can obviously do whatever they like, since they don't
> directly use the user's framebuffer configuration.
>
Yeah, there was some discussion about that here:
http://lists.freedesktop.org/archives/mesa-dev/2013-December/049492.html
Basically, my justification for doing it this way is that even though it's
undefined by GL what happens when you write to a layer that doesn't exist
in all attachments, we know that it works in i965, and i965 is the only
user of this code (it's the only back-end that supports layered
framebuffers and uses Meta).
In fact, I would venture to say that i965 is likely to be the only user of
this code for the forseeable future, since the only other back-end that
uses Meta is the i915 driver, and it's never going to be capable of
supporting layered framebuffers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140109/79aa238f/attachment.html>
More information about the mesa-dev
mailing list