anv: Fix stride mismatch in mesa and minigbm
authorSai Teja Pottumuttu <sai.teja.pottumuttu@intel.com>
Tue, 28 Mar 2023 10:13:05 +0000 (10:13 +0000)
committerMarge Bot <emma+marge@anholt.net>
Wed, 29 Mar 2023 07:09:28 +0000 (07:09 +0000)
commit11d32fb44f8bef31c5f76909cc88ade2de435a08
treeb43b601a6d9971107c90810966c1bf968741cbbb
parentca4ec49b0e0f51a3245c924ab50379673f11abfb
anv: Fix stride mismatch in mesa and minigbm

It is observed that in display resolutions where width is not equal to
stride, vulkan rendering is being distorted. This is happening due to
stride calculation mismatch between minigbm and mesa.

This fix makes sure that the stride calculated in minigbm is passed to
anv and isl.

The issue was found while debugging the following android cts tests and
thus fixes them as well.
android.graphics.cts.VulkanPreTransformTest#testVulkanPreTransformNotSetToMatchCurrentTransform
android.graphics.cts.VulkanPreTransformTest#testVulkanPreTransformSetToMatchCurrentTransform

Signed-off-by: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22163>
src/intel/vulkan/anv_android.c
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_private.h