The BO reallocation path in panfrost_transfer_map caused textures and
sampler views to get out of sync.
v2: Use the GPU address of the BO in case two BOs get allocated at the
same address.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5573>
struct pipe_context *pctx)
{
struct panfrost_resource *rsrc = pan_resource(view->base.texture);
- if (view->layout != rsrc->layout) {
+ if (view->texture_bo != rsrc->bo->gpu ||
+ view->layout != rsrc->layout) {
panfrost_bo_unreference(view->bo);
panfrost_create_sampler_view_bo(view, pctx, &rsrc->base);
}
struct panfrost_resource *prsrc = (struct panfrost_resource *)texture;
assert(prsrc->bo);
+ so->texture_bo = prsrc->bo->gpu;
so->layout = prsrc->layout;
unsigned char user_swizzle[4] = {
struct pipe_sampler_view base;
struct panfrost_bo *bo;
struct bifrost_texture_descriptor *bifrost_descriptor;
+ mali_ptr texture_bo;
enum mali_texture_layout layout;
};