Mesa (main): st/texture: allow compute blits for (some) non-finalized textures

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 1 03:13:22 UTC 2022


Module: Mesa
Branch: main
Commit: d67a3ecc9a2e2baea58d0d1e57f7a5aad704d066
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d67a3ecc9a2e2baea58d0d1e57f7a5aad704d066

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri May 13 15:29:24 2022 -0400

st/texture: allow compute blits for (some) non-finalized textures

this yields sizable perf improvements in some cases

KHR-GL46.copy_image.functional timing (zink+anv-icl):

before
MESA_LOADER_DRIVER_OVERRIDE=zink ./glcts -n   74.77s user 76.44s system 33% cpu 7:32.38 total

after
MESA_LOADER_DRIVER_OVERRIDE=zink ./glcts -n   69.95s user 68.84s system 33% cpu 6:51.54 total

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16545>

---

 src/mesa/state_tracker/st_cb_texture.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index f36800feb55..485a056acfc 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -2435,8 +2435,11 @@ st_GetTexSubImage(struct gl_context * ctx,
       goto non_blit_transfer;
    }
 
+   if (stImage->pt != stObj->pt)
+      goto non_blit_transfer;
+
    /* Handle non-finalized textures. */
-   if (!stImage->pt || stImage->pt != stObj->pt || !src) {
+   if (!stImage->pt || !src) {
       goto cpu_transfer;
    }
 



More information about the mesa-commit mailing list