From 060d2988377d91c9ded54d6526360b975d8abc8c Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Mon, 24 Jul 2017 16:15:37 -0600 Subject: layers: GH1924, Improve unavailable feature msg Modified the unavailable requested feature error message to print the feature name instead of just an index. Change-Id: Idcb66921fc592014330dce6946631984d85cd866 --- layers/core_validation.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 00e36a8d..1fd79b84 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2009,12 +2009,11 @@ static bool ValidateRequestedFeatures(instance_layer_data *instance_data, const uint32_t total_bools = sizeof(VkPhysicalDeviceFeatures) / sizeof(VkBool32); for (uint32_t i = 0; i < total_bools; i++) { if (requested[i] > actual[i]) { - // TODO: Add index to struct member name helper to be able to include a feature name skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, DEVLIMITS_INVALID_FEATURE_REQUESTED, "DL", - "While calling vkCreateDevice(), requesting feature #%u in VkPhysicalDeviceFeatures struct, " + "While calling vkCreateDevice(), requesting feature '%s' in VkPhysicalDeviceFeatures struct, " "which is not available on this device.", - i); + GetPhysDevFeatureString(i)); errors++; } } -- cgit v1.2.3