diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-10-07 09:00:34 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-10-08 17:09:38 -0600 |
| commit | 72534d797af6cb8cd1111d612eb815b37bd88d56 (patch) | |
| tree | 25205906c29e02df994b3580136733d86d789d80 /layers/swapchain.cpp | |
| parent | b91cc0a75542de2639ec2498508807d50ce8b0a9 (diff) | |
| download | usermoji-72534d797af6cb8cd1111d612eb815b37bd88d56.tar.xz | |
layers: Fix Windows compile warnings
Diffstat (limited to 'layers/swapchain.cpp')
| -rw-r--r-- | layers/swapchain.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index 304f96b4..38d8e948 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -298,7 +298,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkEnumeratePhysicalDevices(VkInstance instance, u (*pPhysicalDeviceCount > 0)) { // Record the VkPhysicalDevices returned by the ICD: SwpInstance *pInstance = &instanceMap[instance]; - for (int i = 0; i < *pPhysicalDeviceCount; i++) { + for (uint32_t i = 0; i < *pPhysicalDeviceCount; i++) { physicalDeviceMap[pPhysicalDevices[i]].physicalDevice = pPhysicalDevices[i]; physicalDeviceMap[pPhysicalDevices[i]].pInstance = pInstance; @@ -508,7 +508,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkGetSurfaceFormatsKHR(VkDevice device, const VkS pDevice->pSurfaceFormats = (VkSurfaceFormatKHR *) malloc(*pCount * sizeof(VkSurfaceFormatKHR)); if (pDevice->pSurfaceFormats) { - for (int i = 0 ; i < *pCount ; i++) { + for (uint32_t i = 0 ; i < *pCount ; i++) { pDevice->pSurfaceFormats[i] = pSurfaceFormats[i]; } } else { @@ -554,7 +554,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkGetSurfacePresentModesKHR(VkDevice device, cons pDevice->pPresentModes = (VkPresentModeKHR *) malloc(*pCount * sizeof(VkPresentModeKHR)); if (pDevice->pSurfaceFormats) { - for (int i = 0 ; i < *pCount ; i++) { + for (uint32_t i = 0 ; i < *pCount ; i++) { pDevice->pPresentModes[i] = pPresentModes[i]; } } else { @@ -734,7 +734,7 @@ static VkBool32 validateCreateSwapchainKHR(VkDevice device, const VkSwapchainCre bool foundFormat = false; bool foundColorSpace = false; bool foundMatch = false; - for (int i = 0 ; i < pDevice->surfaceFormatCount ; i++) { + for (uint32_t i = 0 ; i < pDevice->surfaceFormatCount ; i++) { if (pCreateInfo->imageFormat == pDevice->pSurfaceFormats[i].format) { // Validate pCreateInfo->imageColorSpace against // VkSurfaceFormatKHR::colorSpace: @@ -790,7 +790,7 @@ static VkBool32 validateCreateSwapchainKHR(VkDevice device, const VkSwapchainCre // Validate pCreateInfo->presentMode against // vkGetSurfacePresentModesKHR(): bool foundMatch = false; - for (int i = 0 ; i < pDevice->presentModeCount ; i++) { + for (uint32_t i = 0 ; i < pDevice->presentModeCount ; i++) { if (pDevice->pPresentModes[i] == pCreateInfo->presentMode) { foundMatch = true; break; @@ -936,7 +936,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkGetSwapchainImagesKHR(VkDevice device, VkSwapch // Record the images and their state: if (pSwapchain) { pSwapchain->imageCount = *pCount; - for (int i = 0 ; i < *pCount ; i++) { + for (uint32_t i = 0 ; i < *pCount ; i++) { pSwapchain->images[i].image = pSwapchainImages[i]; pSwapchain->images[i].pSwapchain = pSwapchain; pSwapchain->images[i].ownedByApp = false; @@ -981,8 +981,8 @@ VK_LAYER_EXPORT VkResult VKAPI vkAcquireNextImageKHR(VkDevice device, VkSwapchai } else { // Look to see if the application is trying to own too many images at // the same time (i.e. not leave any to display): - int imagesOwnedByApp = 0; - for (int i = 0 ; i < pSwapchain->imageCount ; i++) { + uint32_t imagesOwnedByApp = 0; + for (uint32_t i = 0 ; i < pSwapchain->imageCount ; i++) { if (pSwapchain->images[i].ownedByApp) { imagesOwnedByApp++; } @@ -1034,8 +1034,8 @@ VK_LAYER_EXPORT VkResult VKAPI vkQueuePresentKHR(VkQueue queue, VkPresentInfoKHR VkBool32 skipCall = VK_FALSE; layer_data *my_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); - for (int i = 0; i < pPresentInfo->swapchainCount ; i++) { - int index = pPresentInfo->imageIndices[i]; + for (uint32_t i = 0; i < pPresentInfo->swapchainCount ; i++) { + uint32_t index = pPresentInfo->imageIndices[i]; SwpSwapchain *pSwapchain = &swapchainMap[pPresentInfo->swapchains[i].handle]; if (pSwapchain) { @@ -1084,7 +1084,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkQueuePresentKHR(VkQueue queue, VkPresentInfoKHR pPresentInfo); if ((result == VK_SUCCESS) || (result == VK_SUBOPTIMAL_KHR)) { - for (int i = 0; i < pPresentInfo->swapchainCount ; i++) { + for (uint32_t i = 0; i < pPresentInfo->swapchainCount ; i++) { int index = pPresentInfo->imageIndices[i]; SwpSwapchain *pSwapchain = &swapchainMap[pPresentInfo->swapchains[i].handle]; |
