v3dv: Rely on the internal tiled flag instead of the common vk structure
authorRoman Stratiienko <r.stratiienko@gmail.com>
Sun, 10 Sep 2023 10:19:54 +0000 (13:19 +0300)
committerMarge Bot <emma+marge@anholt.net>
Mon, 11 Sep 2023 11:08:04 +0000 (11:08 +0000)
commitd74d017f7d73e1026cf367838c2a628ad1bae012
tree258b4f830895f947226aecaa15a528ddb807496b
parenta03525d8db7b0295c955aee04d1694a4a1b4493f
v3dv: Rely on the internal tiled flag instead of the common vk structure

Common vk.tiling can have 3 states:

VK_IMAGE_TILING_OPTIMAL = 0,
VK_IMAGE_TILING_LINEAR = 1,
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = 1000158000,

The latter is checked by [1]

In this case, actual tiling can be either linear or tiled;
therefore, logic in v3dv_meta_copy will not work correctly.

[1]: https://gitlab.freedesktop.org/mesa/mesa/-/blob/39fca243bb914cea853e9d3502f1f38e6bf96ad4/src/vulkan/runtime/vk_image.c#L158

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25139>
src/broadcom/vulkan/v3dv_image.c
src/broadcom/vulkan/v3dv_meta_copy.c