From 129fae5a907d51135abb067c4b43428f7e90e96d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sun, 21 Jan 2018 20:10:57 -0800 Subject: [PATCH] iris: fix VBs --- src/gallium/drivers/iris/iris_state.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 41754ce260a..e8f8173303f 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1475,11 +1475,12 @@ iris_upload_render_state(struct iris_context *ice, struct iris_vertex_buffer_state *cso = ice->state.cso_vertex_buffers; STATIC_ASSERT(GENX(VERTEX_BUFFER_STATE_length) == 4); + STATIC_ASSERT((GENX(VERTEX_BUFFER_STATE_BufferStartingAddress_bits) % 32) == 0); uint64_t *addr = batch->cmdbuf.map_next + sizeof(uint32_t) * - (1 + GENX(VERTEX_BUFFER_STATE_BufferStartingAddress_bits) % 32); + (1 + GENX(VERTEX_BUFFER_STATE_BufferStartingAddress_bits) / 32); uint32_t *delta = cso->vertex_buffers + - (2 + GENX(VERTEX_BUFFER_STATE_BufferStartingAddress_bits) % 32); + (2 + GENX(VERTEX_BUFFER_STATE_BufferStartingAddress_bits) / 32); iris_batch_emit(batch, cso->vertex_buffers, sizeof(uint32_t) * (1 + 4 * cso->num_buffers)); -- 2.30.2