rbug: Skip drawing on disabled shaders
authorJakob Bornecrantz <wallbraker@gmail.com>
Sun, 13 Mar 2011 12:15:34 +0000 (13:15 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Sun, 13 Mar 2011 12:36:21 +0000 (13:36 +0100)
src/gallium/drivers/rbug/rbug_context.c

index bd0eae9ac46cf8455ffbea0bb89b878b147c8902..2c3247e09f1cbc979b2a109f01915bed2fb6675c 100644 (file)
@@ -112,7 +112,10 @@ rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info)
    pipe_mutex_lock(rb_pipe->draw_mutex);
    rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_BEFORE);
 
-   pipe->draw_vbo(pipe, info);
+   if (!(rb_pipe->curr.fs && rb_pipe->curr.fs->disabled) &&
+       !(rb_pipe->curr.gs && rb_pipe->curr.gs->disabled) &&
+       !(rb_pipe->curr.vs && rb_pipe->curr.vs->disabled))
+      pipe->draw_vbo(pipe, info);
 
    rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_AFTER);
    pipe_mutex_unlock(rb_pipe->draw_mutex);