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

Author: Erik Faye-Lund <[email protected]>
Date:   Tue Sep  6 11:03:58 2022 +0200

vc4: respect z-offset in tiled blits

Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Emma Anholt <[email protected]>
Tested-by: Eric Engestrom <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18427>

---

 src/broadcom/ci/broadcom-rpi3-fails.txt |  3 ---
 src/gallium/drivers/vc4/vc4_blit.c      | 12 +++++++-----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/broadcom/ci/broadcom-rpi3-fails.txt 
b/src/broadcom/ci/broadcom-rpi3-fails.txt
index 545fa3260b1..0a22d951d88 100644
--- a/src/broadcom/ci/broadcom-rpi3-fails.txt
+++ b/src/broadcom/ci/broadcom-rpi3-fails.txt
@@ -1213,6 +1213,3 @@ spec@ext_texture_compression_s3tc@compressedteximage 
gl_compressed_srgb_alpha_s3
 spec@ext_texture_compression_s3tc@compressedteximage 
gl_compressed_srgb_alpha_s3tc_dxt5_ext,Fail
 spec@ext_texture_compression_s3tc@compressedteximage 
gl_compressed_srgb_s3tc_dxt1_ext,Fail
 spec@ext_texture_compression_s3tc@compressedteximage 
gl_compressed_rgba_s3tc_dxt3_ext,Fail
-
-# see https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18427
-spec@ext_texture_compression_s3tc@getteximage-targets cube s3tc,Fail
diff --git a/src/gallium/drivers/vc4/vc4_blit.c 
b/src/gallium/drivers/vc4/vc4_blit.c
index e63ef6108fb..558bbb7780d 100644
--- a/src/gallium/drivers/vc4/vc4_blit.c
+++ b/src/gallium/drivers/vc4/vc4_blit.c
@@ -29,15 +29,15 @@
 
 static struct pipe_surface *
 vc4_get_blit_surface(struct pipe_context *pctx,
-                     struct pipe_resource *prsc, unsigned level)
+                     struct pipe_resource *prsc, unsigned level,
+                     unsigned layer)
 {
         struct pipe_surface tmpl;
 
         memset(&tmpl, 0, sizeof(tmpl));
         tmpl.format = prsc->format;
         tmpl.u.tex.level = level;
-        tmpl.u.tex.first_layer = 0;
-        tmpl.u.tex.last_layer = 0;
+        tmpl.u.tex.first_layer = tmpl.u.tex.last_layer = layer;
 
         return pctx->create_surface(pctx, prsc, &tmpl);
 }
@@ -123,9 +123,11 @@ vc4_tile_blit(struct pipe_context *pctx, const struct 
pipe_blit_info *info)
         }
 
         struct pipe_surface *dst_surf =
-                vc4_get_blit_surface(pctx, info->dst.resource, 
info->dst.level);
+                vc4_get_blit_surface(pctx, info->dst.resource, info->dst.level,
+                                           info->dst.box.z);
         struct pipe_surface *src_surf =
-                vc4_get_blit_surface(pctx, info->src.resource, 
info->src.level);
+                vc4_get_blit_surface(pctx, info->src.resource, info->src.level,
+                                           info->src.box.z);
 
         vc4_flush_jobs_reading_resource(vc4, info->src.resource);
 

Reply via email to