From: Tomeu Vizoso Date: Fri, 1 May 2020 09:37:56 +0000 (+0200) Subject: panfrost: Add Bifrost texture trampoline BO to batch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a81abf3b2e6c08dea296d164d6e4429e5230d83;p=mesa.git panfrost: Add Bifrost texture trampoline BO to batch Fixes: d3eb23adb50c ("panfrost: Emit sampler descriptor on bifrost") Signed-off-by: Tomeu Vizoso Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 7012f068981..89d038f2e22 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1325,10 +1325,16 @@ panfrost_emit_texture_descriptors(struct panfrost_batch *batch, struct pipe_sampler_view *pview = &view->base; struct panfrost_resource *rsrc = pan_resource(pview->texture); + /* Add the BOs to the job so they are retained until the job is done. */ + panfrost_batch_add_bo(batch, rsrc->bo, PAN_BO_ACCESS_SHARED | PAN_BO_ACCESS_READ | panfrost_bo_access_for_stage(stage)); + panfrost_batch_add_bo(batch, view->bifrost_bo, + PAN_BO_ACCESS_SHARED | PAN_BO_ACCESS_READ | + panfrost_bo_access_for_stage(stage)); + memcpy(&descriptors[i], view->bifrost_descriptor, sizeof(*view->bifrost_descriptor)); }