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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 6 18:02:21 UTC 2021


Module: Mesa
Branch: staging/20.3
Commit: 588cf800be8a0185b54baf2a74bbeb3cf364c5a1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=588cf800be8a0185b54baf2a74bbeb3cf364c5a1

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>
(cherry picked from commit 96ceca33c1dd69a1feed13b0e19bfc38e6f7d979)

---

 .pick_status.json                      | 2 +-
 src/gallium/auxiliary/util/u_blitter.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 40660090938..4fb8630d2fa 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4,7 +4,7 @@
         "description": "gallium/util: do not perform n^2 stencil blits",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "e8a40715a8bcd479c0c33eab411d276777153a0e"
     },
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 0019eb13730..6ef6999dd44 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