From abd4f19c3b07b70e8061f36c7cfe06976bf5ea36 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Mon, 9 Mar 2026 17:33:48 +0800 Subject: [PATCH] pvr: handle LINEAR 1D array textures like TWIDDLED ones Twiddling 1D image isn't a thing at all, so 1D textures have LINEAR and TWIDDLED being equal, and when it's LINEAR the layout is internally overriden to TWIDDLED when filling texture states. However currently 1D array textures are forgot in the overriding codepath. Handle LINEAR 1D array textures like TWIDDLED ones too. Signed-off-by: Icenowy Zheng --- src/imagination/vulkan/pvr_arch_tex_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/imagination/vulkan/pvr_arch_tex_state.c b/src/imagination/vulkan/pvr_arch_tex_state.c index 8233913f926..e7da6a4197b 100644 --- a/src/imagination/vulkan/pvr_arch_tex_state.c +++ b/src/imagination/vulkan/pvr_arch_tex_state.c @@ -121,7 +121,8 @@ VkResult pvr_arch_pack_tex_state(struct pvr_device *device, enum pvr_memlayout mem_layout; VkImageViewType iview_type; - if (info->type == VK_IMAGE_VIEW_TYPE_1D && + if ((info->type == VK_IMAGE_VIEW_TYPE_1D || + info->type == VK_IMAGE_VIEW_TYPE_1D_ARRAY) && info->mem_layout == PVR_MEMLAYOUT_LINEAR) { /* Change the memory layout to twiddled as there isn't a TEXSTATE_TEXTYPE * for 1D linear and 1D twiddled is equivalent.