[Mesa-stable] [Mesa-dev] [PATCH v2 2/5] meta: fix meta clear of layered framebuffers

Eric Anholt eric at anholt.net
Thu Nov 21 09:41:27 PST 2013


Paul Berry <stereotype441 at gmail.com> writes:

> From section 4.4.7 (Layered Framebuffers) of the GLSL 3.2 spec:
>
>     When the Clear or ClearBuffer* commands are used to clear a
>     layered framebuffer attachment, all layers of the attachment are
>     cleared.
>
> This patch fixes meta clears to properly clear all layers of a layered
> framebuffer attachment.  We accomplish this by adding a geometry
> shader to the meta clear program which sets gl_Layer to a uniform
> value.  When clearing a layered framebuffer, we execute in a loop,
> setting the uniform to point to each layer in turn.

I don't think we should be running a gs in the !NumLayers case.  The
other patches are:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20131121/94e04473/attachment.pgp>


More information about the mesa-stable mailing list