lima: handle early-z and pixel kill better
authorVasily Khoruzhick <anarsoul@gmail.com>
Sat, 8 Feb 2020 10:05:24 +0000 (02:05 -0800)
committerMarge Bot <eric+marge@anholt.net>
Fri, 14 Feb 2020 10:03:01 +0000 (10:03 +0000)
commitf43a3fc28ff8914e4a9391233dfc3b63454c6dac
treeff4d52f57a5c32216bf9769caa9bcd9fe6f59193
parent582d0c5f1474ecbe52a666e30cb115144aeda7c0
lima: handle early-z and pixel kill better

[1] calls bit 12 of aux0 'pixel kill' which is likely forward pixel
kill described in [2]. Blob sets this bit if early-z is enabled and
blending is disabled and colormask is RGBA.

Bit 8 seems to be always enabled with bit 9 (early-z).

Let's mimic blob behavior.

[1] https://web.archive.org/web/20171026123213/http://limadriver.org/Render_State/
[2] https://community.arm.com/developer/tools-software/graphics/b/blog/posts/killing-pixels---a-new-optimization-for-shading-on-arm-mali-gpus

Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3754>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3754>
src/gallium/drivers/lima/lima_draw.c