From c52c3e2424df91f66107340ace990f88b5b34dba Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 7 Apr 2021 15:38:12 +0200 Subject: [PATCH] panfrost: Extend pan_fb_info to allow passing a tile enable map We will use this tile enable map to implement KHR_partial_update and replace the current solution where the preload process is done by inverting damage regions, merging the resulting inverted regions and issuing preloading draws for those rectangles. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/pan_cs.c | 5 +++++ src/panfrost/lib/pan_cs.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/panfrost/lib/pan_cs.c b/src/panfrost/lib/pan_cs.c index 34a2080..b98a1da 100644 --- a/src/panfrost/lib/pan_cs.c +++ b/src/panfrost/lib/pan_cs.c @@ -933,5 +933,10 @@ pan_emit_fragment_job(const struct panfrost_device *dev, payload.bound_max_x = fb->extent.maxx >> MALI_TILE_SHIFT; payload.bound_max_y = fb->extent.maxy >> MALI_TILE_SHIFT; payload.framebuffer = fbd; + if (fb->tile_map.base) { + payload.has_tile_enable_map = true; + payload.tile_enable_map = fb->tile_map.base; + payload.tile_enable_map_row_stride = fb->tile_map.stride; + } } } diff --git a/src/panfrost/lib/pan_cs.h b/src/panfrost/lib/pan_cs.h index f013a2a..9507f4c 100644 --- a/src/panfrost/lib/pan_cs.h +++ b/src/panfrost/lib/pan_cs.h @@ -102,6 +102,11 @@ struct pan_fb_info { unsigned rt_count; struct pan_fb_color_attachment rts[8]; struct pan_fb_zs_attachment zs; + + struct { + unsigned stride; + mali_ptr base; + } tile_map; }; unsigned -- 2.7.4