panfrost: Add support for KHR_partial_update()
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 12 Aug 2019 10:07:08 +0000 (12:07 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 13 Aug 2019 12:41:10 +0000 (14:41 +0200)
commit65ae86b85422ae0d41624dd56f935d85b0164a13
treee86fa41f23987d2044c2132b4bbde3409bd44eb1
parent492ffbed63a2a62759224b1c7d45aa7923d8f542
panfrost: Add support for KHR_partial_update()

Implement ->set_damage_region() region to support partial updates.

This is a dummy implementation in that it does not try to merge
damage rects. It also does not deal with distinct regions and instead
pick the largest quad as the only damage rect and generate up to 4
reload rects out of it (the left/right/top/bottom regions surrounding
the biggest damage rect).

We also do not try to reduce the number of draws by passing all quad
vertices to the blit request (would require extending u_blitter)

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_blit.c
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_job.h
src/gallium/drivers/panfrost/pan_resource.c
src/gallium/drivers/panfrost/pan_resource.h
src/gallium/drivers/panfrost/pan_screen.c