intel/isl: Allow creating non-Y-tiled ASTC surfaces
authorNanley Chery <nanley.g.chery@intel.com>
Fri, 12 Nov 2021 14:42:22 +0000 (09:42 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 30 Nov 2021 13:36:35 +0000 (13:36 +0000)
commitcaa998ca8ffcae42d85aabba6c1e75f8a65e1ea3
treebeae491400e008a9c42128439686266f4210aba8
parent574c5d15406405d65d1a3b640a3514f2935e4df8
intel/isl: Allow creating non-Y-tiled ASTC surfaces

The sampler can only decode ASTC surfaces that are Y-tiled. ISL has
been asserting this restriction at surface creation time.

However, some drivers want to create a surface that is only used for
copying compressed data. And during the copy, the surface won't have a
compressed format.

To enable this behavior, we choose to move the tiling assertion to the
moment a surface state is created for the sampler.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13881>
src/intel/isl/isl_gfx7.c
src/intel/isl/isl_surface_state.c