aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Mc Donnell <michael@mcdonnell.dk>2016-04-03 14:47:51 -0700
committerDustin Graves <dustin@lunarg.com>2016-04-04 15:06:31 -0600
commit1968b5ff0ebb9a6e6f6d2afc157a94f610c9bea1 (patch)
tree61c1f36e0ab3f446640f38c0eb062c4b6ef5835d
parentd39940e4551ac55c3eaf1f23ceb3642d60d962bb (diff)
downloadusermoji-1968b5ff0ebb9a6e6f6d2afc157a94f610c9bea1.tar.xz
layers: Fix 7 signed/unsigned comparison warnings on VS2015
-rw-r--r--layers/core_validation.cpp6
-rw-r--r--layers/swapchain.cpp2
-rw-r--r--layers/threading.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 1f99480e..7cc7979c 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -1488,7 +1488,7 @@ static void collect_interface_by_location(layer_data *my_data, shader_module con
/* find the end of the entrypoint's name string. additional zero bytes follow the actual null
terminator, to fill out the rest of the word - so we only need to look at the last byte in
the word to determine which word contains the terminator. */
- auto word = 3;
+ uint32_t word = 3;
while (entrypoint.word(word) & 0xff000000u) {
++word;
}
@@ -1973,13 +1973,13 @@ static void mark_accessible_ids(shader_module const *src, spirv_inst_iter entryp
worklist.insert(insn.word(1)); /* image -- different operand order to above */
break;
case spv::OpFunctionCall:
- for (auto i = 3; i < insn.len(); i++) {
+ for (uint32_t i = 3; i < insn.len(); i++) {
worklist.insert(insn.word(i)); /* fn itself, and all args */
}
break;
case spv::OpExtInst:
- for (auto i = 5; i < insn.len(); i++) {
+ for (uint32_t i = 5; i < insn.len(); i++) {
worklist.insert(insn.word(i)); /* operands to ext inst */
}
break;
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp
index 1feabfdd..bbeb2674 100644
--- a/layers/swapchain.cpp
+++ b/layers/swapchain.cpp
@@ -1284,7 +1284,7 @@ static VkBool32 validateCreateSwapchainKHR(VkDevice device, const VkSwapchainCre
// Validate pCreateInfo values with result of
// vkGetPhysicalDeviceQueueFamilyProperties
if (pPhysicalDevice && pPhysicalDevice->gotQueueFamilyPropertyCount) {
- for (auto i = 0; i < pCreateInfo->queueFamilyIndexCount; i++) {
+ for (uint32_t i = 0; i < pCreateInfo->queueFamilyIndexCount; i++) {
if (pCreateInfo->pQueueFamilyIndices[i] >= pPhysicalDevice->numOfQueueFamilies) {
skipCall |= LOG_ERROR_QUEUE_FAMILY_INDEX_TOO_LARGE(VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, pPhysicalDevice,
"VkPhysicalDevice", pCreateInfo->pQueueFamilyIndices[i],
diff --git a/layers/threading.cpp b/layers/threading.cpp
index a75bcdc5..51381848 100644
--- a/layers/threading.cpp
+++ b/layers/threading.cpp
@@ -310,7 +310,7 @@ vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAl
// Record mapping from command buffer to command pool
if (VK_SUCCESS == result) {
- for (int index = 0; index < pAllocateInfo->commandBufferCount; index++) {
+ for (uint32_t index = 0; index < pAllocateInfo->commandBufferCount; index++) {
loader_platform_thread_lock_mutex(&threadingLock);
command_pool_map[pCommandBuffers[index]] = pAllocateInfo->commandPool;
loader_platform_thread_unlock_mutex(&threadingLock);
@@ -328,14 +328,14 @@ void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool,
const bool lockCommandPool = false; // pool is already directly locked
startReadObject(my_data, device);
startWriteObject(my_data, commandPool);
- for (int index = 0; index < commandBufferCount; index++) {
+ for (uint32_t index = 0; index < commandBufferCount; index++) {
startWriteObject(my_data, pCommandBuffers[index], lockCommandPool);
}
pTable->FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers);
finishReadObject(my_data, device);
finishWriteObject(my_data, commandPool);
- for (int index = 0; index < commandBufferCount; index++) {
+ for (uint32_t index = 0; index < commandBufferCount; index++) {
finishWriteObject(my_data, pCommandBuffers[index], lockCommandPool);
loader_platform_thread_lock_mutex(&threadingLock);
command_pool_map.erase(pCommandBuffers[index]);