panfrost: Always pass a non-NULL screen to set_damage_region()
We will soon have a different handling for Bifrost, and we need to know which GPU we're targeting to choose the right path. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033>
This commit is contained in:
parent
c5d6abae5b
commit
a11807b795
|
@ -1158,8 +1158,9 @@ panfrost_batch_submit(struct panfrost_batch *batch,
|
|||
if (!batch->key.cbufs[i])
|
||||
continue;
|
||||
|
||||
panfrost_resource_set_damage_region(NULL,
|
||||
batch->key.cbufs[i]->texture, 0, NULL);
|
||||
panfrost_resource_set_damage_region(batch->ctx->base.screen,
|
||||
batch->key.cbufs[i]->texture,
|
||||
0, NULL);
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
@ -109,7 +109,7 @@ panfrost_resource_from_handle(struct pipe_screen *pscreen,
|
|||
rsc->modifier_constant = true;
|
||||
|
||||
rsc->state.slices[0].data_valid = true;
|
||||
panfrost_resource_set_damage_region(NULL, &rsc->base, 0, NULL);
|
||||
panfrost_resource_set_damage_region(pscreen, &rsc->base, 0, NULL);
|
||||
|
||||
/* If we import an AFBC resource, it should be in a format that's
|
||||
* supported, otherwise we don't know if the fixup is expected to be
|
||||
|
@ -601,7 +601,7 @@ panfrost_resource_create_with_modifier(struct pipe_screen *screen,
|
|||
if (drm_is_afbc(so->image.layout.modifier))
|
||||
panfrost_resource_init_afbc_headers(so);
|
||||
|
||||
panfrost_resource_set_damage_region(NULL, &so->base, 0, NULL);
|
||||
panfrost_resource_set_damage_region(screen, &so->base, 0, NULL);
|
||||
|
||||
if (template->bind & PIPE_BIND_INDEX_BUFFER)
|
||||
so->index_cache = rzalloc(so, struct panfrost_minmax_cache);
|
||||
|
|
Loading…
Reference in New Issue