draw/clip: don't emit so many empty triangles
authorZack Rusin <zackr@vmware.com>
Thu, 19 Sep 2013 17:38:12 +0000 (13:38 -0400)
committerZack Rusin <zackr@vmware.com>
Wed, 25 Sep 2013 23:42:22 +0000 (19:42 -0400)
commitd83ef680e2c6d11c446aae16a65445f12984fb85
tree8fab38e9c4749db5cfcec33ce5af496712c7740f
parent60c448faea54a56047202204c486b8d399429909
draw/clip: don't emit so many empty triangles

Compress empty triangles (don't emit more than one in a row) and
never emit empty triangles if we already generated a triangle
covering a non-null area. We can't skip all null-triangles
because c_primitives expects ones that were generated from vertices
exactly at the clipping-plane, to be emitted.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_clip.c