lima: implement alpha test
authorVasily Khoruzhick <anarsoul@gmail.com>
Wed, 19 May 2021 05:26:57 +0000 (22:26 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 May 2021 20:12:42 +0000 (20:12 +0000)
commitd6eab2cc773fade93c76e14987c4636688aaa095
tree25a32558fd94ad9e4471d1278611ff2d9c9a89c4
parent726cb2d6f6444e3e6a3ccdc7b9197f1c304279aa
lima: implement alpha test

As [1] suggests, 3 lower bits in rsw->multi_sample is alpha test
compare func and bits 16-23 are reference value - uint8,
0.0 is 0, 0.5 is 0x80, 1.0 is 0xff.

Just as on Panfrost, enabled alpha test needs early-Z and pixel kill
to be disabled.

[1] http://web.archive.org/web/20171026123213/http://limadriver.org/Render_State/

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10879>
src/gallium/drivers/lima/lima_draw.c
src/gallium/drivers/lima/lima_parser.c
src/gallium/drivers/lima/lima_screen.c