renderer: allow binding 0 vbos

This was broken calculation, we should allow binding 0 vbos.
macos/master
Dave Airlie 10 years ago
parent 869a6aa5f5
commit f6a786c6ea
  1. 7
      src/vrend_decode.c

@ -257,14 +257,13 @@ static int vrend_decode_set_vertex_buffers(struct vrend_decode_ctx *ctx, uint16_
int num_vbo;
int i;
if (length < 3)
return EINVAL;
/* must be a multiple of 3 */
if (length % 3)
if (length && (length % 3))
return EINVAL;
num_vbo = (length / 3);
if (num_vbo > PIPE_MAX_ATTRIBS)
return EINVAL;
for (i = 0; i < num_vbo; i++) {
vrend_set_single_vbo(ctx->grctx, i,

Loading…
Cancel
Save