Allow RBUG to start blocked
authorAlex Corscadden <alexc@alexc-dev1.vmware.com>
Tue, 10 Aug 2010 20:37:44 +0000 (13:37 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 23 Sep 2011 13:58:44 +0000 (07:58 -0600)
It is sometimes useful to examine the first frame or and early frame of a
quickly executing and non-repeating application, this chain introduces a new
environment variable that is checked when creating contexts.  If
GALLIUM_RBUG_START_BLOCKED is set, then each context that is created is started
in a blocked state.  This allows time to connect rbug before anything is
rendered in the context.

src/gallium/drivers/rbug/rbug_context.c

index 6690c02..96f4ce6 100644 (file)
@@ -1245,5 +1245,9 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
 
    rbug_screen_add_to_list(rb_screen, contexts, rb_pipe);
 
+   if (debug_get_bool_option("GALLIUM_RBUG_START_BLOCKED", FALSE)) {
+      rb_pipe->draw_blocked = RBUG_BLOCK_BEFORE;
+   }
+
    return &rb_pipe->base;
 }