X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fpanfrost%2Fpan_tiler.c;h=18ab14d9bab5cd473551bb02aea8029499cdf4d6;hb=56f9b47efd64c57abdd56a0398660078ed3f753f;hp=ef5a09104f682f406e5c2545a5ccd501bb21fee1;hpb=953cc4b540027f6bb43030615eb0e85699784b01;p=mesa.git diff --git a/src/gallium/drivers/panfrost/pan_tiler.c b/src/gallium/drivers/panfrost/pan_tiler.c index ef5a09104f6..18ab14d9bab 100644 --- a/src/gallium/drivers/panfrost/pan_tiler.c +++ b/src/gallium/drivers/panfrost/pan_tiler.c @@ -268,3 +268,24 @@ panfrost_tiler_body_size(unsigned width, unsigned height, uint8_t mask) return ALIGN_POT(header_size * 512 / 8, 512); } + +/* In the future, a heuristic to choose a tiler hierarchy mask would go here. + * At the moment, we just default to 0xFF, which enables all possible hierarchy + * levels. Overall this yields good performance but presumably incurs a cost in + * memory bandwidth / power consumption / etc, at least on smaller scenes that + * don't really need all the smaller levels enabled */ + +unsigned +panfrost_choose_hierarchy_mask( + unsigned width, unsigned height, + unsigned vertex_count) +{ + /* If there is no geometry, we don't bother enabling anything */ + + if (!vertex_count) + return 0x00; + + /* Otherwise, default everything on. TODO: Proper tests */ + + return 0xFF; +}