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 <ajax@redhat.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15514>
This commit is contained in:
Thomas H.P. Andersen 2022-03-23 01:02:46 +01:00 committed by Marge Bot
parent df059c6781
commit 8138086889

View file

@ -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;
}