From bf9d6b96e069546b0095885b0eb4075e4fd5c637 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Tue, 24 Sep 2024 15:24:02 +0200 Subject: [PATCH] panvk: Use the proper alignment for texture payloads Texture is aligned on 32-byte, which matches the plane or multiplanar surface descriptor constraint, and exceeds the surface descriptor one, but let's be accurate and use the right descriptor alignment. Signed-off-by: Boris Brezillon Reviewed-by: Mary Guillemard Part-of: --- src/panfrost/vulkan/panvk_vX_image_view.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/panfrost/vulkan/panvk_vX_image_view.c b/src/panfrost/vulkan/panvk_vX_image_view.c index 7f86ad4420d..bc2fa3ca771 100644 --- a/src/panfrost/vulkan/panvk_vX_image_view.c +++ b/src/panfrost/vulkan/panvk_vX_image_view.c @@ -149,7 +149,13 @@ panvk_per_arch(CreateImageView)(VkDevice _device, } struct panvk_pool_alloc_info alloc_info = { - .alignment = pan_alignment(TEXTURE), +#if PAN_ARCH == 6 + .alignment = pan_alignment(SURFACE_WITH_STRIDE), +#elif PAN_ARCH == 7 + .alignment = pan_alignment(MULTIPLANAR_SURFACE), +#else + .alignment = pan_alignment(PLANE), +#endif .size = GENX(panfrost_estimate_texture_payload_size)(&pview), };