From a01be2f21f32355c7cefdf51b060faadaf9b2a1d Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 7 Dec 2023 17:26:12 +0100 Subject: [PATCH] panfrost: Make pan_encoder.h panfrost_device agnostic Signed-off-by: Boris Brezillon Reviewed-by: Constantine Shablya Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/panfrost/pan_cmdstream.c | 4 ++-- src/panfrost/lib/pan_encoder.h | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 8714dcea343..3b818568d95 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -3681,8 +3681,8 @@ batch_get_polygon_list(struct panfrost_batch *batch) if (!batch->tiler_ctx.midgard.polygon_list) { bool has_draws = batch->draw_count > 0; unsigned size = panfrost_tiler_get_polygon_list_size( - dev, batch->key.width, batch->key.height, - batch->tiler_ctx.vertex_count); + batch->key.width, batch->key.height, batch->tiler_ctx.vertex_count, + !dev->model->quirks.no_hierarchical_tiling); /* Create the BO as invisible if we can. If there are no draws, * we need to write the polygon list manually because there's diff --git a/src/panfrost/lib/pan_encoder.h b/src/panfrost/lib/pan_encoder.h index deef7d20401..80372624d57 100644 --- a/src/panfrost/lib/pan_encoder.h +++ b/src/panfrost/lib/pan_encoder.h @@ -32,8 +32,8 @@ #include #include "genxml/gen_macros.h" #include "util/format/u_format.h" -#include "pan_bo.h" -#include "pan_device.h" + +#include "pan_pool.h" /* Tiler structure size computation */ @@ -48,14 +48,12 @@ unsigned panfrost_choose_hierarchy_mask(unsigned width, unsigned height, #if defined(PAN_ARCH) && PAN_ARCH <= 5 static inline unsigned -panfrost_tiler_get_polygon_list_size(const struct panfrost_device *dev, - unsigned fb_width, unsigned fb_height, - unsigned vertex_count) +panfrost_tiler_get_polygon_list_size(unsigned fb_width, unsigned fb_height, + unsigned vertex_count, bool hierarchy) { if (!vertex_count) return MALI_MIDGARD_TILER_MINIMUM_HEADER_SIZE + 4; - bool hierarchy = !dev->model->quirks.no_hierarchical_tiling; unsigned hierarchy_mask = panfrost_choose_hierarchy_mask( fb_width, fb_height, vertex_count, hierarchy);