nvk: Fix tautological-overlap-compare warning

../src/nouveau/vulkan/nvk_nir_lower_descriptors.c:145:55: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare]
  145 |    if (desc_type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER &&
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  146 |        desc_type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC)
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: f1c909edd5 ("nvk/nir: Add cbuf analysis to nvi_nir_lower_descriptors()")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26772>
This commit is contained in:
Vinson Lee 2023-12-19 20:54:41 -08:00 committed by Marge Bot
parent e61fae6eb8
commit 2464cd81d3

View file

@ -142,7 +142,7 @@ record_vulkan_resource_cbuf_use(nir_intrinsic_instr *intrin,
const VkDescriptorType desc_type = nir_intrinsic_desc_type(intrin);
/* These we'll handle later */
if (desc_type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER &&
if (desc_type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER ||
desc_type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC)
return;