From e73177d8c7f25ef291b9a5ece81de4e111a03af1 Mon Sep 17 00:00:00 2001 From: Jan-Harald Fredriksen Date: Wed, 8 Jun 2016 18:51:52 +0200 Subject: layers: PR632, Change devlimits errors to warnings Replace call sequence errors with warnings for vkEnumeratePhysicalDevices and GetPhysicalDeviceQueueFamilyProperties. Change-Id: I1505f4a2b339ac7ef435da8b3ec2f85612026a42 --- layers/device_limits.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'layers/device_limits.cpp') diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp index 374911b4..36d3d569 100644 --- a/layers/device_limits.cpp +++ b/layers/device_limits.cpp @@ -166,15 +166,16 @@ EnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, Vk my_data->instanceState->vkEnumeratePhysicalDevicesState = QUERY_COUNT; } else { if (UNCALLED == my_data->instanceState->vkEnumeratePhysicalDevicesState) { - // Flag error here, shouldn't be calling this without having queried count + // Flag warning here. You can call this without having queried the count, but it may not be + // robust on platforms with multiple physical devices. skipCall |= - log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, 0, - __LINE__, DEVLIMITS_MUST_QUERY_COUNT, "DL", - "Invalid call sequence to vkEnumeratePhysicalDevices() w/ non-NULL pPhysicalDevices. You should first " + log_msg(my_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, 0, + __LINE__, DEVLIMITS_MISSING_QUERY_COUNT, "DL", + "Call sequence has vkEnumeratePhysicalDevices() w/ non-NULL pPhysicalDevices. You should first " "call vkEnumeratePhysicalDevices() w/ NULL pPhysicalDevices to query pPhysicalDeviceCount."); } // TODO : Could also flag a warning if re-calling this function in QUERY_DETAILS state else if (my_data->instanceState->physicalDevicesCount != *pPhysicalDeviceCount) { - // TODO: Having actual count match count from app is not a requirement, so this can be a warning + // Having actual count match count from app is not a requirement, so this can be a warning skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, DEVLIMITS_COUNT_MISMATCH, "DL", "Call to vkEnumeratePhysicalDevices() w/ pPhysicalDeviceCount value %u, but actual count " @@ -247,9 +248,9 @@ GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t // Verify that for each physical device, this function is called first with NULL pQueueFamilyProperties ptr in order to // get count if (UNCALLED == phy_dev_data->physicalDeviceState->vkGetPhysicalDeviceQueueFamilyPropertiesState) { - skipCall |= log_msg(phy_dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, DEVLIMITS_MUST_QUERY_COUNT, "DL", - "Invalid call sequence to vkGetPhysicalDeviceQueueFamilyProperties() w/ non-NULL " + skipCall |= log_msg(phy_dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, DEVLIMITS_MISSING_QUERY_COUNT, "DL", + "Call sequence has vkGetPhysicalDeviceQueueFamilyProperties() w/ non-NULL " "pQueueFamilyProperties. You should first call vkGetPhysicalDeviceQueueFamilyProperties() w/ " "NULL pQueueFamilyProperties to query pCount."); } -- cgit v1.2.3