panfrost: Allocate polygon lists on-demand
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 2 Aug 2019 17:18:48 +0000 (19:18 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Fri, 2 Aug 2019 19:54:58 +0000 (21:54 +0200)
commitcd98d94516dbd77b9090a39c3c7c5da8e4f96044
tree6f861a0fdfda0c0bb97702232bf3d15ca13bfa88
parented501c00cb6c723b13e10f10b02f9c675fc23d98
panfrost: Allocate polygon lists on-demand

Rather than alloacting a huge (64MB) polygon list on context creation
and sharing it across framebuffers, we instead allocate polygon lists as
BOs (which consistently hit the cache) sized appropriately; for about a
month, we've known how to calculate the polygon list size so this has
only recently become possible.

The good news is we can render to truly massive framebuffers without
crashing and, more importantly, we eliminate the 64MB upfront overhead.
If a list that size isn't actually needed, it's not allocated.

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