[Piglit] [PATCH] Add tests for gl_ClipDistance and gl_ClipVertex.

Eric Anholt eric at anholt.net
Tue Aug 9 18:28:07 PDT 2011

On Tue,  9 Aug 2011 14:55:27 -0700, Paul Berry <stereotype441 at gmail.com> wrote:
> This patch is a preparation for work I'm about to do to add
> gl_ClipDistance support to Mesa, and future work that I hope to do to
> fix bugs in gl_ClipVertex in Mesa.  It adds a thorough set of tests
> for the following behaviors of gl_ClipDistance and gl_ClipVertex:
> For gl_ClipVertex:
> - It behaves properly when equal to gl_Position.
> - It behaves properly when not equal to gl_Position.
> - It falls back to gl_Position when it is not set.
> - Its homogeneous coordinate is respected.
> - The homogeneous coordinate is respected when falling back to gl_Position.
> For gl_ClipDistance:
> - It works when all 6 clip planes are enabled.
> - Its behavior is properly affected by clip plane enable flags.
> - It can be explicitly or implicitly sized in the vertex shader.
> - It can be sized up to gl_MaxVaryingComponents but no higher.
> - In the fragment shader, it contains properly interpolated values.
> For the interaction between the two:
> - It is an error to assign to both gl_ClipDistance and gl_ClipVertex.
> In addition, this patch renames a few of the existing clipping tests
> so that their names more clearly reflect what they're testing.

I generally find clipping hard to think about (which is why I'm not
giving a Reviewed-by:), but I'm quite happy with this series and the
coverage it provides.  We've needed a bunch of these tests.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20110809/a7260dfe/attachment.pgp>

More information about the Piglit mailing list