lima: make lima_submit one time use drop data (v3)
authorQiang Yu <yuq825@gmail.com>
Sun, 9 Feb 2020 08:10:18 +0000 (16:10 +0800)
committerMarge Bot <eric+marge@anholt.net>
Mon, 17 Feb 2020 02:54:15 +0000 (02:54 +0000)
commit48fc5f841ae9c5b294d9084a274f49045c0dbae5
treec26b15beb5d598996d805bff84cf9f8bf8e88709
parent545988c6172e51ea00c87abe966d5ecd03b08e98
lima: make lima_submit one time use drop data (v3)

lima_submit is created by lima_submit_get() in draw/clear functions
and freed after submit to kernel.

There is a hash map to find the same lima_submit for color/depth
buffer combination if user switch framebuffer w/o flush the command
then switch back again.

v2:
rename lima_flush_submit to lima_flush_submit_accessing_bo.

v3:
delay flush access submit to lima_update_submit_wb when really know
if this submit will write to the target buffer.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
src/gallium/drivers/lima/lima_context.c
src/gallium/drivers/lima/lima_context.h
src/gallium/drivers/lima/lima_draw.c
src/gallium/drivers/lima/lima_resource.c
src/gallium/drivers/lima/lima_state.c
src/gallium/drivers/lima/lima_submit.c
src/gallium/drivers/lima/lima_submit.h