diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-06-14 08:14:04 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-17 07:59:14 -0700 |
commit | 12d4289bf90dc73c5fe11338e4665382ef8bfdaf (patch) | |
tree | 71592d26ac6b5aa13792222c5906dbca523e6a2f /src/gallium/drivers/panfrost/pan_tiler.c | |
parent | 6434f5c4942969dc60a8680c2ba00b97bf253009 (diff) |
panfrost: Stub out hierarchy mask selection
Quite a bit of refactoring in the main driver will be necessary to make
use of this effectively, so the implementation is incomplete.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_tiler.c')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_tiler.c | 21 |
1 files changed, 21 insertions, 0 deletions
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; +} |