summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_binder.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-06-15 12:33:58 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:07 -0800
commitccf37c7da9cf772980a8a28037c238b6a9263c4b (patch)
treef6f8bca57793b2f87a4f1f147ba19d05efe7d692 /src/gallium/drivers/iris/iris_binder.c
parentbbc6d15b590ad72a39527f90ed13be302dd70a89 (diff)
iris: bindings dirty tracking
Diffstat (limited to 'src/gallium/drivers/iris/iris_binder.c')
-rw-r--r--src/gallium/drivers/iris/iris_binder.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_binder.c b/src/gallium/drivers/iris/iris_binder.c
index 1b1c78380bb..02b0fab50d0 100644
--- a/src/gallium/drivers/iris/iris_binder.c
+++ b/src/gallium/drivers/iris/iris_binder.c
@@ -90,13 +90,22 @@ iris_binder_reserve_3d(struct iris_batch *batch,
}
}
+/* Avoid using offset 0, tools consider it NULL */
+#define INIT_INSERT_POINT 64
+
void
iris_init_binder(struct iris_binder *binder, struct iris_bufmgr *bufmgr)
{
binder->bo =
iris_bo_alloc(bufmgr, "binder", BINDER_SIZE, IRIS_MEMZONE_BINDER);
binder->map = iris_bo_map(NULL, binder->bo, MAP_WRITE);
- binder->insert_point = 64; // XXX: avoid null pointer, it confuses tools
+ binder->insert_point = INIT_INSERT_POINT;
+}
+
+bool
+iris_binder_is_empty(struct iris_binder *binder)
+{
+ return binder->insert_point <= INIT_INSERT_POINT;
}
void