From 813808688922a0520e76ed172001a8b679cafae1 Mon Sep 17 00:00:00 2001 From: "Thomas H.P. Andersen" Date: Wed, 23 Mar 2022 01:02:46 +0100 Subject: [PATCH] pvr: fix overlapping comparison The comparison here will always be true. This changes it so height is only set if the type is not a 1D. Fixes a warning with clang Reviewed-by: Adam Jackson Reviewed-by: Frank Binns Part-of: --- src/imagination/vulkan/pvr_tex_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imagination/vulkan/pvr_tex_state.c b/src/imagination/vulkan/pvr_tex_state.c index 4ad37ee51bd..bc7ddae8bc5 100644 --- a/src/imagination/vulkan/pvr_tex_state.c +++ b/src/imagination/vulkan/pvr_tex_state.c @@ -127,7 +127,7 @@ pvr_pack_tex_state(struct pvr_device *device, } word0.width = info->extent.width - 1; - if (info->type != VK_IMAGE_VIEW_TYPE_1D || + if (info->type != VK_IMAGE_VIEW_TYPE_1D && info->type != VK_IMAGE_VIEW_TYPE_1D_ARRAY) word0.height = info->extent.height - 1; }