v3dv: implement double-buffer mode
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 5 Jan 2022 10:07:59 +0000 (11:07 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 14 Jan 2022 10:57:26 +0000 (10:57 +0000)
commitb9f947457724f90becd820f877bf21c27f6ced99
tree9649894f1f161d1461a94f0407a29f87efed0f0d
parent821c66e50cdaf89ca3e0282967fa17c6fd666308
v3dv: implement double-buffer mode

Double buffer mode splits the tile buffer size in half so we can
start processing the next tile while the current one is being
stored to memory. This mode is available only if MSAA is not enabled
and can, in theory, improve performance by reducing tile store
overhead, however, it comes at the cost of reducing the tile size,
which also causes some overhead of its own.

Testing shows that this helps some cases (i.e the Vulkan Quake
ports) but hurts others (i.e. Unreal Engine 4), so for the time
being we don't enable this by default but we allow to enable it
selectively by using V3D_DEBUG.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14551>
src/broadcom/common/v3d_debug.c
src/broadcom/common/v3d_debug.h
src/broadcom/common/v3d_util.c
src/broadcom/common/v3d_util.h
src/broadcom/vulkan/v3dv_cmd_buffer.c
src/broadcom/vulkan/v3dv_pass.c
src/broadcom/vulkan/v3dv_private.h
src/broadcom/vulkan/v3dvx_cmd_buffer.c
src/broadcom/vulkan/v3dvx_meta_common.c
src/gallium/drivers/v3d/v3d_context.c