aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2016-08-08 10:18:49 -0600
committerMark Lobodzinski <mark@lunarg.com>2016-08-16 14:19:55 -0600
commitfc5a1570c23e82d81987842445030703ae52ec6d (patch)
tree57040a311618d0e6a7ea7cc7078831a968ef9f88
parentcf6e84241e40bfa72a7e06f89db383f9e400850a (diff)
downloadusermoji-fc5a1570c23e82d81987842445030703ae52ec6d.tar.xz
layers: Remove swapchain INVALID_COUNT macro
Change-Id: I44d19882af69541cfe9876a22fecc0a09056ba0b
-rw-r--r--layers/swapchain.cpp26
-rw-r--r--layers/swapchain.h7
2 files changed, 18 insertions, 15 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp
index 5b8bcfcf..6b447edc 100644
--- a/layers/swapchain.cpp
+++ b/layers/swapchain.cpp
@@ -1456,9 +1456,12 @@ GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR
skipCall |= LOG_ERROR_ZERO_PRIOR_COUNT(VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, physicalDevice,
"pSurfaceFormatCount", "pSurfaceFormats");
} else if (*pSurfaceFormatCount > pPhysicalDevice->surfaceFormatCount) {
- skipCall |=
- LOG_ERROR_INVALID_COUNT(VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, physicalDevice, "pSurfaceFormatCount",
- "pSurfaceFormats", *pSurfaceFormatCount, pPhysicalDevice->surfaceFormatCount);
+ skipCall |= log_msg(
+ my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
+ (uint64_t)pPhysicalDevice->physicalDevice, __LINE__, SWAPCHAIN_INVALID_COUNT, swapchain_layer_name,
+ "vkGetPhysicalDeviceSurfaceFormatsKHR() called with non-NULL pSurfaceFormatCount, and with pSurfaceFormats set to "
+ "a value (%d) that is greater than the value (%d) that was returned when pSurfaceFormatCount was NULL.",
+ *pSurfaceFormatCount, pPhysicalDevice->surfaceFormatCount);
}
}
lock.unlock();
@@ -1527,9 +1530,12 @@ GetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfa
skipCall |= LOG_ERROR_ZERO_PRIOR_COUNT(VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, physicalDevice,
"pPresentModeCount", "pPresentModes");
} else if (*pPresentModeCount > pPhysicalDevice->presentModeCount) {
- skipCall |=
- LOG_ERROR_INVALID_COUNT(VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, physicalDevice, "pPresentModeCount",
- "pPresentModes", *pPresentModeCount, pPhysicalDevice->presentModeCount);
+ skipCall |= log_msg(
+ my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
+ (uint64_t)pPhysicalDevice->physicalDevice, __LINE__, SWAPCHAIN_INVALID_COUNT, swapchain_layer_name,
+ "vkGetPhysicalDeviceSurfacePresentModesKHR() called with non-NULL pPresentModeCount, and with pPresentModes set to "
+ "a value (%d) that is greater than the value (%d) that was returned when pPresentModeCount was NULL.",
+ *pPresentModeCount, pPhysicalDevice->presentModeCount);
}
}
lock.unlock();
@@ -2022,8 +2028,12 @@ GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwap
skipCall |= LOG_ERROR_ZERO_PRIOR_COUNT(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, device, "pSwapchainImageCount",
"pSwapchainImages");
} else if (*pSwapchainImageCount > pSwapchain->imageCount) {
- skipCall |= LOG_ERROR_INVALID_COUNT(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, device, "pSwapchainImageCount",
- "pSwapchainImages", *pSwapchainImageCount, pSwapchain->imageCount);
+ skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
+ (uint64_t)device, __LINE__, SWAPCHAIN_INVALID_COUNT, swapchain_layer_name,
+ "vkGetSwapchainImagesKHR() called with non-NULL pSwapchainImageCount, and with "
+ "pSwapchainImages set to a value (%d) that is greater than the value (%d) that was returned when "
+ "pSwapchainImageCount was NULL.",
+ *pSwapchainImageCount, pSwapchain->imageCount);
}
}
lock.unlock();
diff --git a/layers/swapchain.h b/layers/swapchain.h
index d78e4cf6..f1717883 100644
--- a/layers/swapchain.h
+++ b/layers/swapchain.h
@@ -84,13 +84,6 @@ const char * swapchain_layer_name = "Swapchain";
#define LAYER_NAME (char *) "Swapchain"
-#define LOG_ERROR_INVALID_COUNT(objType, type, obj, obj2, val, val2) \
- (my_data) ? log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (objType), (uint64_t)(obj), 0, \
- SWAPCHAIN_INVALID_COUNT, LAYER_NAME, "%s() called with non-NULL %s, and with %s set to a " \
- "value (%d) that is greater than the value (%d) that " \
- "was returned when %s was NULL.", \
- __FUNCTION__, (obj2), (obj), (val), (val2), (obj2)) \
- : VK_FALSE
#define LOG_ERROR_ZERO_PRIOR_COUNT(objType, type, obj, obj2) \
(my_data) ? log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (objType), (uint64_t)(obj), 0, \
SWAPCHAIN_PRIOR_COUNT, LAYER_NAME, "%s() called with non-NULL %s; but no prior " \