postprocess: move second temporary assertion into isolated configuration
authorMatthew McClure <mcclurem@vmware.com>
Mon, 1 Jul 2013 21:03:37 +0000 (14:03 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 3 Jul 2013 15:19:04 +0000 (09:19 -0600)
With this patch we will only assert that the second temporary is allocated,
when there are more than two active filters.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66423

Signed-off-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/postprocess/pp_run.c

index 9bd977b733e22c0073a70d96a2d37c9a6dc3f321..0d95c72946f6e95475c3f68c988fe5572021d4b4 100644 (file)
@@ -53,8 +53,7 @@ pp_run(struct pp_queue_t *ppq, struct pipe_resource *in,
 
    assert(ppq->pp_queue);
    assert(ppq->tmp[0]);
-   assert(ppq->tmp[1]);
+
    if (in->width0 != ppq->p->framebuffer.width ||
        in->height0 != ppq->p->framebuffer.height) {
       pp_debug("Resizing the temp pp buffers\n");
@@ -120,6 +119,7 @@ pp_run(struct pp_queue_t *ppq, struct pipe_resource *in,
 
       break;
    default:                    /* Two temp bufs */
+      assert(ppq->tmp[1]);
       ppq->pp_queue[0] (ppq, in, ppq->tmp[0], 0);
 
       for (i = 1; i < (ppq->n_filters - 1); i++) {