[Mesa-dev] [PATCH 2/2] i965: Fix clears of layered framebuffers with mismatched layer counts.

Chris Forbes chrisf at ijw.co.nz
Thu Jan 9 18:51:23 PST 2014


OK, in that case:

Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>

On Fri, Jan 10, 2014 at 3:42 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> 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.


More information about the mesa-dev mailing list