mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
panfrost: give afbc-packing its own flag
There's no point in querying this over and over again for each resource, especially not when this test is about to become more complicated. So let's give this its own flag. Acked-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27916>
This commit is contained in:
parent
7487ac2046
commit
d861bd1563
3 changed files with 4 additions and 1 deletions
|
|
@ -1618,7 +1618,7 @@ panfrost_ptr_unmap(struct pipe_context *pctx, struct pipe_transfer *transfer)
|
|||
ctx, pan_resource(trans->staging.rsrc),
|
||||
"AFBC write staging blit");
|
||||
|
||||
if (dev->debug & PAN_DBG_FORCE_PACK) {
|
||||
if (pan_screen(pctx->screen)->force_afbc_packing) {
|
||||
if (panfrost_should_pack_afbc(dev, prsrc))
|
||||
panfrost_pack_afbc(ctx, prsrc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -852,6 +852,8 @@ panfrost_create_screen(int fd, const struct pipe_screen_config *config,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
screen->force_afbc_packing = dev->debug & PAN_DBG_FORCE_PACK;
|
||||
|
||||
dev->ro = ro;
|
||||
|
||||
screen->base.destroy = panfrost_destroy_screen;
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ struct panfrost_screen {
|
|||
struct panfrost_vtable vtbl;
|
||||
struct disk_cache *disk_cache;
|
||||
unsigned max_afbc_packing_ratio;
|
||||
bool force_afbc_packing;
|
||||
};
|
||||
|
||||
static inline struct panfrost_screen *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue