From: Kenneth Graunke Date: Fri, 6 Apr 2018 23:31:01 +0000 (-0700) Subject: iris: binder fixes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9955e8334bd98db743306438fe03dabe0fee0f6e;p=mesa.git iris: binder fixes --- 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);