radeonsi: Fix compute copies for subsampled formats.
authorBas Nieuwenhuizen <basni@chromium.org>
Tue, 18 Feb 2020 14:22:39 +0000 (15:22 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 19 Feb 2020 22:51:12 +0000 (22:51 +0000)
commit68d1757420be28e99e4e919ed2e0c6062e2460c5
tree0b8b3446db45ae5e5860628fa1d5318ae2de2692
parentd795eb207ff90e4885a278910fdc87e932242da6
radeonsi: Fix compute copies for subsampled formats.

We cannot do image stores (or render) to subsampled formats.

Reinterpret as R32_UINT instead.

si_set_shader_image_desc already uses the blockwidth from
the view formats, so the image width adjustments are
already implemented.

This is still icky with mipmapping on GFX9+ though, but
since it is mostly a video format I don't think that will
be much of an issue and broken mipmapping is still better
than broken everything.

Fixes: e5167a9276d "radeonsi: disable SDMA on gfx8 to fix corruption on RX 580"
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2535
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3853>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3853>
src/gallium/drivers/radeonsi/si_compute_blit.c