diff options
| author | Jan-Harald Fredriksen <jan-harald.fredriksen@arm.com> | 2016-06-08 18:51:52 +0200 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-06-09 10:49:32 -0600 |
| commit | e73177d8c7f25ef291b9a5ece81de4e111a03af1 (patch) | |
| tree | 434a9abdc620a9aa4de2073ba22a0505587c7675 /layers/device_limits.cpp | |
| parent | f99171e3401949aa86e0c0cca31fca3c9b229b5d (diff) | |
| download | usermoji-e73177d8c7f25ef291b9a5ece81de4e111a03af1.tar.xz | |
layers: PR632, Change devlimits errors to warnings
Replace call sequence errors with warnings for
vkEnumeratePhysicalDevices and GetPhysicalDeviceQueueFamilyProperties.
Change-Id: I1505f4a2b339ac7ef435da8b3ec2f85612026a42
Diffstat (limited to 'layers/device_limits.cpp')
| -rw-r--r-- | layers/device_limits.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
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."); } |
