summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_batch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/iris/iris_batch.c')
-rw-r--r--src/gallium/drivers/iris/iris_batch.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c
index 52e44d9bb04..171bc9aa6b5 100644
--- a/src/gallium/drivers/iris/iris_batch.c
+++ b/src/gallium/drivers/iris/iris_batch.c
@@ -571,10 +571,14 @@ iris_batch_references(struct iris_batch *batch, struct iris_bo *bo)
/* This is the only way buffers get added to the validate list.
*/
void
-iris_use_pinned_bo(struct iris_batch *batch, struct iris_bo *bo)
+iris_use_pinned_bo(struct iris_batch *batch,
+ struct iris_bo *bo,
+ bool writable)
{
assert(bo->kflags & EXEC_OBJECT_PINNED);
- add_exec_bo(batch, bo);
+ unsigned index = add_exec_bo(batch, bo);
+ if (writable)
+ batch->validation_list[index].flags |= EXEC_OBJECT_WRITE;
}
static void