mesa/src/amd
Simon Ser 7ef2046065 radv: only set BO metadata for the first plane
To properly support multi-planar images, we don't want to set metadata
on anything other than the first plane. To achieve this radv currently
checks for the image TILING and assumes LINEAR means it's not the first
plane.

However this doesn't account for images with a single LINEAR plane. We
still want to set metadata on those, e.g. to properly set the scanout
bit in the tiling flags.

Instead of checking for LINEAR, check if the offset is zero. Only the
first plane has a zero offset on AMD.

This mirrors the radeonsi logic [1].

While at it, move the metadata declaration into the if block.

[1]: 6fecdc6dda/src/gallium/drivers/radeonsi/si_texture.c (L710)

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8086>
2021-01-08 14:52:18 +00:00
..
addrlib amd/addrlib: use cpp.has_argument() to filter compiler arguments 2021-01-05 11:29:11 +00:00
common ac/sqtt: move radv_get_expected_buffer_size to ac 2021-01-07 10:10:16 +01:00
compiler aco: form sparse load clauses 2021-01-08 14:27:07 +00:00
llvm ac/nir: implement sparse image/texture loads 2021-01-08 14:27:07 +00:00
registers amd/registers: add missing VRS registers 2020-12-14 16:22:38 +00:00
vulkan radv: only set BO metadata for the first plane 2021-01-08 14:52:18 +00:00
Android.addrlib.mk android: amd/addrlib: add gfx10 support 2019-07-10 09:03:55 +02:00
Android.common.mk android: amd/registers: switch to new generated register definitions 2020-09-06 20:20:34 +02:00
Android.compiler.mk android: aco/isel: Move context initialization code to a dedicated file 2020-09-14 21:26:53 +02:00
Android.mk android: aco: add support for libmesa_aco 2019-09-28 15:56:34 +02:00
Makefile.sources ac/radv: move radv_rgp.c to ac 2021-01-07 10:09:49 +01:00
meson.build aco: add framework for unit testing 2020-07-30 16:13:08 +00:00