freedreno/a6xx: Set the color_swap field for storage descriptors.
authorEmma Anholt <emma@anholt.net>
Wed, 9 Mar 2022 18:00:34 +0000 (10:00 -0800)
committerMarge Bot <emma+marge@anholt.net>
Sat, 2 Apr 2022 19:55:40 +0000 (19:55 +0000)
This field does appear to work as expected: with 1D/1DArray turnip storage
images switched to be always linear, it fixes the dEQP-VK.image.*store*
tests using a color swapped format (once we allow color swap).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15293>

src/freedreno/fdl/fd6_view.c

index 0c65e6c..b6dce31 100644 (file)
@@ -342,7 +342,8 @@ fdl6_view_init(struct fdl6_view *view, const struct fdl_layout **layouts,
    view->storage_descriptor[0] =
       A6XX_TEX_CONST_0_FMT(storage_format) |
       fdl6_texswiz(args, has_z24uint_s8uint) |
-      A6XX_TEX_CONST_0_TILE_MODE(tile_mode);
+      A6XX_TEX_CONST_0_TILE_MODE(tile_mode) |
+      A6XX_TEX_CONST_0_SWAP(color_swap);
    view->storage_descriptor[1] = view->descriptor[1];
    view->storage_descriptor[2] =
       A6XX_TEX_CONST_2_PITCH(pitch) |