summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-04-06 16:31:01 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:05 -0800
commit9955e8334bd98db743306438fe03dabe0fee0f6e (patch)
treeb88535176259c491f30da768ff8adc4e700dfafa /src/gallium/drivers
parent65073c221770121253d6ec8ac9a323a36fce3b10 (diff)
iris: binder fixes
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/iris/iris_binder.c4
-rw-r--r--src/gallium/drivers/iris/iris_state.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_binder.c b/src/gallium/drivers/iris/iris_binder.c
index 5c54c0a13d9..ed059acad7a 100644
--- a/src/gallium/drivers/iris/iris_binder.c
+++ b/src/gallium/drivers/iris/iris_binder.c
@@ -37,6 +37,9 @@ iris_binder_reserve(struct iris_binder *binder, unsigned size,
assert(size > 0);
assert(binder->insert_point + size <= BINDER_SIZE);
+ assert((binder->insert_point % 64) == 0);
+ *out_offset = binder->insert_point;
+
binder->insert_point = align(binder->insert_point + size, 64);
return binder->map + *out_offset;
@@ -48,6 +51,7 @@ 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
}
void
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 671b1e723f8..d385b784ea0 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -1968,6 +1968,7 @@ iris_upload_render_state(struct iris_context *ice,
uint32_t *bt_map = NULL;
if (prog_data->binding_table.size_bytes != 0) {
+ iris_use_pinned_bo(batch, ice->state.binder.bo, false);
bt_map = iris_binder_reserve(&ice->state.binder,
prog_data->binding_table.size_bytes,
&bt_offset);