svga: Use direct maps when GB objects are present
authorZack Rusin <zackr@vmware.com>
Tue, 8 Feb 2022 21:03:21 +0000 (16:03 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 26 Apr 2022 00:33:25 +0000 (00:33 +0000)
commite5306d190a22afeb592f41dea678b1d57a0513c5
tree965e29ef267234f834f447c5630f787475ef2686
parentc7b0309723721495edd318eb6ecd4446900d702b
svga: Use direct maps when GB objects are present

SVGA device always supports direct maps which are preferable in all cases
because they avoid temporary surfaces and extra transfers. Furthermore
DMA transfers on devices with GB objects have undefined timing semantics.

Also the DMA transfers can not work on SVGAv3 because the device lacks
VRAM to be able to perform them.

Fix the last paths still using DMA transfers to make sure they're never
used on GB enabled configs. This fixes gnome-shell startup on SVGAv3.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Michael Banack <banackm@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16061>
src/gallium/drivers/svga/svga_cmd.c
src/gallium/drivers/svga/svga_resource_texture.c