From 4ec052187a2a05bd45e23061154feb9b76006068 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Fri, 14 Apr 2023 11:33:01 +0200 Subject: [PATCH] vulkan: Fix GetPhysicalDeviceSparseImageFormatProperties definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To match its declaration (and the corresponding definition in Vulkan headers). Pointed out by GCC 13: ../src/vulkan/runtime/vk_physical_device.c:230:1: warning: conflicting types for ‘vk_common_GetPhysicalDeviceSparseImageFormatProperties’ due to enum/integer mismatch; have ‘void(struct VkPhysicalDevice_T *, VkFormat, VkImageType, uint32_t, VkImageUsageFlags, VkImageTiling, uint32_t *, VkSparseImageFormatProperties *)’ {aka ‘void(struct VkPhysicalDevice_T *, VkFormat, VkImageType, unsigned int, unsigned int, VkImageTiling, unsigned int *, VkSparseImageFormatProperties *)’} [-Wenum-int-mismatch] 230 | vk_common_GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/vulkan/runtime/vk_physical_device.c:26: src/vulkan/runtime/vk_common_entrypoints.h:116:30: note: previous declaration of ‘vk_common_GetPhysicalDeviceSparseImageFormatProperties’ with type ‘void(struct VkPhysicalDevice_T *, VkFormat, VkImageType, VkSampleCountFlagBits, VkImageUsageFlags, VkImageTiling, uint32_t *, VkSparseImageFormatProperties *)’ {aka ‘void(struct VkPhysicalDevice_T *, VkFormat, VkImageType, VkSampleCountFlagBits, unsigned int, VkImageTiling, unsigned int *, VkSparseImageFormatProperties *)’} 116 | VKAPI_ATTR void VKAPI_CALL vk_common_GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Part-of: --- src/vulkan/runtime/vk_physical_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vulkan/runtime/vk_physical_device.c b/src/vulkan/runtime/vk_physical_device.c index 4f36779..977ca83 100644 --- a/src/vulkan/runtime/vk_physical_device.c +++ b/src/vulkan/runtime/vk_physical_device.c @@ -230,7 +230,7 @@ VKAPI_ATTR void VKAPI_CALL vk_common_GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, - uint32_t samples, + VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t *pNumProperties, -- 2.7.4