lima: implement zsbuf reload
authorIcenowy Zheng <icenowy@aosc.io>
Thu, 6 Feb 2020 16:53:46 +0000 (00:53 +0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 18 Mar 2020 08:36:17 +0000 (08:36 +0000)
commit9205762caece0c4b9ecea3d56f72c6980935633a
tree24781439690e97cf0c07e6547efe74a996d48c80
parentdbceabed72977ffd49d84f926c59ff97554f349d
lima: implement zsbuf reload

Fragment shader can write depth and stencil if we set necessary flags
in RSW. In addition to that we need to use special format for Z24S8.
Original format is apparently Z24X8 since we can't sample stencil in GLES2.
This new format also seems to use several components for storing depth
since we saw r != g != b when sampling with this format.

[vasily: - initialize clear->depth to 0xffffff if we reload depth, just
           like blob does. Reloading doesn't work otherwise
         - use single bitmap for reload type]

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4197>
.gitlab-ci/deqp-lima-fails.txt
src/gallium/drivers/lima/lima_draw.c
src/gallium/drivers/lima/lima_format.c
src/gallium/drivers/lima/lima_format.h
src/gallium/drivers/lima/lima_job.c
src/gallium/drivers/lima/lima_resource.c
src/gallium/drivers/lima/lima_resource.h