[Mesa-dev] [PATCH 09/11] tgsi: remove culldist semantic.

Ilia Mirkin imirkin at alum.mit.edu
Sat May 14 20:28:11 UTC 2016

On Sat, May 14, 2016 at 2:58 PM, Roland Scheidegger <sroland at vmware.com> wrote:
> On 05/14/2016 04:24 PM, Ilia Mirkin wrote:
>> On Sat, May 14, 2016 at 10:23 AM, Roland Scheidegger <sroland at vmware.com>
>> wrote:
>>> Am 14.05.2016 um 14:55 schrieb Marek Olšák:
>>>> Dave,
>>>> It should be noted that clip distances can be disabled by
>>>> pipe_rasterizer_state::clip_plane_enable, but cull distances can't.
>>>> (same as GL)
>>> That only applies to user clip planes, not shader clip distances.
>> Actually, it applies to both.
> Yes, you are right. Ahh crap. draw, however, ignores the enable bits for
> clip distances (and we're probably relying on this even internally right
> now). Do blobs actually honor them? I'm wondering because some code changes
> I was recently doing at vmware shouldn't have worked if they did... Or maybe
> I got lucky...
> In any case honoring the enable bits should still be possible even with both
> clip and cull integrated into the same output.

What I do is compute a clip & cull mask separately in the shader and
then &= clip mask, then |= cull mask. (Onto the rast->clip_enable
mask.) Seems to work.

More information about the mesa-dev mailing list