Mesa (master): gallium/util: do not perform n^2 stencil blits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 6 17:26:19 UTC 2021


Module: Mesa
Branch: master
Commit: 96ceca33c1dd69a1feed13b0e19bfc38e6f7d979
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=96ceca33c1dd69a1feed13b0e19bfc38e6f7d979

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Mon Jan  4 10:35:36 2021 +0100

gallium/util: do not perform n^2 stencil blits

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 at microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8301>

---

 src/gallium/auxiliary/util/u_blitter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 77d2e349253..eefe69b8fe3 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -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);
    }



More information about the mesa-commit mailing list