[Mesa-dev] [PATCH] panfrost: Add the sampled texture BO to the job
Boris Brezillon
boris.brezillon at collabora.com
Mon Jul 1 15:23:47 UTC 2019
Otherwise we get random use-after-{free,unmap} errors.
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
---
src/gallium/drivers/panfrost/pan_context.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index bf98d3853f16..37207398e82b 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -816,6 +816,8 @@ panfrost_upload_tex(
struct panfrost_context *ctx,
struct panfrost_sampler_view *view)
{
+ struct panfrost_job *job = panfrost_get_job_for_fbo(ctx);
+
if (!view)
return (mali_ptr) NULL;
@@ -848,6 +850,7 @@ panfrost_upload_tex(
for (unsigned l = first_level; l <= last_level; ++l) {
for (unsigned f = first_layer; f <= last_layer; ++f) {
+ panfrost_job_add_bo(job, rsrc->bo);
view->hw.payload[idx++] =
panfrost_get_texture_address(rsrc, l, f) + afbc_bit;
--
2.21.0
More information about the mesa-dev
mailing list