Mesa (master): freedreno/a6xx: Don't try to do Z-as-RGBA blits for mismatched formats.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Apr 19 22:45:34 UTC 2021
Module: Mesa
Branch: master
Commit: ed04fd44ca5d7827100b334840c7fa95d38d23ce
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed04fd44ca5d7827100b334840c7fa95d38d23ce
Author: Eric Anholt <eric at anholt.net>
Date: Mon Apr 19 11:49:14 2021 -0700
freedreno/a6xx: Don't try to do Z-as-RGBA blits for mismatched formats.
Fixes piglit crashes doing glCopyTexSubImage from (for example)
PIPE_FORMAT_Z24_UNORM_S8_UINT to PIPE_FORMAT_Z32_FLOAT_S8X24_UINT where,
in addition to reading the source Z values incorrectly, we would try to
dereference the missing separate stencil of the Z24S8 buffer.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10328>
---
src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 3 +++
.../drivers/freedreno/ci/piglit-freedreno-a630-fails.txt | 14 --------------
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
index 33ee7eaf3a4..9896d1f6da2 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
@@ -1006,6 +1006,9 @@ handle_zs_blit(struct fd_context *ctx,
dump_blit_info(info);
}
+ if (info->src.format != info->dst.format)
+ return false;
+
struct fd_resource *src = fd_resource(info->src.resource);
struct fd_resource *dst = fd_resource(info->dst.resource);
diff --git a/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt b/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt
index b003eec330d..f8bcfae23f7 100644
--- a/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt
+++ b/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt
@@ -35,8 +35,6 @@ spec@!opengl 1.0 at gl-1.0-no-op-paths,Fail
spec@!opengl 1.0 at gl-1.0-scissor-offscreen,Fail
spec@!opengl 1.0 at gl-1.0-spot-light,Fail
spec@!opengl 1.0 at rasterpos,Crash
-spec@!opengl 1.1 at copyteximage 1d,Crash
-spec@!opengl 1.1 at copyteximage 2d,Crash
spec@!opengl 1.1 at draw-pixels,Fail
spec@!opengl 1.1 at getteximage-depth,Fail
spec@!opengl 1.1 at getteximage-formats,Fail
@@ -179,15 +177,9 @@ spec at arb_texture_buffer_object@formats (fs- arb),Fail
spec at arb_texture_buffer_object@formats (vs- arb),Fail
spec at arb_texture_compression@texwrap formats bordercolor-swizzled,Fail
spec at arb_texture_compression_bptc@texwrap formats bordercolor-swizzled,Fail
-spec at arb_texture_cube_map@copyteximage cube,Crash
-spec at arb_texture_cube_map@copyteximage cube samples=2,Crash
-spec at arb_texture_cube_map@copyteximage cube samples=4,Crash
spec at arb_texture_float@fbo-blending-formats,Fail
spec at arb_texture_float@texwrap formats bordercolor-swizzled,Fail
spec at arb_texture_rectangle@1-1-linear-texture,Fail
-spec at arb_texture_rectangle@copyteximage rect,Crash
-spec at arb_texture_rectangle@copyteximage rect samples=2,Crash
-spec at arb_texture_rectangle@copyteximage rect samples=4,Crash
spec at arb_texture_rg@texwrap formats bordercolor-swizzled,Fail
spec at arb_texture_rg@texwrap formats-float bordercolor-swizzled,Fail
spec at arb_texture_rg@texwrap formats-int bordercolor-swizzled,Fail
@@ -282,12 +274,6 @@ spec at ext_packed_depth_stencil@texwrap formats bordercolor,Fail
spec at ext_packed_depth_stencil@texwrap formats bordercolor-swizzled,Fail
spec at ext_packed_float@query-rgba-signed-components,Fail
spec at ext_packed_float@texwrap formats bordercolor-swizzled,Fail
-spec at ext_texture_array@copyteximage 1d_array,Crash
-spec at ext_texture_array@copyteximage 1d_array samples=2,Crash
-spec at ext_texture_array@copyteximage 1d_array samples=4,Crash
-spec at ext_texture_array@copyteximage 2d_array,Crash
-spec at ext_texture_array@copyteximage 2d_array samples=2,Crash
-spec at ext_texture_array@copyteximage 2d_array samples=4,Crash
spec at ext_texture_array@fbo-depth-array depth-layered-clear,Crash
spec at ext_texture_array@fbo-depth-array stencil-layered-clear,Crash
spec at ext_texture_compression_rgtc@texwrap formats bordercolor-swizzled,Fail
More information about the mesa-commit
mailing list