diff --git a/src/gallium/drivers/svga/svga_state_vdecl.c b/src/gallium/drivers/svga/svga_state_vdecl.c index bc8870e338b..6b8de9baf0a 100644 --- a/src/gallium/drivers/svga/svga_state_vdecl.c +++ b/src/gallium/drivers/svga/svga_state_vdecl.c @@ -79,8 +79,8 @@ emit_hw_vs_vdecl(struct svga_context *svga, uint64_t dirty) buffer = svga_buffer(vb->buffer.resource); if (buffer->uploaded.start > offset) { tmp_neg_bias = buffer->uploaded.start - offset; - if (ve->src_stride) - tmp_neg_bias = (tmp_neg_bias + ve->src_stride - 1) / ve->src_stride; + if (ve[i].src_stride) + tmp_neg_bias = (tmp_neg_bias + ve[i].src_stride - 1) / ve[i].src_stride; neg_bias = MAX2(neg_bias, tmp_neg_bias); } } @@ -103,14 +103,14 @@ emit_hw_vs_vdecl(struct svga_context *svga, uint64_t dirty) decls[i].identity.method = SVGA3D_DECLMETHOD_DEFAULT; decls[i].identity.usage = usage; decls[i].identity.usageIndex = index; - decls[i].array.stride = ve->src_stride; + decls[i].array.stride = ve[i].src_stride; /* Compensate for partially uploaded vbo, and * for the negative index bias. */ decls[i].array.offset = (vb->buffer_offset + ve[i].src_offset - + neg_bias * ve->src_stride + + neg_bias * ve[i].src_stride - buffer->uploaded.start); assert(decls[i].array.offset >= 0);