summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-12-08 11:52:55 -0800
committerKenneth Graunke <[email protected]>2019-02-21 10:26:12 -0800
commit56f1fe3eacc95e6ff66fad323448a1189962b97d (patch)
tree5adf924f14dd0132809439085b16cd625b8ccf77 /src/gallium
parentf8aa9aa353195c50bb9204387bb953c419e6fb37 (diff)
iris: pin the buffers
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;
}