From b3646e2b48c7650b80539607589832b1ee9ff70d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sun, 21 Jan 2018 21:09:30 -0800 Subject: iris: fix VF instancing length so we don't get garbage in batch --- src/gallium/drivers/iris/iris_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 9ccc37fd982..4e506b5431e 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1498,8 +1498,8 @@ iris_upload_render_state(struct iris_context *ice, iris_batch_emit(batch, cso->vertex_elements, sizeof(uint32_t) * (1 + cso->count * GENX(VERTEX_ELEMENT_STATE_length))); for (int i = 0; i < cso->count; i++) { - iris_batch_emit(batch, cso->vf_instancing[i], - sizeof(cso->vf_instancing[0])); + iris_batch_emit(batch, cso->vf_instancing[i], sizeof(uint32_t) * + (cso->count * GENX(3DSTATE_VF_INSTANCING_length))); } for (int i = 0; i < cso->count; i++) { /* TODO: vertexid, instanceid support */ -- cgit v1.2.3