[Mesa-dev] [PATCH 3/3] i965/vs: Fix user clip plane setup on Gen4-5.
Eric Anholt
eric at anholt.net
Mon Nov 12 16:15:31 PST 2012
Kenneth Graunke <kenneth at whitecape.org> writes:
> On Gen6-7, we don't compact clip planes, and nr_userclip_plane_consts
> is the last bit set, so iterating from i = 0..nr_userclip_plane_consts
> covers all active clip planes and is the right thing to do.
> works and is the right thing to do.
>
> However, that doesn't work at all on Gen4-5. Since we don't compact
> clip planes, we skip over ones which aren't active (via the continue
> statement). We also set set nr_userclip_plane_consts to the number of
> active clip planes, which means that we end the loop after checking that
> many bits. If the set of clip planes wasn't contiguous, this means we'd
> fail to find the last few.
>
> By changing the iteration to MAX_CLIP_PLANES, we correctly find all of
> the active clip planes.
>
> Fixes regressions since 66c8473e028d (replacing the old VS backend) in
> Piglit's spec/glsl-1.20/execution/clipping/fixed-clip-enables and
> oglconform's mustpass(basic.clip) and userclip(basic.allCases).
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56791
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Series is:
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- 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/mesa-dev/attachments/20121112/779955ed/attachment.pgp>
More information about the mesa-dev
mailing list