Eric Anholt <e...@anholt.net> writes:

> Paul Berry <stereotype...@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 <e...@anholt.net>

Paul reminded that thanks to the simd16 repdata clear, we're basically
never calling glsl clear on gen6+, and we only enable GS on gen7+.

As such, I'm not really concerned about the performance any more, and by
the time anyone else can care about it we should have ARB_sso, at which
point optionally slotting in a GS to do this work on a layered FB is
easy.  I think.

Reviewed-by: Eric Anholt <e...@anholt.net>

Attachment: pgp0GOulKBhPT.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to