diff options
author | Kenneth Graunke <[email protected]> | 2018-06-15 12:33:58 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:07 -0800 |
commit | ccf37c7da9cf772980a8a28037c238b6a9263c4b (patch) | |
tree | f6f8bca57793b2f87a4f1f147ba19d05efe7d692 /src/gallium/drivers/iris/iris_binder.c | |
parent | bbc6d15b590ad72a39527f90ed13be302dd70a89 (diff) |
iris: bindings dirty tracking
Diffstat (limited to 'src/gallium/drivers/iris/iris_binder.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_binder.c | 11 |
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 |