From 141e92a9ff34279bae736f5650d83a8741e22b54 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Fri, 30 Mar 2018 10:09:03 -0600 Subject: layers: Remove VUID spec text from log_msg strings Removed format specifiers from log_msg text strings Removed validation_error_map specifiers from log_msg parameter lists Change-Id: I5bd22c60dabf534382ca4d371ef4dffff1829f6d --- layers/parameter_validation_utils.cpp | 580 +++++++++++++++------------------- 1 file changed, 252 insertions(+), 328 deletions(-) (limited to 'layers/parameter_validation_utils.cpp') diff --git a/layers/parameter_validation_utils.cpp b/layers/parameter_validation_utils.cpp index 6bebe874..d75e3ac3 100644 --- a/layers/parameter_validation_utils.cpp +++ b/layers/parameter_validation_utils.cpp @@ -149,23 +149,21 @@ static bool validate_string(debug_report_data *report_data, const char *apiName, } static bool ValidateDeviceQueueFamily(layer_data *device_data, uint32_t queue_family, const char *cmd_name, - const char *parameter_name, int32_t error_code, bool optional = false, - const char *vu_note = nullptr) { + const char *parameter_name, int32_t error_code, bool optional = false) { bool skip = false; - if (!vu_note) vu_note = validation_error_map[error_code]; if (!optional && queue_family == VK_QUEUE_FAMILY_IGNORED) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, HandleToUint64(device_data->device), __LINE__, error_code, LayerName, - "%s: %s is VK_QUEUE_FAMILY_IGNORED, but it is required to provide a valid queue family index value. %s", - cmd_name, parameter_name, vu_note); + "%s: %s is VK_QUEUE_FAMILY_IGNORED, but it is required to provide a valid queue family index value.", + cmd_name, parameter_name); } else if (device_data->queueFamilyIndexMap.find(queue_family) == device_data->queueFamilyIndexMap.end()) { - skip |= log_msg( - device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(device_data->device), __LINE__, error_code, LayerName, - "%s: %s (= %" PRIu32 - ") is not one of the queue families given via VkDeviceQueueCreateInfo structures when the device was created. %s", - cmd_name, parameter_name, queue_family, vu_note); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, + HandleToUint64(device_data->device), __LINE__, error_code, LayerName, + "%s: %s (= %" PRIu32 + ") is not one of the queue families given via VkDeviceQueueCreateInfo structures when the device was created.", + cmd_name, parameter_name, queue_family); } return skip; @@ -173,11 +171,8 @@ static bool ValidateDeviceQueueFamily(layer_data *device_data, uint32_t queue_fa static bool ValidateQueueFamilies(layer_data *device_data, uint32_t queue_family_count, const uint32_t *queue_families, const char *cmd_name, const char *array_parameter_name, int32_t unique_error_code, - int32_t valid_error_code, bool optional = false, const char *unique_vu_note = nullptr, - const char *valid_vu_note = nullptr) { + int32_t valid_error_code, bool optional = false) { bool skip = false; - if (!unique_vu_note) unique_vu_note = validation_error_map[unique_error_code]; - if (!valid_vu_note) valid_vu_note = validation_error_map[valid_error_code]; if (queue_families) { std::unordered_set set; for (uint32_t i = 0; i < queue_family_count; ++i) { @@ -186,12 +181,12 @@ static bool ValidateQueueFamilies(layer_data *device_data, uint32_t queue_family if (set.count(queue_families[i])) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, HandleToUint64(device_data->device), __LINE__, VALIDATION_ERROR_056002e8, LayerName, - "%s: %s (=%" PRIu32 ") is not unique within %s array. %s", cmd_name, parameter_name.c_str(), - queue_families[i], array_parameter_name, unique_vu_note); + "%s: %s (=%" PRIu32 ") is not unique within %s array.", cmd_name, parameter_name.c_str(), + queue_families[i], array_parameter_name); } else { set.insert(queue_families[i]); skip |= ValidateDeviceQueueFamily(device_data, queue_families[i], cmd_name, parameter_name.c_str(), - valid_error_code, optional, valid_vu_note); + valid_error_code, optional); } } } @@ -199,7 +194,7 @@ static bool ValidateQueueFamilies(layer_data *device_data, uint32_t queue_family } VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, - VkInstance *pInstance) { + VkInstance *pInstance) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; VkLayerInstanceCreateInfo *chain_info = get_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); @@ -455,8 +450,7 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_056002ec, LayerName, "VkDeviceCreateInfo->ppEnabledExtensionNames must not simultaneously include VK_KHR_maintenance1 and " - "VK_AMD_negative_viewport_height. %s", - validation_error_map[VALIDATION_ERROR_056002ec]); + "VK_AMD_negative_viewport_height."); } if (pCreateInfo->pNext != NULL && pCreateInfo->pEnabledFeatures) { @@ -483,15 +477,15 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi VALIDATION_ERROR_06c002fa, LayerName, "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, but it is required to provide a valid queue family " - "index value. %s", - i, validation_error_map[VALIDATION_ERROR_06c002fa]); + "index value.", + i); } else if (set.count(requested_queue_family)) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), __LINE__, VALIDATION_ERROR_056002e8, LayerName, "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueFamilyIndex (=%" PRIu32 - ") is not unique within pCreateInfo->pQueueCreateInfos array. %s", - i, requested_queue_family, validation_error_map[VALIDATION_ERROR_056002e8]); + ") is not unique within pCreateInfo->pQueueCreateInfos array.", + i, requested_queue_family); } else { set.insert(requested_queue_family); } @@ -504,8 +498,8 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), __LINE__, VALIDATION_ERROR_06c002fe, LayerName, "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].pQueuePriorities[%" PRIu32 - "] (=%f) is not between 0 and 1 (inclusive). %s", - i, j, queue_priority, validation_error_map[VALIDATION_ERROR_06c002fe]); + "] (=%f) is not between 0 and 1 (inclusive).", + i, j, queue_priority); } } } @@ -633,8 +627,8 @@ bool pv_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t qu HandleToUint64(device), __LINE__, VALIDATION_ERROR_29600302, LayerName, "vkGetDeviceQueue: queueIndex (=%" PRIu32 ") is not less than the number of queues requested from queueFamilyIndex (=%" PRIu32 - ") when the device was created (i.e. is not less than %" PRIu32 "). %s", - queueIndex, queueFamilyIndex, queue_data->second, validation_error_map[VALIDATION_ERROR_29600302]); + ") when the device was created (i.e. is not less than %" PRIu32 ").", + queueIndex, queueFamilyIndex, queue_data->second); } return skip; } @@ -676,8 +670,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryP __LINE__, VALIDATION_ERROR_11c00630, LayerName, "vkCreateQueryPool(): if pCreateInfo->queryType is VK_QUERY_TYPE_PIPELINE_STATISTICS, " "pCreateInfo->pipelineStatistics must be a valid combination of VkQueryPipelineStatisticFlagBits " - "values. %s", - validation_error_map[VALIDATION_ERROR_11c00630]); + "values."); } } if (!skip) { @@ -776,8 +769,7 @@ bool pv_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, c skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_01400724, LayerName, "vkCreateBuffer: if pCreateInfo->sharingMode is VK_SHARING_MODE_CONCURRENT, " - "pCreateInfo->queueFamilyIndexCount must be greater than 1. %s", - validation_error_map[VALIDATION_ERROR_01400724]); + "pCreateInfo->queueFamilyIndexCount must be greater than 1."); } // If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a pointer to an array of @@ -787,13 +779,11 @@ bool pv_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, c VALIDATION_ERROR_01400722, LayerName, "vkCreateBuffer: if pCreateInfo->sharingMode is VK_SHARING_MODE_CONCURRENT, " "pCreateInfo->pQueueFamilyIndices must be a pointer to an array of " - "pCreateInfo->queueFamilyIndexCount uint32_t values. %s", - validation_error_map[VALIDATION_ERROR_01400722]); + "pCreateInfo->queueFamilyIndexCount uint32_t values."); } else { - // TODO: Not in the spec VUs. Probably missing -- KhronosGroup/Vulkan-Docs#501. Update error codes when resolved. skip |= ValidateQueueFamilies(device_data, pCreateInfo->queueFamilyIndexCount, pCreateInfo->pQueueFamilyIndices, "vkCreateBuffer", "pCreateInfo->pQueueFamilyIndices", INVALID_USAGE, INVALID_USAGE, - false, "", ""); + false); } } @@ -804,8 +794,7 @@ bool pv_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, c skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_0140072c, LayerName, "vkCreateBuffer: if pCreateInfo->flags contains VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT or " - "VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT. %s", - validation_error_map[VALIDATION_ERROR_0140072c]); + "VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT."); } } @@ -854,8 +843,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e0075c, LayerName, "vkCreateImage(): if pCreateInfo->sharingMode is VK_SHARING_MODE_CONCURRENT, " - "pCreateInfo->queueFamilyIndexCount must be greater than 1. %s", - validation_error_map[VALIDATION_ERROR_09e0075c]); + "pCreateInfo->queueFamilyIndexCount must be greater than 1."); } // If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a pointer to an array of @@ -865,13 +853,11 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con VALIDATION_ERROR_09e0075a, LayerName, "vkCreateImage(): if pCreateInfo->sharingMode is VK_SHARING_MODE_CONCURRENT, " "pCreateInfo->pQueueFamilyIndices must be a pointer to an array of " - "pCreateInfo->queueFamilyIndexCount uint32_t values. %s", - validation_error_map[VALIDATION_ERROR_09e0075a]); + "pCreateInfo->queueFamilyIndexCount uint32_t values."); } else { - // TODO: Not in the spec VUs. Probably missing -- KhronosGroup/Vulkan-Docs#501. Update error codes when resolved. skip |= ValidateQueueFamilies(device_data, pCreateInfo->queueFamilyIndexCount, pCreateInfo->pQueueFamilyIndices, "vkCreateImage", "pCreateInfo->pQueueFamilyIndices", INVALID_USAGE, INVALID_USAGE, - false, "", ""); + false); } } @@ -891,8 +877,8 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e007c2, LayerName, - "vkCreateImage(): initialLayout is %s, must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED. %s", - string_VkImageLayout(pCreateInfo->initialLayout), validation_error_map[VALIDATION_ERROR_09e007c2]); + "vkCreateImage(): initialLayout is %s, must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED.", + string_VkImageLayout(pCreateInfo->initialLayout)); } // If imageType is VK_IMAGE_TYPE_1D, both extent.height and extent.depth must be 1 @@ -901,27 +887,26 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00778, LayerName, "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_1D, both pCreateInfo->extent.height and " - "pCreateInfo->extent.depth must be 1. %s", - validation_error_map[VALIDATION_ERROR_09e00778]); + "pCreateInfo->extent.depth must be 1."); } if (pCreateInfo->imageType == VK_IMAGE_TYPE_2D) { if (pCreateInfo->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) { if (pCreateInfo->extent.width != pCreateInfo->extent.height) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, VK_NULL_HANDLE, __LINE__, - VALIDATION_ERROR_09e00774, LayerName, - "vkCreateImage(): pCreateInfo->flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, but " - "pCreateInfo->extent.width (=%" PRIu32 ") and pCreateInfo->extent.height (=%" PRIu32 ") are not equal. %s", - pCreateInfo->extent.width, pCreateInfo->extent.height, validation_error_map[VALIDATION_ERROR_09e00774]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_09e00774, LayerName, + "vkCreateImage(): pCreateInfo->flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, but " + "pCreateInfo->extent.width (=%" PRIu32 ") and pCreateInfo->extent.height (=%" PRIu32 + ") are not equal.", + pCreateInfo->extent.width, pCreateInfo->extent.height); } if (pCreateInfo->arrayLayers < 6) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_09e00774, LayerName, "vkCreateImage(): pCreateInfo->flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, but " - "pCreateInfo->arrayLayers (=%" PRIu32 ") is not greater than or equal to 6. %s", - pCreateInfo->arrayLayers, validation_error_map[VALIDATION_ERROR_09e00774]); + "pCreateInfo->arrayLayers (=%" PRIu32 ") is not greater than or equal to 6.", + pCreateInfo->arrayLayers); } } @@ -929,8 +914,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e0077a, LayerName, - "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_2D, pCreateInfo->extent.depth must be 1. %s", - validation_error_map[VALIDATION_ERROR_09e0077a]); + "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_2D, pCreateInfo->extent.depth must be 1."); } } @@ -939,8 +923,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00782, LayerName, - "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_3D, pCreateInfo->arrayLayers must be 1. %s", - validation_error_map[VALIDATION_ERROR_09e00782]); + "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_3D, pCreateInfo->arrayLayers must be 1."); } // If multi-sample, validate type, usage, tiling and mip levels. @@ -949,8 +932,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con (pCreateInfo->tiling != VK_IMAGE_TILING_OPTIMAL) || (pCreateInfo->mipLevels != 1))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00784, LayerName, - "vkCreateImage(): Multi-sample image with incompatible type, usage, tiling, or mips. %s", - validation_error_map[VALIDATION_ERROR_09e00784]); + "vkCreateImage(): Multi-sample image with incompatible type, usage, tiling, or mips."); } if (0 != (pCreateInfo->usage & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)) { @@ -960,16 +942,14 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if (0 == (pCreateInfo->usage & legal_flags)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e0078c, LayerName, - "vkCreateImage(): Transient attachment image without a compatible attachment flag set. %s", - validation_error_map[VALIDATION_ERROR_09e0078c]); + "vkCreateImage(): Transient attachment image without a compatible attachment flag set."); } // No flags other than the legal attachment bits may be set legal_flags |= VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT; if (0 != (pCreateInfo->usage & ~legal_flags)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00786, LayerName, - "vkCreateImage(): Transient attachment image with incompatible usage flags set. %s", - validation_error_map[VALIDATION_ERROR_09e00786]); + "vkCreateImage(): Transient attachment image with incompatible usage flags set."); } } @@ -980,16 +960,14 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e0077c, LayerName, "vkCreateImage(): pCreateInfo->mipLevels must be less than or equal to " - "floor(log2(max(pCreateInfo->extent.width, pCreateInfo->extent.height, pCreateInfo->extent.depth)))+1. %s", - validation_error_map[VALIDATION_ERROR_09e0077c]); + "floor(log2(max(pCreateInfo->extent.width, pCreateInfo->extent.height, pCreateInfo->extent.depth)))+1."); } if ((pCreateInfo->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) && (!device_data->physical_device_features.sparseBinding)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_09e00792, LayerName, "vkCreateImage(): pCreateInfo->flags contains VK_IMAGE_CREATE_SPARSE_BINDING_BIT, but the " - "VkPhysicalDeviceFeatures::sparseBinding feature is disabled. %s", - validation_error_map[VALIDATION_ERROR_09e00792]); + "VkPhysicalDeviceFeatures::sparseBinding feature is disabled."); } // If flags contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must also contain @@ -999,8 +977,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e007b6, LayerName, "vkCreateImage: if pCreateInfo->flags contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT or " - "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT. %s", - validation_error_map[VALIDATION_ERROR_09e007b6]); + "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT."); } // Check for combinations of attributes that are incompatible with having VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set @@ -1017,8 +994,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if (VK_IMAGE_TYPE_1D == pCreateInfo->imageType) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00794, LayerName, - "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 1D image. %s", - validation_error_map[VALIDATION_ERROR_09e00794]); + "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 1D image."); } // Sparse 2D image when device doesn't support it @@ -1027,8 +1003,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00796, LayerName, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 2D image if corresponding " - "feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e00796]); + "feature is not enabled on the device."); } // Sparse 3D image when device doesn't support it @@ -1037,8 +1012,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00798, LayerName, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 3D image if corresponding " - "feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e00798]); + "feature is not enabled on the device."); } // Multi-sample 2D image when device doesn't support it @@ -1048,29 +1022,25 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e0079a, LayerName, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 2-sample image if " - "corresponding feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e0079a]); + "corresponding feature is not enabled on the device."); } else if ((VK_FALSE == device_data->physical_device_features.sparseResidency4Samples) && (VK_SAMPLE_COUNT_4_BIT == pCreateInfo->samples)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e0079c, LayerName, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 4-sample image if " - "corresponding feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e0079c]); + "corresponding feature is not enabled on the device."); } else if ((VK_FALSE == device_data->physical_device_features.sparseResidency8Samples) && (VK_SAMPLE_COUNT_8_BIT == pCreateInfo->samples)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e0079e, LayerName, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 8-sample image if " - "corresponding feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e0079e]); + "corresponding feature is not enabled on the device."); } else if ((VK_FALSE == device_data->physical_device_features.sparseResidency16Samples) && (VK_SAMPLE_COUNT_16_BIT == pCreateInfo->samples)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e007a0, LayerName, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 16-sample image if " - "corresponding feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e007a0]); + "corresponding feature is not enabled on the device."); } } } @@ -1185,18 +1155,17 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co if (!(viewport.width > 0.0f)) { width_healthy = false; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dd4, - LayerName, "%s: %s.width (=%f) is not greater than 0.0. %s", fn_name, param_name, viewport.width, - validation_error_map[VALIDATION_ERROR_15000dd4]); + LayerName, "%s: %s.width (=%f) is not greater than 0.0.", fn_name, param_name, viewport.width); } else if (!(f_lte_u32_exact(viewport.width, max_w) || f_lte_u32_direct(viewport.width, max_w))) { width_healthy = false; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dd6, - LayerName, "%s: %s.width (=%f) exceeds VkPhysicalDeviceLimits::maxViewportDimensions[0] (=%" PRIu32 "). %s", - fn_name, param_name, viewport.width, max_w, validation_error_map[VALIDATION_ERROR_15000dd6]); + LayerName, "%s: %s.width (=%f) exceeds VkPhysicalDeviceLimits::maxViewportDimensions[0] (=%" PRIu32 ").", + fn_name, param_name, viewport.width, max_w); } else if (!f_lte_u32_exact(viewport.width, max_w) && f_lte_u32_direct(viewport.width, max_w)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, object_type, object, __LINE__, NONE, LayerName, "%s: %s.width (=%f) technically exceeds VkPhysicalDeviceLimits::maxViewportDimensions[0] (=%" PRIu32 - "), but it is within the static_cast(maxViewportDimensions[0]) limit. %s", - fn_name, param_name, viewport.width, max_w, validation_error_map[VALIDATION_ERROR_15000dd6]); + "), but it is within the static_cast(maxViewportDimensions[0]) limit.", + fn_name, param_name, viewport.width, max_w); } // height @@ -1209,33 +1178,31 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co if (!negative_height_enabled && !(viewport.height > 0.0f)) { height_healthy = false; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dd8, - LayerName, "%s: %s.height (=%f) is not greater 0.0. %s", fn_name, param_name, viewport.height, - validation_error_map[VALIDATION_ERROR_15000dd8]); + LayerName, "%s: %s.height (=%f) is not greater 0.0.", fn_name, param_name, viewport.height); } else if (!(f_lte_u32_exact(fabsf(viewport.height), max_h) || f_lte_u32_direct(fabsf(viewport.height), max_h))) { height_healthy = false; skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dda, LayerName, - "%s: Absolute value of %s.height (=%f) exceeds VkPhysicalDeviceLimits::maxViewportDimensions[1] (=%" PRIu32 "). %s", - fn_name, param_name, viewport.height, max_h, validation_error_map[VALIDATION_ERROR_15000dda]); + "%s: Absolute value of %s.height (=%f) exceeds VkPhysicalDeviceLimits::maxViewportDimensions[1] (=%" PRIu32 ").", + fn_name, param_name, viewport.height, max_h); } else if (!f_lte_u32_exact(fabsf(viewport.height), max_h) && f_lte_u32_direct(fabsf(viewport.height), max_h)) { height_healthy = false; skip |= log_msg( report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, object_type, object, __LINE__, NONE, LayerName, "%s: Absolute value of %s.height (=%f) technically exceeds VkPhysicalDeviceLimits::maxViewportDimensions[1] (=%" PRIu32 - "), but it is within the static_cast(maxViewportDimensions[1]) limit. %s", - fn_name, param_name, viewport.height, max_h, validation_error_map[VALIDATION_ERROR_15000dda]); + "), but it is within the static_cast(maxViewportDimensions[1]) limit.", + fn_name, param_name, viewport.height, max_h); } // x bool x_healthy = true; if (!(viewport.x >= device_data->device_limits.viewportBoundsRange[0])) { x_healthy = false; - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000ddc, LayerName, - "%s: %s.x (=%f) is less than VkPhysicalDeviceLimits::viewportBoundsRange[0] (=%f). %s", fn_name, param_name, - viewport.x, device_data->device_limits.viewportBoundsRange[0], validation_error_map[VALIDATION_ERROR_15000ddc]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000ddc, + LayerName, "%s: %s.x (=%f) is less than VkPhysicalDeviceLimits::viewportBoundsRange[0] (=%f).", fn_name, + param_name, viewport.x, device_data->device_limits.viewportBoundsRange[0]); } // x + width @@ -1244,9 +1211,9 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co if (!(right_bound <= device_data->device_limits.viewportBoundsRange[1])) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_150009a0, LayerName, - "%s: %s.x + %s.width (=%f + %f = %f) is greater than VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f). %s", + "%s: %s.x + %s.width (=%f + %f = %f) is greater than VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f).", fn_name, param_name, param_name, viewport.x, viewport.width, right_bound, - device_data->device_limits.viewportBoundsRange[1], validation_error_map[VALIDATION_ERROR_150009a0]); + device_data->device_limits.viewportBoundsRange[1]); } } @@ -1254,16 +1221,14 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co bool y_healthy = true; if (!(viewport.y >= device_data->device_limits.viewportBoundsRange[0])) { y_healthy = false; - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dde, LayerName, - "%s: %s.y (=%f) is less than VkPhysicalDeviceLimits::viewportBoundsRange[0] (=%f). %s", fn_name, param_name, - viewport.y, device_data->device_limits.viewportBoundsRange[0], validation_error_map[VALIDATION_ERROR_15000dde]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dde, + LayerName, "%s: %s.y (=%f) is less than VkPhysicalDeviceLimits::viewportBoundsRange[0] (=%f).", fn_name, + param_name, viewport.y, device_data->device_limits.viewportBoundsRange[0]); } else if (negative_height_enabled && !(viewport.y <= device_data->device_limits.viewportBoundsRange[1])) { y_healthy = false; - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000de0, LayerName, - "%s: %s.y (=%f) exceeds VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f). %s", fn_name, param_name, - viewport.y, device_data->device_limits.viewportBoundsRange[1], validation_error_map[VALIDATION_ERROR_15000de0]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000de0, + LayerName, "%s: %s.y (=%f) exceeds VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f).", fn_name, + param_name, viewport.y, device_data->device_limits.viewportBoundsRange[1]); } // y + height @@ -1271,17 +1236,15 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co const float boundary = viewport.y + viewport.height; if (!(boundary <= device_data->device_limits.viewportBoundsRange[1])) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_150009a2, - LayerName, - "%s: %s.y + %s.height (=%f + %f = %f) exceeds VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f). %s", - fn_name, param_name, param_name, viewport.y, viewport.height, boundary, - device_data->device_limits.viewportBoundsRange[1], validation_error_map[VALIDATION_ERROR_150009a2]); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_150009a2, LayerName, + "%s: %s.y + %s.height (=%f + %f = %f) exceeds VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f).", fn_name, + param_name, param_name, viewport.y, viewport.height, boundary, device_data->device_limits.viewportBoundsRange[1]); } else if (negative_height_enabled && !(boundary >= device_data->device_limits.viewportBoundsRange[0])) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000de2, LayerName, - "%s: %s.y + %s.height (=%f + %f = %f) is less than VkPhysicalDeviceLimits::viewportBoundsRange[0] (=%f). %s", - fn_name, param_name, param_name, viewport.y, viewport.height, boundary, - device_data->device_limits.viewportBoundsRange[0], validation_error_map[VALIDATION_ERROR_15000de2]); + "%s: %s.y + %s.height (=%f + %f = %f) is less than VkPhysicalDeviceLimits::viewportBoundsRange[0] (=%f).", fn_name, + param_name, param_name, viewport.y, viewport.height, boundary, device_data->device_limits.viewportBoundsRange[0]); } } @@ -1291,8 +1254,8 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_150009a4, LayerName, "%s: VK_EXT_depth_range_unrestricted extension is not enabled and %s.minDepth (=%f) is not within the " - "[0.0, 1.0] range. %s", - fn_name, param_name, viewport.minDepth, validation_error_map[VALIDATION_ERROR_150009a4]); + "[0.0, 1.0] range.", + fn_name, param_name, viewport.minDepth); } // maxDepth @@ -1300,8 +1263,8 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_150009a6, LayerName, "%s: VK_EXT_depth_range_unrestricted extension is not enabled and %s.maxDepth (=%f) is not within the " - "[0.0, 1.0] range. %s", - fn_name, param_name, viewport.maxDepth, validation_error_map[VALIDATION_ERROR_150009a6]); + "[0.0, 1.0] range.", + fn_name, param_name, viewport.maxDepth); } } @@ -1346,9 +1309,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_14c004d4, LayerName, "vkCreateGraphicsPipelines: parameter " "pCreateInfos[%u].pVertexInputState->pVertexBindingDescriptions[%u].binding (%u) is " - "greater than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings (%u). %s", - i, d, vertex_bind_desc.binding, device_data->device_limits.maxVertexInputBindings, - validation_error_map[VALIDATION_ERROR_14c004d4]); + "greater than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings (%u).", + i, d, vertex_bind_desc.binding, device_data->device_limits.maxVertexInputBindings); } if (vertex_bind_desc.stride > device_data->device_limits.maxVertexInputBindingStride) { @@ -1356,9 +1318,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_14c004d6, LayerName, "vkCreateGraphicsPipelines: parameter " "pCreateInfos[%u].pVertexInputState->pVertexBindingDescriptions[%u].stride (%u) is greater " - "than VkPhysicalDeviceLimits::maxVertexInputBindingStride (%u). %s", - i, d, vertex_bind_desc.stride, device_data->device_limits.maxVertexInputBindingStride, - validation_error_map[VALIDATION_ERROR_14c004d6]); + "than VkPhysicalDeviceLimits::maxVertexInputBindingStride (%u).", + i, d, vertex_bind_desc.stride, device_data->device_limits.maxVertexInputBindingStride); } } @@ -1369,9 +1330,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_14a004d8, LayerName, "vkCreateGraphicsPipelines: parameter " "pCreateInfos[%u].pVertexInputState->pVertexAttributeDescriptions[%u].location (%u) is " - "greater than or equal to VkPhysicalDeviceLimits::maxVertexInputAttributes (%u). %s", - i, d, vertex_attrib_desc.location, device_data->device_limits.maxVertexInputAttributes, - validation_error_map[VALIDATION_ERROR_14a004d8]); + "greater than or equal to VkPhysicalDeviceLimits::maxVertexInputAttributes (%u).", + i, d, vertex_attrib_desc.location, device_data->device_limits.maxVertexInputAttributes); } if (vertex_attrib_desc.binding >= device_data->device_limits.maxVertexInputBindings) { @@ -1379,19 +1339,18 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_14a004da, LayerName, "vkCreateGraphicsPipelines: parameter " "pCreateInfos[%u].pVertexInputState->pVertexAttributeDescriptions[%u].binding (%u) is " - "greater than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings (%u). %s", - i, d, vertex_attrib_desc.binding, device_data->device_limits.maxVertexInputBindings, - validation_error_map[VALIDATION_ERROR_14a004da]); + "greater than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings (%u).", + i, d, vertex_attrib_desc.binding, device_data->device_limits.maxVertexInputBindings); } if (vertex_attrib_desc.offset > device_data->device_limits.maxVertexInputAttributeOffset) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_14a004dc, LayerName, - "vkCreateGraphicsPipelines: parameter " - "pCreateInfos[%u].pVertexInputState->pVertexAttributeDescriptions[%u].offset (%u) is " - "greater than VkPhysicalDeviceLimits::maxVertexInputAttributeOffset (%u). %s", - i, d, vertex_attrib_desc.offset, device_data->device_limits.maxVertexInputAttributeOffset, - validation_error_map[VALIDATION_ERROR_14a004dc]); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_14a004dc, LayerName, + "vkCreateGraphicsPipelines: parameter " + "pCreateInfos[%u].pVertexInputState->pVertexAttributeDescriptions[%u].offset (%u) is " + "greater than VkPhysicalDeviceLimits::maxVertexInputAttributeOffset (%u).", + i, d, vertex_attrib_desc.offset, device_data->device_limits.maxVertexInputAttributeOffset); } } } @@ -1415,8 +1374,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_096005b6, LayerName, "vkCreateGraphicsPipelines: if pCreateInfos[%d].pStages includes a tessellation control " "shader stage and a tessellation evaluation shader stage, " - "pCreateInfos[%d].pTessellationState must not be NULL. %s", - i, i, validation_error_map[VALIDATION_ERROR_096005b6]); + "pCreateInfos[%d].pTessellationState must not be NULL.", + i, i); } else { skip |= validate_struct_pnext( report_data, "vkCreateGraphicsPipelines", @@ -1433,8 +1392,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1082b00b, LayerName, "vkCreateGraphicsPipelines: parameter pCreateInfos[%d].pTessellationState->sType must " - "be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO. %s", - i, validation_error_map[VALIDATION_ERROR_1082b00b]); + "be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO.", + i); } if (pCreateInfos[i].pTessellationState->patchControlPoints == 0 || @@ -1444,10 +1403,9 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_1080097c, LayerName, "vkCreateGraphicsPipelines: invalid parameter " "pCreateInfos[%d].pTessellationState->patchControlPoints value %u. patchControlPoints " - "should be >0 and <=%u. %s", + "should be >0 and <=%u.", i, pCreateInfos[i].pTessellationState->patchControlPoints, - device_data->device_limits.maxTessellationPatchSize, - validation_error_map[VALIDATION_ERROR_1080097c]); + device_data->device_limits.maxTessellationPatchSize); } } } @@ -1461,8 +1419,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_096005dc, LayerName, "vkCreateGraphicsPipelines: Rasterization is enabled (pCreateInfos[%" PRIu32 "].pRasterizationState->rasterizerDiscardEnable is VK_FALSE), but pCreateInfos[%" PRIu32 - "].pViewportState (=NULL) is not a valid pointer. %s", - i, i, validation_error_map[VALIDATION_ERROR_096005dc]); + "].pViewportState (=NULL) is not a valid pointer.", + i, i); } else { const auto &viewport_state = *pCreateInfos[i].pViewportState; @@ -1470,8 +1428,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c2b00b, LayerName, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 - "].pViewportState->sType is not VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO. %s", - i, validation_error_map[VALIDATION_ERROR_10c2b00b]); + "].pViewportState->sType is not VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO.", + i); } const VkStructureType allowed_structs_VkPipelineViewportStateCreateInfo[] = { @@ -1495,8 +1453,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00980, LayerName, "vkCreateGraphicsPipelines: The VkPhysicalDeviceFeatures::multiViewport feature is " "disabled, but pCreateInfos[%" PRIu32 "].pViewportState->viewportCount (=%" PRIu32 - ") is not 1. %s", - i, viewport_state.viewportCount, validation_error_map[VALIDATION_ERROR_10c00980]); + ") is not 1.", + i, viewport_state.viewportCount); } if (viewport_state.scissorCount != 1) { @@ -1504,51 +1462,46 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00982, LayerName, "vkCreateGraphicsPipelines: The VkPhysicalDeviceFeatures::multiViewport feature is " "disabled, but pCreateInfos[%" PRIu32 "].pViewportState->scissorCount (=%" PRIu32 - ") is not 1. %s", - i, viewport_state.scissorCount, validation_error_map[VALIDATION_ERROR_10c00982]); + ") is not 1.", + i, viewport_state.scissorCount); } } else { // multiViewport enabled if (viewport_state.viewportCount == 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c30a1b, LayerName, - "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 - "].pViewportState->viewportCount is 0. %s", - i, validation_error_map[VALIDATION_ERROR_10c30a1b]); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c30a1b, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pViewportState->viewportCount is 0.", i); } else if (viewport_state.viewportCount > device_data->device_limits.maxViewports) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00984, LayerName, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pViewportState->viewportCount (=%" PRIu32 - ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 "). %s", - i, viewport_state.viewportCount, device_data->device_limits.maxViewports, - validation_error_map[VALIDATION_ERROR_10c00984]); + ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 ").", + i, viewport_state.viewportCount, device_data->device_limits.maxViewports); } if (viewport_state.scissorCount == 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c2b61b, LayerName, - "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 - "].pViewportState->scissorCount is 0. %s", - i, validation_error_map[VALIDATION_ERROR_10c2b61b]); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c2b61b, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pViewportState->scissorCount is 0.", i); } else if (viewport_state.scissorCount > device_data->device_limits.maxViewports) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00986, LayerName, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pViewportState->scissorCount (=%" PRIu32 - ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 "). %s", - i, viewport_state.scissorCount, device_data->device_limits.maxViewports, - validation_error_map[VALIDATION_ERROR_10c00986]); + ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 ").", + i, viewport_state.scissorCount, device_data->device_limits.maxViewports); } } if (viewport_state.scissorCount != viewport_state.viewportCount) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00988, LayerName, - "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 - "].pViewportState->scissorCount (=%" PRIu32 ") is not identical to pCreateInfos[%" PRIu32 - "].pViewportState->viewportCount (=%" PRIu32 "). %s", - i, viewport_state.scissorCount, i, viewport_state.viewportCount, - validation_error_map[VALIDATION_ERROR_10c00988]); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00988, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pViewportState->scissorCount (=%" PRIu32 + ") is not identical to pCreateInfos[%" PRIu32 "].pViewportState->viewportCount (=%" PRIu32 ").", + i, viewport_state.scissorCount, i, viewport_state.viewportCount); } if (!has_dynamic_viewport && viewport_state.viewportCount > 0 && viewport_state.pViewports == nullptr) { @@ -1557,8 +1510,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_096005d6, LayerName, "vkCreateGraphicsPipelines: The viewport state is static (pCreateInfos[%" PRIu32 "].pDynamicState->pDynamicStates does not contain VK_DYNAMIC_STATE_VIEWPORT), but pCreateInfos[%" PRIu32 - "].pViewportState->pViewports (=NULL) is an invalid pointer. %s", - i, i, validation_error_map[VALIDATION_ERROR_096005d6]); + "].pViewportState->pViewports (=NULL) is an invalid pointer.", + i, i); } if (!has_dynamic_scissor && viewport_state.scissorCount > 0 && viewport_state.pScissors == nullptr) { @@ -1567,8 +1520,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_096005d8, LayerName, "vkCreateGraphicsPipelines: The scissor state is static (pCreateInfos[%" PRIu32 "].pDynamicState->pDynamicStates does not contain VK_DYNAMIC_STATE_SCISSOR), but pCreateInfos[%" PRIu32 - "].pViewportState->pScissors (=NULL) is an invalid pointer. %s", - i, i, validation_error_map[VALIDATION_ERROR_096005d8]); + "].pViewportState->pScissors (=NULL) is an invalid pointer.", + i, i); } // validate the VkViewports @@ -1615,8 +1568,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_096005de, LayerName, "vkCreateGraphicsPipelines: if pCreateInfos[%d].pRasterizationState->rasterizerDiscardEnable " - "is VK_FALSE, pCreateInfos[%d].pMultisampleState must not be NULL. %s", - i, i, validation_error_map[VALIDATION_ERROR_096005de]); + "is VK_FALSE, pCreateInfos[%d].pMultisampleState must not be NULL.", + i, i); } else { const VkStructureType valid_next_stypes[] = {LvlTypeMap::kSType, LvlTypeMap::kSType, @@ -1669,8 +1622,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_10000620, LayerName, "vkCreateGraphicsPipelines(): parameter " - "pCreateInfos[%d].pMultisampleState->sampleShadingEnable: %s", - i, validation_error_map[VALIDATION_ERROR_10000620]); + "pCreateInfos[%d].pMultisampleState->sampleShadingEnable.", + i); } // TODO Add documentation issue about when minSampleShading must be in range and when it is ignored // For now a "least noise" test *only* when sampleShadingEnable is VK_TRUE. @@ -1678,8 +1631,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_10000624, LayerName, - "vkCreateGraphicsPipelines(): parameter pCreateInfos[%d].pMultisampleState->minSampleShading: %s", - i, validation_error_map[VALIDATION_ERROR_10000624]); + "vkCreateGraphicsPipelines(): parameter pCreateInfos[%d].pMultisampleState->minSampleShading.", + i); } } } @@ -1905,8 +1858,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_096005a8, LayerName, "vkCreateGraphicsPipelines parameter, pCreateInfos->basePipelineHandle, must be " "VK_NULL_HANDLE if pCreateInfos->flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag " - "and pCreateInfos->basePipelineIndex is not -1. %s", - validation_error_map[VALIDATION_ERROR_096005a8]); + "and pCreateInfos->basePipelineIndex is not -1."); } } @@ -1916,8 +1868,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache __LINE__, VALIDATION_ERROR_096005aa, LayerName, "vkCreateGraphicsPipelines parameter, pCreateInfos->basePipelineIndex, must be -1 if " "pCreateInfos->flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag and " - "pCreateInfos->basePipelineHandle is not VK_NULL_HANDLE. %s", - validation_error_map[VALIDATION_ERROR_096005aa]); + "pCreateInfos->basePipelineHandle is not VK_NULL_HANDLE."); } } } @@ -1939,9 +1890,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache "The line width state is static (pCreateInfos[%" PRIu32 "].pDynamicState->pDynamicStates does not contain VK_DYNAMIC_STATE_LINE_WIDTH) and " "VkPhysicalDeviceFeatures::wideLines is disabled, but pCreateInfos[%" PRIu32 - "].pRasterizationState->lineWidth (=%f) is not 1.0. %s", - i, i, pCreateInfos[i].pRasterizationState->lineWidth, - validation_error_map[VALIDATION_ERROR_096005da]); + "].pRasterizationState->lineWidth (=%f) is not 1.0.", + i, i, pCreateInfos[i].pRasterizationState->lineWidth); } } @@ -1984,18 +1934,17 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, if (!in_inclusive_range(pCreateInfo->maxAnisotropy, 1.0F, limits.maxSamplerAnisotropy)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1260085e, LayerName, - "vkCreateSampler(): value of %s must be in range [1.0, %f] %s, but %f found. %s", + "vkCreateSampler(): value of %s must be in range [1.0, %f] %s, but %f found.", "pCreateInfo->maxAnisotropy", limits.maxSamplerAnisotropy, - "VkPhysicalDeviceLimits::maxSamplerAnistropy", pCreateInfo->maxAnisotropy, - validation_error_map[VALIDATION_ERROR_1260085e]); + "VkPhysicalDeviceLimits::maxSamplerAnistropy", pCreateInfo->maxAnisotropy); } // Anistropy cannot be enabled in sampler unless enabled as a feature if (features.samplerAnisotropy == VK_FALSE) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1260085c, LayerName, - "vkCreateSampler(): Anisotropic sampling feature is not enabled, %s must be VK_FALSE. %s", - "pCreateInfo->anisotropyEnable", validation_error_map[VALIDATION_ERROR_1260085c]); + "vkCreateSampler(): Anisotropic sampling feature is not enabled, %s must be VK_FALSE.", + "pCreateInfo->anisotropyEnable"); } // Anistropy and unnormalized coordinates cannot be enabled simultaneously @@ -2003,8 +1952,7 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_12600868, LayerName, "vkCreateSampler(): pCreateInfo->anisotropyEnable and pCreateInfo->unnormalizedCoordinates must " - "not both be VK_TRUE. %s", - validation_error_map[VALIDATION_ERROR_12600868]); + "not both be VK_TRUE."); } } @@ -2033,8 +1981,7 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1260086e, LayerName, "vkCreateSampler(): A VkSamplerAddressMode value is set to VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE " - "but the VK_KHR_sampler_mirror_clamp_to_edge extension has not been enabled. %s", - validation_error_map[VALIDATION_ERROR_1260086e]); + "but the VK_KHR_sampler_mirror_clamp_to_edge extension has not been enabled."); } // Checks for the IMG cubic filtering extension @@ -2044,8 +1991,7 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_12600872, LayerName, "vkCreateSampler(): Anisotropic sampling must not be VK_TRUE when either minFilter or magFilter " - "are VK_FILTER_CUBIC_IMG. %s", - validation_error_map[VALIDATION_ERROR_12600872]); + "are VK_FILTER_CUBIC_IMG."); } } } @@ -2088,8 +2034,8 @@ bool pv_vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayout __LINE__, VALIDATION_ERROR_04e00236, LayerName, "vkCreateDescriptorSetLayout(): if pCreateInfo->pBindings[%d].descriptorCount is not 0, " "pCreateInfo->pBindings[%d].stageFlags must be a valid combination of VkShaderStageFlagBits " - "values. %s", - i, i, validation_error_map[VALIDATION_ERROR_04e00236]); + "values.", + i, i); } } } @@ -2126,8 +2072,7 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_15c0441b, LayerName, - "vkUpdateDescriptorSets(): parameter pDescriptorWrites[%d].descriptorCount must be greater than 0. %s", - i, validation_error_map[VALIDATION_ERROR_15c0441b]); + "vkUpdateDescriptorSets(): parameter pDescriptorWrites[%d].descriptorCount must be greater than 0.", i); } // dstSet must be a valid VkDescriptorSet handle @@ -2149,8 +2094,8 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c "vkUpdateDescriptorSets(): if pDescriptorWrites[%d].descriptorType is " "VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, " "VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or " - "VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pDescriptorWrites[%d].pImageInfo must not be NULL. %s", - i, i, validation_error_map[VALIDATION_ERROR_15c00284]); + "VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pDescriptorWrites[%d].pImageInfo must not be NULL.", + i, i); } else if (pDescriptorWrites[i].descriptorType != VK_DESCRIPTOR_TYPE_SAMPLER) { // If descriptorType is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, // VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView and imageLayout @@ -2182,8 +2127,8 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c "vkUpdateDescriptorSets(): if pDescriptorWrites[%d].descriptorType is " "VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, " "VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, " - "pDescriptorWrites[%d].pBufferInfo must not be NULL. %s", - i, i, validation_error_map[VALIDATION_ERROR_15c00288]); + "pDescriptorWrites[%d].pBufferInfo must not be NULL.", + i, i); } else { for (uint32_t descriptorIndex = 0; descriptorIndex < pDescriptorWrites[i].descriptorCount; ++descriptorIndex) { skip |= validate_required_handle(report_data, "vkUpdateDescriptorSets", @@ -2201,8 +2146,8 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c __LINE__, VALIDATION_ERROR_15c00286, LayerName, "vkUpdateDescriptorSets(): if pDescriptorWrites[%d].descriptorType is " "VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, " - "pDescriptorWrites[%d].pTexelBufferView must not be NULL. %s", - i, i, validation_error_map[VALIDATION_ERROR_15c00286]); + "pDescriptorWrites[%d].pTexelBufferView must not be NULL.", + i, i); } else { for (uint32_t descriptor_index = 0; descriptor_index < pDescriptorWrites[i].descriptorCount; ++descriptor_index) { @@ -2224,9 +2169,8 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, VALIDATION_ERROR_15c0028e, LayerName, "vkUpdateDescriptorSets(): pDescriptorWrites[%d].pBufferInfo[%d].offset (0x%" PRIxLEAST64 - ") must be a multiple of device limit minUniformBufferOffsetAlignment 0x%" PRIxLEAST64 ". %s", - i, j, pDescriptorWrites[i].pBufferInfo[j].offset, uniformAlignment, - validation_error_map[VALIDATION_ERROR_15c0028e]); + ") must be a multiple of device limit minUniformBufferOffsetAlignment 0x%" PRIxLEAST64 ".", + i, j, pDescriptorWrites[i].pBufferInfo[j].offset, uniformAlignment); } } } @@ -2240,9 +2184,8 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, VALIDATION_ERROR_15c00290, LayerName, "vkUpdateDescriptorSets(): pDescriptorWrites[%d].pBufferInfo[%d].offset (0x%" PRIxLEAST64 - ") must be a multiple of device limit minStorageBufferOffsetAlignment 0x%" PRIxLEAST64 ". %s", - i, j, pDescriptorWrites[i].pBufferInfo[j].offset, storageAlignment, - validation_error_map[VALIDATION_ERROR_15c00290]); + ") must be a multiple of device limit minStorageBufferOffsetAlignment 0x%" PRIxLEAST64 ".", + i, j, pDescriptorWrites[i].pBufferInfo[j].offset, storageAlignment); } } } @@ -2261,8 +2204,7 @@ bool pv_vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreat for (uint32_t i = 0; i < pCreateInfo->attachmentCount; ++i) { if (pCreateInfo->pAttachments[i].format == VK_FORMAT_UNDEFINED) { std::stringstream ss; - ss << "vkCreateRenderPass: pCreateInfo->pAttachments[" << i << "].format is VK_FORMAT_UNDEFINED. " - << validation_error_map[VALIDATION_ERROR_00809201]; + ss << "vkCreateRenderPass: pCreateInfo->pAttachments[" << i << "].format is VK_FORMAT_UNDEFINED. "; skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_00809201, "IMAGE", "%s", ss.str().c_str()); } @@ -2271,8 +2213,8 @@ bool pv_vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreat skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_00800696, "DL", "pCreateInfo->pAttachments[%d].finalLayout must not be VK_IMAGE_LAYOUT_UNDEFINED or " - "VK_IMAGE_LAYOUT_PREINITIALIZED. %s", - i, validation_error_map[VALIDATION_ERROR_00800696]); + "VK_IMAGE_LAYOUT_PREINITIALIZED.", + i); } } @@ -2280,9 +2222,8 @@ bool pv_vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreat if (pCreateInfo->pSubpasses[i].colorAttachmentCount > max_color_attachments) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1400069a, "DL", - "Cannot create a render pass with %d color attachments. Max is %d. %s", - pCreateInfo->pSubpasses[i].colorAttachmentCount, max_color_attachments, - validation_error_map[VALIDATION_ERROR_1400069a]); + "Cannot create a render pass with %d color attachments. Max is %d.", + pCreateInfo->pSubpasses[i].colorAttachmentCount, max_color_attachments); } } return skip; @@ -2337,8 +2278,7 @@ bool pv_vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBuffe skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_02a00070, LayerName, "Cannot set inherited occlusionQueryEnable in vkBeginCommandBuffer() when device does not support " - "inheritedQueries. %s", - validation_error_map[VALIDATION_ERROR_02a00070]); + "inheritedQueries."); } if ((device_data->physical_device_features.inheritedQueries != VK_FALSE) && (pInfo->occlusionQueryEnable != VK_FALSE)) { skip |= validate_flags(device_data->report_data, "vkBeginCommandBuffer", "pBeginInfo->pInheritanceInfo->queryFlags", @@ -2357,18 +2297,16 @@ bool pv_vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, if (!device_data->physical_device_features.multiViewport) { if (firstViewport != 0) { - skip |= - log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1e000990, LayerName, - "vkCmdSetViewport: The multiViewport feature is disabled, but firstViewport (=%" PRIu32 ") is not 0. %s", - firstViewport, validation_error_map[VALIDATION_ERROR_1e000990]); + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1e000990, LayerName, + "vkCmdSetViewport: The multiViewport feature is disabled, but firstViewport (=%" PRIu32 ") is not 0.", + firstViewport); } if (viewportCount > 1) { - skip |= - log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1e000992, LayerName, - "vkCmdSetViewport: The multiViewport feature is disabled, but viewportCount (=%" PRIu32 ") is not 1. %s", - viewportCount, validation_error_map[VALIDATION_ERROR_1e000992]); + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1e000992, LayerName, + "vkCmdSetViewport: The multiViewport feature is disabled, but viewportCount (=%" PRIu32 ") is not 1.", + viewportCount); } } else { // multiViewport enabled const uint64_t sum = static_cast(firstViewport) + static_cast(viewportCount); @@ -2376,9 +2314,8 @@ bool pv_vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1e00098e, LayerName, "vkCmdSetViewport: firstViewport + viewportCount (=%" PRIu32 " + %" PRIu32 " = %" PRIu64 - ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 "). %s", - firstViewport, viewportCount, sum, device_data->device_limits.maxViewports, - validation_error_map[VALIDATION_ERROR_1e00098e]); + ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 ").", + firstViewport, viewportCount, sum, device_data->device_limits.maxViewports); } } @@ -2404,14 +2341,14 @@ bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, ui if (firstScissor != 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a2, LayerName, - "vkCmdSetScissor: The multiViewport feature is disabled, but firstScissor (=%" PRIu32 ") is not 0. %s", - firstScissor, validation_error_map[VALIDATION_ERROR_1d8004a2]); + "vkCmdSetScissor: The multiViewport feature is disabled, but firstScissor (=%" PRIu32 ") is not 0.", + firstScissor); } if (scissorCount > 1) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a4, LayerName, - "vkCmdSetScissor: The multiViewport feature is disabled, but scissorCount (=%" PRIu32 ") is not 1. %s", - scissorCount, validation_error_map[VALIDATION_ERROR_1d8004a4]); + "vkCmdSetScissor: The multiViewport feature is disabled, but scissorCount (=%" PRIu32 ") is not 1.", + scissorCount); } } else { // multiViewport enabled const uint64_t sum = static_cast(firstScissor) + static_cast(scissorCount); @@ -2419,9 +2356,8 @@ bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, ui skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a0, LayerName, "vkCmdSetScissor: firstScissor + scissorCount (=%" PRIu32 " + %" PRIu32 " = %" PRIu64 - ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 "). %s", - firstScissor, scissorCount, sum, device_data->device_limits.maxViewports, - validation_error_map[VALIDATION_ERROR_1d8004a0]); + ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 ").", + firstScissor, scissorCount, sum, device_data->device_limits.maxViewports); } } @@ -2432,15 +2368,15 @@ bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, ui if (scissor.offset.x < 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a6, LayerName, - "vkCmdSetScissor: pScissors[%" PRIu32 "].offset.x (=%" PRIi32 ") is negative. %s", scissor_i, - scissor.offset.x, validation_error_map[VALIDATION_ERROR_1d8004a6]); + "vkCmdSetScissor: pScissors[%" PRIu32 "].offset.x (=%" PRIi32 ") is negative.", scissor_i, + scissor.offset.x); } if (scissor.offset.y < 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a6, LayerName, - "vkCmdSetScissor: pScissors[%" PRIu32 "].offset.y (=%" PRIi32 ") is negative. %s", scissor_i, - scissor.offset.y, validation_error_map[VALIDATION_ERROR_1d8004a6]); + "vkCmdSetScissor: pScissors[%" PRIu32 "].offset.y (=%" PRIi32 ") is negative.", scissor_i, + scissor.offset.y); } const int64_t x_sum = static_cast(scissor.offset.x) + static_cast(scissor.extent.width); @@ -2448,9 +2384,8 @@ bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, ui skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a8, LayerName, "vkCmdSetScissor: offset.x + extent.width (=%" PRIi32 " + %" PRIu32 " = %" PRIi64 - ") of pScissors[%" PRIu32 "] will overflow int32_t. %s", - scissor.offset.x, scissor.extent.width, x_sum, scissor_i, - validation_error_map[VALIDATION_ERROR_1d8004a8]); + ") of pScissors[%" PRIu32 "] will overflow int32_t.", + scissor.offset.x, scissor.extent.width, x_sum, scissor_i); } const int64_t y_sum = static_cast(scissor.offset.y) + static_cast(scissor.extent.height); @@ -2458,9 +2393,8 @@ bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, ui skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004aa, LayerName, "vkCmdSetScissor: offset.y + extent.height (=%" PRIi32 " + %" PRIu32 " = %" PRIi64 - ") of pScissors[%" PRIu32 "] will overflow int32_t. %s", - scissor.offset.y, scissor.extent.height, y_sum, scissor_i, - validation_error_map[VALIDATION_ERROR_1d8004aa]); + ") of pScissors[%" PRIu32 "] will overflow int32_t.", + scissor.offset.y, scissor.extent.height, y_sum, scissor_i); } } } @@ -2476,8 +2410,7 @@ bool pv_vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { if (!device_data->physical_device_features.wideLines && (lineWidth != 1.0f)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d600628, LayerName, - "VkPhysicalDeviceFeatures::wideLines is disabled, but lineWidth (=%f) is not 1.0. %s", lineWidth, - validation_error_map[VALIDATION_ERROR_1d600628]); + "VkPhysicalDeviceFeatures::wideLines is disabled, but lineWidth (=%f) is not 1.0.", lineWidth); } return skip; @@ -2544,15 +2477,13 @@ bool pv_vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageL skip |= log_msg( device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_0a600c01, LayerName, - "vkCmdCopyImage() parameter, VkImageAspect pRegions->srcSubresource.aspectMask, is an unrecognized enumerator. %s", - validation_error_map[VALIDATION_ERROR_0a600c01]); + "vkCmdCopyImage() parameter, VkImageAspect pRegions->srcSubresource.aspectMask, is an unrecognized enumerator."); } if ((pRegions->dstSubresource.aspectMask & legal_aspect_flags) == 0) { skip |= log_msg( device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_0a600c01, LayerName, - "vkCmdCopyImage() parameter, VkImageAspect pRegions->dstSubresource.aspectMask, is an unrecognized enumerator. %s", - validation_error_map[VALIDATION_ERROR_0a600c01]); + "vkCmdCopyImage() parameter, VkImageAspect pRegions->dstSubresource.aspectMask, is an unrecognized enumerator."); } } return skip; @@ -2638,21 +2569,21 @@ bool pv_vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkD if (dstOffset & 3) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1e400048, LayerName, - "vkCmdUpdateBuffer() parameter, VkDeviceSize dstOffset (0x%" PRIxLEAST64 "), is not a multiple of 4. %s", - dstOffset, validation_error_map[VALIDATION_ERROR_1e400048]); + "vkCmdUpdateBuffer() parameter, VkDeviceSize dstOffset (0x%" PRIxLEAST64 "), is not a multiple of 4.", + dstOffset); } if ((dataSize <= 0) || (dataSize > 65536)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1e40004a, LayerName, "vkCmdUpdateBuffer() parameter, VkDeviceSize dataSize (0x%" PRIxLEAST64 - "), must be greater than zero and less than or equal to 65536. %s", - dataSize, validation_error_map[VALIDATION_ERROR_1e40004a]); + "), must be greater than zero and less than or equal to 65536.", + dataSize); } else if (dataSize & 3) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_1e40004c, LayerName, - "vkCmdUpdateBuffer() parameter, VkDeviceSize dataSize (0x%" PRIxLEAST64 "), is not a multiple of 4. %s", - dataSize, validation_error_map[VALIDATION_ERROR_1e40004c]); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_1e40004c, LayerName, + "vkCmdUpdateBuffer() parameter, VkDeviceSize dataSize (0x%" PRIxLEAST64 "), is not a multiple of 4.", dataSize); } return skip; } @@ -2663,23 +2594,22 @@ bool pv_vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDev layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (dstOffset & 3) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_1b400032, LayerName, - "vkCmdFillBuffer() parameter, VkDeviceSize dstOffset (0x%" PRIxLEAST64 "), is not a multiple of 4. %s", - dstOffset, validation_error_map[VALIDATION_ERROR_1b400032]); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_1b400032, LayerName, + "vkCmdFillBuffer() parameter, VkDeviceSize dstOffset (0x%" PRIxLEAST64 "), is not a multiple of 4.", dstOffset); } if (size != VK_WHOLE_SIZE) { if (size <= 0) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_1b400034, LayerName, - "vkCmdFillBuffer() parameter, VkDeviceSize size (0x%" PRIxLEAST64 "), must be greater than zero. %s", - size, validation_error_map[VALIDATION_ERROR_1b400034]); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_1b400034, LayerName, + "vkCmdFillBuffer() parameter, VkDeviceSize size (0x%" PRIxLEAST64 "), must be greater than zero.", size); } else if (size & 3) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1b400038, LayerName, - "vkCmdFillBuffer() parameter, VkDeviceSize size (0x%" PRIxLEAST64 "), is not a multiple of 4. %s", size, - validation_error_map[VALIDATION_ERROR_1b400038]); + "vkCmdFillBuffer() parameter, VkDeviceSize size (0x%" PRIxLEAST64 "), is not a multiple of 4.", size); } } return skip; @@ -2773,8 +2703,7 @@ bool pv_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pC skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_146009fc, LayerName, "vkCreateSwapchainKHR(): if pCreateInfo->imageSharingMode is VK_SHARING_MODE_CONCURRENT, " - "pCreateInfo->queueFamilyIndexCount must be greater than 1. %s", - validation_error_map[VALIDATION_ERROR_146009fc]); + "pCreateInfo->queueFamilyIndexCount must be greater than 1."); } // If imageSharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a pointer to an array of @@ -2784,13 +2713,11 @@ bool pv_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pC VALIDATION_ERROR_146009fa, LayerName, "vkCreateSwapchainKHR(): if pCreateInfo->imageSharingMode is VK_SHARING_MODE_CONCURRENT, " "pCreateInfo->pQueueFamilyIndices must be a pointer to an array of " - "pCreateInfo->queueFamilyIndexCount uint32_t values. %s", - validation_error_map[VALIDATION_ERROR_146009fa]); + "pCreateInfo->queueFamilyIndexCount uint32_t values."); } else { - // TODO: Not in the spec VUs. Probably missing -- KhronosGroup/Vulkan-Docs#501. Update error codes when resolved. skip |= ValidateQueueFamilies(device_data, pCreateInfo->queueFamilyIndexCount, pCreateInfo->pQueueFamilyIndices, "vkCreateSwapchainKHR", "pCreateInfo->pQueueFamilyIndices", INVALID_USAGE, - INVALID_USAGE, false, "", ""); + INVALID_USAGE, false); } } @@ -2844,8 +2771,7 @@ bool pv_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateI if (pCreateInfo->hwnd == nullptr) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_15a00a38, LayerName, - "vkCreateWin32SurfaceKHR(): hwnd must be a valid Win32 HWND but hwnd is NULL. %s", - validation_error_map[VALIDATION_ERROR_15a00a38]); + "vkCreateWin32SurfaceKHR(): hwnd must be a valid Win32 HWND but hwnd is NULL."); } return skip; @@ -2872,8 +2798,7 @@ bool pv_vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo if (pCreateInfo->maxSets <= 0) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_0480025a, - LayerName, "vkCreateDescriptorPool(): pCreateInfo->maxSets is not greater than 0. %s", - validation_error_map[VALIDATION_ERROR_0480025a]); + LayerName, "vkCreateDescriptorPool(): pCreateInfo->maxSets is not greater than 0."); } if (pCreateInfo->pPoolSizes) { @@ -2882,8 +2807,7 @@ bool pv_vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo skip |= log_msg( device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_04a0025c, LayerName, - "vkCreateDescriptorPool(): pCreateInfo->pPoolSizes[%" PRIu32 "].descriptorCount is not greater than 0. %s", - i, validation_error_map[VALIDATION_ERROR_04a0025c]); + "vkCreateDescriptorPool(): pCreateInfo->pPoolSizes[%" PRIu32 "].descriptorCount is not greater than 0.", i); } } } @@ -2897,27 +2821,27 @@ bool pv_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint3 layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (groupCountX > device_data->device_limits.maxComputeWorkGroupCount[0]) { - skip |= log_msg( - device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19c00304, LayerName, - "vkCmdDispatch(): groupCountX (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 "). %s", - groupCountX, device_data->device_limits.maxComputeWorkGroupCount[0], validation_error_map[VALIDATION_ERROR_19c00304]); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19c00304, LayerName, + "vkCmdDispatch(): groupCountX (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 ").", + groupCountX, device_data->device_limits.maxComputeWorkGroupCount[0]); } if (groupCountY > device_data->device_limits.maxComputeWorkGroupCount[1]) { - skip |= log_msg( - device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19c00306, LayerName, - "vkCmdDispatch(): groupCountY (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 "). %s", - groupCountY, device_data->device_limits.maxComputeWorkGroupCount[1], validation_error_map[VALIDATION_ERROR_19c00306]); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19c00306, LayerName, + "vkCmdDispatch(): groupCountY (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 ").", + groupCountY, device_data->device_limits.maxComputeWorkGroupCount[1]); } if (groupCountZ > device_data->device_limits.maxComputeWorkGroupCount[2]) { - skip |= log_msg( - device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19c00308, LayerName, - "vkCmdDispatch(): groupCountZ (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 "). %s", - groupCountZ, device_data->device_limits.maxComputeWorkGroupCount[2], validation_error_map[VALIDATION_ERROR_19c00308]); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19c00308, LayerName, + "vkCmdDispatch(): groupCountZ (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 ").", + groupCountZ, device_data->device_limits.maxComputeWorkGroupCount[2]); } return skip; @@ -2934,14 +2858,14 @@ bool pv_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e0034a, LayerName, "vkCmdDispatch(): baseGroupX (%" PRIu32 - ") equals or exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 "). %s", - baseGroupX, limit, validation_error_map[VALIDATION_ERROR_19e0034a]); + ") equals or exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 ").", + baseGroupX, limit); } else if (groupCountX > (limit - baseGroupX)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e00350, LayerName, "vkCmdDispatchBaseKHR(): baseGroupX (%" PRIu32 ") + groupCountX (%" PRIu32 - ") exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 "). %s", - baseGroupX, groupCountX, limit, validation_error_map[VALIDATION_ERROR_19e00350]); + ") exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 ").", + baseGroupX, groupCountX, limit); } limit = device_data->device_limits.maxComputeWorkGroupCount[1]; @@ -2949,14 +2873,14 @@ bool pv_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e0034c, LayerName, "vkCmdDispatch(): baseGroupY (%" PRIu32 - ") equals or exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 "). %s", - baseGroupY, limit, validation_error_map[VALIDATION_ERROR_19e0034c]); + ") equals or exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 ").", + baseGroupY, limit); } else if (groupCountY > (limit - baseGroupY)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e00352, LayerName, "vkCmdDispatchBaseKHR(): baseGroupY (%" PRIu32 ") + groupCountY (%" PRIu32 - ") exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 "). %s", - baseGroupY, groupCountY, limit, validation_error_map[VALIDATION_ERROR_19e00352]); + ") exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 ").", + baseGroupY, groupCountY, limit); } limit = device_data->device_limits.maxComputeWorkGroupCount[2]; @@ -2964,14 +2888,14 @@ bool pv_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e0034e, LayerName, "vkCmdDispatch(): baseGroupZ (%" PRIu32 - ") equals or exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 "). %s", - baseGroupZ, limit, validation_error_map[VALIDATION_ERROR_19e0034e]); + ") equals or exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 ").", + baseGroupZ, limit); } else if (groupCountZ > (limit - baseGroupZ)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e00354, LayerName, "vkCmdDispatchBaseKHR(): baseGroupZ (%" PRIu32 ") + groupCountZ (%" PRIu32 - ") exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 "). %s", - baseGroupZ, groupCountZ, limit, validation_error_map[VALIDATION_ERROR_19e00354]); + ") exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 ").", + baseGroupZ, groupCountZ, limit); } return skip; -- cgit v1.2.3