llvmpipe: Silence uninitialized variable warning about "scissor"
authorEric Anholt <eric@anholt.net>
Tue, 17 Dec 2019 04:56:14 +0000 (20:56 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 18 Feb 2020 23:40:04 +0000 (15:40 -0800)
nr_planes is only > 3 when scissor is enabled, but gcc doesn't see it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867>

src/gallium/drivers/llvmpipe/lp_setup_tri.c

index d24a4b4afe74a88a26930357cd9e499224db8e6a..93fbe429dab40456ddcafb45142dcc46c580be28 100644 (file)
@@ -273,7 +273,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
    const struct lp_setup_variant_key *key = &setup->setup.variant->key;
    struct lp_rast_triangle *tri;
    struct lp_rast_plane *plane;
-   const struct u_rect *scissor;
+   const struct u_rect *scissor = NULL;
    struct u_rect bbox, bboxpos;
    boolean s_planes[4];
    unsigned tri_bytes;