nvc0: don't set NEW_IDXBUF in nvc0_switch_pipe_context if none is bound
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 22 May 2012 10:41:17 +0000 (12:41 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 22 May 2012 10:45:19 +0000 (12:45 +0200)
src/gallium/drivers/nvc0/nvc0_state_validate.c

index c2d115e715f27f396756830fc94fce5906cc8925..e35aae532e8157dc69b1aa37f2365a056652d515 100644 (file)
@@ -463,6 +463,8 @@ nvc0_switch_pipe_context(struct nvc0_context *ctx_to)
 
    if (!ctx_to->vertex)
       ctx_to->dirty &= ~(NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS);
+   if (!ctx_to->idxbuf.buffer)
+      ctx_to->dirty &= ~NVC0_NEW_IDXBUF;
 
    if (!ctx_to->vertprog)
       ctx_to->dirty &= ~NVC0_NEW_VERTPROG;