From: Kenneth Graunke Date: Mon, 22 Jan 2018 05:09:30 +0000 (-0800) Subject: iris: fix VF instancing length so we don't get garbage in batch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3646e2b48c7650b80539607589832b1ee9ff70d;p=mesa.git iris: fix VF instancing length so we don't get garbage in batch --- 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 */