gallium/util: do not perform n^2 stencil blits
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 4 Jan 2021 09:35:36 +0000 (10:35 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 6 Jan 2021 17:09:16 +0000 (17:09 +0000)
We already loop n times here, no point in doing n instances as well.

Fixes: e8a40715a8b ("gallium/util: add blitter-support for stencil-fallback")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8301>

src/gallium/auxiliary/util/u_blitter.c

index 77d2e34..eefe69b 100644 (file)
@@ -2918,7 +2918,7 @@ util_blitter_stencil_fallback(struct blitter_context *blitter,
                               dstbox->x, dstbox->y,
                               dstbox->x + dstbox->width,
                               dstbox->y + dstbox->height,
-                              0, stencil_bits,
+                              0, 1,
                               UTIL_BLITTER_ATTRIB_TEXCOORD_XYZW,
                               &coord);
    }