From 24b644b8e39b63e93c1840255b22e06ad21813af Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 18 Jul 2016 19:39:38 +0200 Subject: [PATCH] Warning fix - don't reuse 'count' variable which could be confusing --- renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp index d1064cc0d..18b3a4791 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp @@ -652,13 +652,13 @@ VkResult WrappedVulkan::vkEnumeratePhysicalDevices(VkInstance instance, // find the queue with the most bits set and only report that one { - uint32_t count = 0; + uint32_t queuecount = 0; ObjDisp(m_PhysicalDevices[i]) - ->GetPhysicalDeviceQueueFamilyProperties(Unwrap(m_PhysicalDevices[i]), &count, NULL); + ->GetPhysicalDeviceQueueFamilyProperties(Unwrap(m_PhysicalDevices[i]), &queuecount, NULL); - VkQueueFamilyProperties *props = new VkQueueFamilyProperties[count]; + VkQueueFamilyProperties *props = new VkQueueFamilyProperties[queuecount]; ObjDisp(m_PhysicalDevices[i]) - ->GetPhysicalDeviceQueueFamilyProperties(Unwrap(m_PhysicalDevices[i]), &count, props); + ->GetPhysicalDeviceQueueFamilyProperties(Unwrap(m_PhysicalDevices[i]), &queuecount, props); uint32_t best = 0; @@ -666,7 +666,7 @@ VkResult WrappedVulkan::vkEnumeratePhysicalDevices(VkInstance instance, // implies it. We do have to check for compute bit, because there might // be a graphics only queue - it just means we have to keep looking // to find the grpahics & compute queue family which is guaranteed. - for(uint32_t q = 1; q < count; q++) + for(uint32_t q = 1; q < queuecount; q++) { // compare current against the known best VkQueueFamilyProperties ¤tProps = props[q];