lima: fix viewport clipping
authorVasily Khoruzhick <anarsoul@gmail.com>
Sat, 11 Jan 2020 03:35:11 +0000 (19:35 -0800)
committerVasily Khoruzhick <anarsoul@gmail.com>
Sun, 12 Jan 2020 08:10:04 +0000 (00:10 -0800)
commitb936b1f9b49b0eb5c5ca3048790f032aa9b02ecb
tree261c3b19bfb14927c51a32fa9fb3d707a4702421
parent997a30d709b2cc207c4f524ed1fb59a9ac6547e3
lima: fix viewport clipping

Apparently Mali4x0 doesn't do viewport clipping, so anything rendered beyond viewport
is still rendered. Looks like we need to use scissors to do clipping.

Fixes most of dEQP-GLES2.functional.clipping.*, 6 out of 7 remaining failures
fail on blob as well. Remaining [1] fails on many other gallium drivers.

[1] dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_neg_x_neg_z_and_pos_x_pos_z_and_neg_x_neg_y_pos_z

Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/lima_draw.c