aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2016-08-08 11:20:36 -0600
committerMark Lobodzinski <mark@lunarg.com>2016-08-16 14:19:55 -0600
commit6d427bb7c76b2ac1c4fa9d8e389f0941b2c2ec26 (patch)
tree3ed07f72c05a2abdcd521767bb0818a96e97c162
parent741bee06be1f9889b5fa29c245f29c75371e7164 (diff)
downloadusermoji-6d427bb7c76b2ac1c4fa9d8e389f0941b2c2ec26.tar.xz
layers: Fixed swapchain layer warning messages
Macro used incorrect parameter layout -- removed and in-lined log_msg calls. Change-Id: I2a21be76f83eed9fb3055f6f57f22204c9ea76f0
-rw-r--r--layers/swapchain.cpp18
-rw-r--r--layers/swapchain.h4
2 files changed, 10 insertions, 12 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp
index 1cf838d8..e798a3d4 100644
--- a/layers/swapchain.cpp
+++ b/layers/swapchain.cpp
@@ -927,10 +927,11 @@ GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t pl
if (!pPhysicalDevice->gotDisplayPlanePropertyCount)
{
- LOG_WARNING(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, pPhysicalDevice->pInstance, "planeIndex",
- SWAPCHAIN_GET_SUPPORTED_DISPLAYS_WITHOUT_QUERY,
- "Potential problem with calling %s() without first querying vkGetPhysicalDeviceDisplayPlanePropertiesKHR.",
- __FUNCTION__);
+ skipCall |=
+ log_msg(my_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
+ (uint64_t)pPhysicalDevice->pInstance->instance, __LINE__, SWAPCHAIN_GET_SUPPORTED_DISPLAYS_WITHOUT_QUERY,
+ swapchain_layer_name, "Potential problem with calling vkGetDisplayPlaneSupportedDisplaysKHR() without first "
+ "querying vkGetPhysicalDeviceDisplayPlanePropertiesKHR.");
}
if (pPhysicalDevice->gotDisplayPlanePropertyCount && planeIndex >= pPhysicalDevice->displayPlanePropertyCount)
@@ -1037,10 +1038,11 @@ GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR
if (!pPhysicalDevice->gotDisplayPlanePropertyCount)
{
- LOG_WARNING(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, pPhysicalDevice->pInstance, "planeIndex",
- SWAPCHAIN_GET_SUPPORTED_DISPLAYS_WITHOUT_QUERY,
- "Potential problem with calling %s() without first querying vkGetPhysicalDeviceDisplayPlanePropertiesKHR.",
- __FUNCTION__);
+ skipCall |=
+ log_msg(my_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
+ (uint64_t)pPhysicalDevice->pInstance->instance, __LINE__, SWAPCHAIN_GET_SUPPORTED_DISPLAYS_WITHOUT_QUERY,
+ swapchain_layer_name, "Potential problem with calling vkGetDisplayPlaneCapabilitiesKHR() without first "
+ "querying vkGetPhysicalDeviceDisplayPlanePropertiesKHR.");
}
if (pPhysicalDevice->gotDisplayPlanePropertyCount && planeIndex >= pPhysicalDevice->displayPlanePropertyCount)
diff --git a/layers/swapchain.h b/layers/swapchain.h
index 7221c582..2c885257 100644
--- a/layers/swapchain.h
+++ b/layers/swapchain.h
@@ -84,10 +84,6 @@ const char * swapchain_layer_name = "Swapchain";
#define LAYER_NAME (char *) "Swapchain"
-#define LOG_WARNING(objType, type, obj, enm, fmt, ...) \
- (my_data) ? log_msg(my_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, (objType), (uint64_t)(obj), __LINE__, (enm), \
- LAYER_NAME, (fmt), __VA_ARGS__) \
- : VK_FALSE
#define LOG_INFO_WRONG_NEXT(objType, type, obj) \
(my_data) ? log_msg(my_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, (objType), (uint64_t)(obj), 0, \
SWAPCHAIN_WRONG_NEXT, LAYER_NAME, "%s() called with non-NULL value for %s->pNext.", __FUNCTION__, (obj)) \