freedreno/a6xx: Don't try to do Z-as-RGBA blits for mismatched formats.
authorEric Anholt <eric@anholt.net>
Mon, 19 Apr 2021 18:49:14 +0000 (11:49 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 19 Apr 2021 22:26:24 +0000 (22:26 +0000)
commited04fd44ca5d7827100b334840c7fa95d38d23ce
tree16f4fc025efff8df9d6f36ac27d1336428d27685
parent856953b131d573cab6f304df54b4ba877fb7d52c
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
src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt