summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_state.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 838b031dfa2..0cdfbd2af89 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -3689,6 +3689,9 @@ use_surface(struct iris_batch *batch,
iris_use_pinned_bo(batch, iris_resource_bo(p_surf->texture), writeable);
iris_use_pinned_bo(batch, iris_resource_bo(surf->surface_state.res), false);
+ if (res->aux.bo)
+ iris_use_pinned_bo(batch, res->aux.bo, writeable);
+
return surf->surface_state.offset +
surf_state_offset_for_aux(res, aux_usage);
}
@@ -3705,6 +3708,9 @@ use_sampler_view(struct iris_context *ice,
iris_use_pinned_bo(batch, isv->res->bo, false);
iris_use_pinned_bo(batch, iris_resource_bo(isv->surface_state.res), false);
+ if (isv->res->aux.bo)
+ iris_use_pinned_bo(batch, isv->res->aux.bo, false);
+
return isv->surface_state.offset +
surf_state_offset_for_aux(isv->res, aux_usage);
}
@@ -3745,12 +3751,16 @@ use_image(struct iris_batch *batch, struct iris_context *ice,
if (!shs->image[i].res)
return use_null_surface(batch, ice);
+ struct iris_resource *res = (void *) shs->image[i].res;
struct iris_state_ref *surf_state = &shs->image[i].surface_state;
+ bool write = shs->image[i].access & PIPE_IMAGE_ACCESS_WRITE;
- iris_use_pinned_bo(batch, iris_resource_bo(shs->image[i].res),
- shs->image[i].access & PIPE_IMAGE_ACCESS_WRITE);
+ iris_use_pinned_bo(batch, res->bo, write);
iris_use_pinned_bo(batch, iris_resource_bo(surf_state->res), false);
+ if (res->aux.bo)
+ iris_use_pinned_bo(batch, res->aux.bo, write);
+
return surf_state->offset;
}