llvmpipe: initialize llvmpipe->dirty with LP_NEW_SCISSOR
authorBrian Paul <brianp@vmware.com>
Mon, 28 Aug 2017 20:17:26 +0000 (14:17 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 30 Aug 2017 02:49:36 +0000 (20:49 -0600)
If llvmpipe_set_scissor_states() is never called, we still need to be sure
that derived scissor/clip state is updated.  As of commit 743ad599a97d09b1
that function might not be called.

Fixes regressed Piglit gl-1.0-scissor-offscreen -fbo -auto test.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101709
Fixes: 743ad599a97 ("st/mesa: don't set 16 scissors and 16 viewports
if they're unused")
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/llvmpipe/lp_context.c

index 599a9f1573afba25bc2f360cba5f6ba49de551b2..613d60fd623eff75fe7444afcfa64e1203b1cd94 100644 (file)
@@ -227,6 +227,12 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv,
 
    lp_reset_counters();
 
+   /* If llvmpipe_set_scissor_states() is never called, we still need to
+    * make sure that derived scissor state is computed.
+    * See https://bugs.freedesktop.org/show_bug.cgi?id=101709
+    */
+   llvmpipe->dirty |= LP_NEW_SCISSOR;
+
    return &llvmpipe->pipe;
 
  fail: