diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2018-04-01 10:38:15 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2018-04-02 14:18:39 -0600 |
| commit | 651b7cd0e960ce11ae403c81f370205e84548682 (patch) | |
| tree | 550f12dd34ee14d80bf3c6c00aa15b8cc0c0ebf1 | |
| parent | 15c1d014cad11a0099be582ea81ec79a3179b860 (diff) | |
| download | usermoji-651b7cd0e960ce11ae403c81f370205e84548682.tar.xz | |
layers: Remove layer prefix from log_msg calls
Change-Id: Iea43bd2f8f2c92d99b5fdf40abe94149a6fb860c
| -rw-r--r-- | layers/buffer_validation.cpp | 556 | ||||
| -rw-r--r-- | layers/core_validation.cpp | 707 | ||||
| -rw-r--r-- | layers/descriptor_sets.cpp | 20 | ||||
| -rw-r--r-- | layers/object_tracker.h | 20 | ||||
| -rw-r--r-- | layers/object_tracker_utils.cpp | 29 | ||||
| -rw-r--r-- | layers/parameter_validation.h | 141 | ||||
| -rw-r--r-- | layers/parameter_validation_utils.cpp | 442 | ||||
| -rw-r--r-- | layers/shader_validation.cpp | 64 | ||||
| -rw-r--r-- | layers/threading.h | 6 | ||||
| -rw-r--r-- | layers/unique_objects.cpp | 4 | ||||
| -rw-r--r-- | layers/vk_layer_logging.h | 7 | ||||
| -rw-r--r-- | scripts/parameter_validation_generator.py | 2 |
12 files changed, 979 insertions, 1019 deletions
diff --git a/layers/buffer_validation.cpp b/layers/buffer_validation.cpp index 3dc5f953..1a1f7dc8 100644 --- a/layers/buffer_validation.cpp +++ b/layers/buffer_validation.cpp @@ -94,14 +94,14 @@ bool FindLayoutVerifyNode(layer_data const *device_data, GLOBAL_CB_NODE const *p } if (node.layout != VK_IMAGE_LAYOUT_MAX_ENUM && node.layout != imgsubIt->second.layout) { log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(imgpair.image), - DRAWSTATE_INVALID_LAYOUT, "DS", + DRAWSTATE_INVALID_LAYOUT, "Cannot query for VkImage 0x%" PRIx64 " layout when combined aspect mask %d has multiple layout types: %s and %s", HandleToUint64(imgpair.image), oldAspectMask, string_VkImageLayout(node.layout), string_VkImageLayout(imgsubIt->second.layout)); } if (node.initialLayout != VK_IMAGE_LAYOUT_MAX_ENUM && node.initialLayout != imgsubIt->second.initialLayout) { log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(imgpair.image), - DRAWSTATE_INVALID_LAYOUT, "DS", + DRAWSTATE_INVALID_LAYOUT, "Cannot query for VkImage 0x%" PRIx64 " layout when combined aspect mask %d has multiple initial layout types: %s and %s", HandleToUint64(imgpair.image), oldAspectMask, string_VkImageLayout(node.initialLayout), @@ -125,7 +125,7 @@ bool FindLayoutVerifyLayout(layer_data const *device_data, ImageSubresourcePair } if (layout != VK_IMAGE_LAYOUT_MAX_ENUM && layout != imgsubIt->second.layout) { log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(imgpair.image), - DRAWSTATE_INVALID_LAYOUT, "DS", + DRAWSTATE_INVALID_LAYOUT, "Cannot query for VkImage 0x%" PRIx64 " layout when combined aspect mask %d has multiple layout types: %s and %s", HandleToUint64(imgpair.image), oldAspectMask, string_VkImageLayout(layout), string_VkImageLayout(imgsubIt->second.layout)); @@ -312,7 +312,7 @@ bool VerifyFramebufferAndRenderPassLayouts(layer_data *device_data, GLOBAL_CB_NO const auto report_data = core_validation::GetReportData(device_data); if (pRenderPassInfo->attachmentCount != framebufferInfo.attachmentCount) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_RENDERPASS, "DS", + HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_RENDERPASS, "You cannot start a render pass using a framebuffer with a different number of attachments."); } for (uint32_t i = 0; i < pRenderPassInfo->attachmentCount; ++i) { @@ -335,7 +335,7 @@ bool VerifyFramebufferAndRenderPassLayouts(layer_data *device_data, GLOBAL_CB_NO } if (initial_layout != VK_IMAGE_LAYOUT_UNDEFINED && initial_layout != node.layout) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_RENDERPASS, "DS", + DRAWSTATE_INVALID_RENDERPASS, "You cannot start a render pass using attachment %u where the render pass initial layout is %s " "and the previous known layout of the attachment is %s. The layouts must match, or the render " "pass initial layout for the attachment must be VK_IMAGE_LAYOUT_UNDEFINED", @@ -389,7 +389,7 @@ bool ValidateImageAspectLayout(layer_data *device_data, GLOBAL_CB_NODE const *pC } else if (node.layout != mem_barrier->oldLayout) { skip |= log_msg(core_validation::GetReportData(device_data), VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), - DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + DRAWSTATE_INVALID_IMAGE_LAYOUT, "For image 0x%" PRIx64 " you cannot transition the layout of aspect %d from %s when current layout is %s.", HandleToUint64(mem_barrier->image), aspect, string_VkImageLayout(mem_barrier->oldLayout), string_VkImageLayout(node.layout)); @@ -494,7 +494,7 @@ bool ValidateBarrierLayoutToImageUsage(layer_data *device_data, const VkImageMem if (msg_code != VALIDATION_ERROR_UNDEFINED) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(img_barrier->image), msg_code, "DS", + HandleToUint64(img_barrier->image), msg_code, "%s: Image barrier 0x%p %sLayout=%s is not compatible with image 0x%" PRIx64 " usage flags 0x%" PRIx32 ".", func_name, static_cast<const void *>(img_barrier), ((new_not_old) ? "new" : "old"), string_VkImageLayout(layout), HandleToUint64(img_barrier->image), usage_flags); @@ -522,7 +522,7 @@ bool ValidateBarriersToImages(layer_data *device_data, GLOBAL_CB_NODE const *cb_ // TODO: Add unique id for error when available skip |= log_msg( core_validation::GetReportData(device_data), VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, 0, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, 0, "Attempting to transition shared presentable image 0x%" PRIx64 " from layout %s to layout %s, but image has already been presented and cannot have its layout transitioned.", HandleToUint64(img_barrier->image), string_VkImageLayout(img_barrier->oldLayout), @@ -536,13 +536,13 @@ bool ValidateBarriersToImages(layer_data *device_data, GLOBAL_CB_NODE const *cb_ auto const aspect_mask = img_barrier->subresourceRange.aspectMask; auto const ds_mask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; if ((aspect_mask & ds_mask) != (ds_mask)) { - skip |= log_msg( - core_validation::GetReportData(device_data), VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(img_barrier->image), VALIDATION_ERROR_0a00096e, "DS", - "%s: Image barrier 0x%p references image 0x%" PRIx64 - " of format %s that must have the depth and stencil aspects set, but its aspectMask is 0x%" PRIx32 ".", - func_name, static_cast<const void *>(img_barrier), HandleToUint64(img_barrier->image), - string_VkFormat(image_create_info->format), aspect_mask); + skip |= + log_msg(core_validation::GetReportData(device_data), VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(img_barrier->image), VALIDATION_ERROR_0a00096e, + "%s: Image barrier 0x%p references image 0x%" PRIx64 + " of format %s that must have the depth and stencil aspects set, but its aspectMask is 0x%" PRIx32 ".", + func_name, static_cast<const void *>(img_barrier), HandleToUint64(img_barrier->image), + string_VkFormat(image_create_info->format), aspect_mask); } } uint32_t level_count = ResolveRemainingLevels(&img_barrier->subresourceRange, image_create_info->mipLevels); @@ -641,7 +641,7 @@ bool VerifyImageLayout(layer_data const *device_data, GLOBAL_CB_NODE const *cb_n // TODO: Improve log message in the next pass skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_IMAGE_LAYOUT, "%s: Cannot use image 0x%" PRIx64 " with specific layout %s that doesn't match the actual current layout %s.", caller, HandleToUint64(image), string_VkImageLayout(explicit_layout), string_VkImageLayout(node.layout)); } @@ -654,7 +654,7 @@ bool VerifyImageLayout(layer_data const *device_data, GLOBAL_CB_NODE const *cb_n // LAYOUT_GENERAL is allowed, but may not be performance optimal, flag as perf warning. skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_node->commandBuffer), - DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + DRAWSTATE_INVALID_IMAGE_LAYOUT, "%s: For optimal performance image 0x%" PRIx64 " layout should be %s instead of GENERAL.", caller, HandleToUint64(image), string_VkImageLayout(optimal_layout)); } @@ -664,14 +664,14 @@ bool VerifyImageLayout(layer_data const *device_data, GLOBAL_CB_NODE const *cb_n // TODO: Add unique error id when available. skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, msg_code, - "DS", "Layout for shared presentable image is %s but must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR.", + "Layout for shared presentable image is %s but must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR.", string_VkImageLayout(optimal_layout)); } } } else { *error = true; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), msg_code, "DS", + HandleToUint64(cb_node->commandBuffer), msg_code, "%s: Layout for image 0x%" PRIx64 " is %s but can only be %s or VK_IMAGE_LAYOUT_GENERAL.", caller, HandleToUint64(image), string_VkImageLayout(explicit_layout), string_VkImageLayout(optimal_layout)); } @@ -700,7 +700,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo if (pCreateInfo->format == VK_FORMAT_UNDEFINED) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e0075e, "IMAGE", "vkCreateImage: VkFormat for image must not be VK_FORMAT_UNDEFINED."); + VALIDATION_ERROR_09e0075e, "vkCreateImage: VkFormat for image must not be VK_FORMAT_UNDEFINED."); return skip; } @@ -715,8 +715,8 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo std::stringstream ss; UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007ac : VALIDATION_ERROR_09e007a2); ss << "vkCreateImage format parameter " << format_string << " is an unsupported format"; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "IMAGE", - "%s.", ss.str().c_str()); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "%s.", + ss.str().c_str()); return skip; } @@ -725,8 +725,8 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007ae : VALIDATION_ERROR_09e007a4); ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_SAMPLED_BIT is not supported for format " << format_string << " with tiling " << tiling_string; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "IMAGE", - "%s.", ss.str().c_str()); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "%s.", + ss.str().c_str()); } if ((pCreateInfo->usage & VK_IMAGE_USAGE_STORAGE_BIT) && !(features & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)) { @@ -734,8 +734,8 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007b0 : VALIDATION_ERROR_09e007a6); ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_STORAGE_BIT is not supported for format " << format_string << " with tiling " << tiling_string; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "IMAGE", - "%s.", ss.str().c_str()); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "%s.", + ss.str().c_str()); } // TODO: Add checks for EXTENDED_USAGE images to validate images are compatible @@ -748,8 +748,8 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo std::stringstream ss; ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_COLOR_ATTACHMENT is not supported for format " << format_string << " with tiling " << tiling_string; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "IMAGE", - "%s.", ss.str().c_str()); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "%s.", + ss.str().c_str()); } // Validate that format supports usage as depth/stencil attachment @@ -759,8 +759,8 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo std::stringstream ss; ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT is not supported for format " << format_string << " with tiling " << tiling_string; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "IMAGE", - "%s.", ss.str().c_str()); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, "%s.", + ss.str().c_str()); } } @@ -768,7 +768,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo std::stringstream ss; ss << "vkCreateImage: Image type must be VK_IMAGE_TYPE_2D when VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT flag bit is set"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e0076a, "IMAGE", "%s.", ss.str().c_str()); + VALIDATION_ERROR_09e0076a, "%s.", ss.str().c_str()); } const VkPhysicalDeviceLimits *device_limits = &(GetPhysicalDeviceProperties(device_data)->limits); @@ -779,7 +779,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo ss << "vkCreateImage: The combination of format, type, tiling, usage and flags supplied in the VkImageCreateInfo struct is " "reported by vkGetPhysicalDeviceImageFormatProperties() as unsupported"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e00758, "IMAGE", "%s.", ss.str().c_str()); + VALIDATION_ERROR_09e00758, "%s.", ss.str().c_str()); return skip; } @@ -788,7 +788,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo std::stringstream ss; ss << "vkCreateImage: 1D image width exceeds maximum supported width for format " << format_string; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e0076e, "IMAGE", "%s.", ss.str().c_str()); + VALIDATION_ERROR_09e0076e, "%s.", ss.str().c_str()); } if (VK_IMAGE_TYPE_2D == pCreateInfo->imageType) { @@ -798,7 +798,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo std::stringstream ss; ss << "vkCreateImage: 2D image extent exceeds maximum supported width or height for format " << format_string; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e00770, "IMAGE", "%s.", ss.str().c_str()); + VALIDATION_ERROR_09e00770, "%s.", ss.str().c_str()); } } else { if (pCreateInfo->extent.width > std::max(device_limits->maxImageDimensionCube, format_limits.maxExtent.width) || @@ -808,7 +808,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo "format " << format_string; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e00772, "IMAGE", "%s.", ss.str().c_str()); + VALIDATION_ERROR_09e00772, "%s.", ss.str().c_str()); } } } @@ -820,7 +820,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo std::stringstream ss; ss << "vkCreateImage: 3D image extent exceeds maximum supported width, height, or depth for format " << format_string; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e00776, "IMAGE", "%s.", ss.str().c_str()); + VALIDATION_ERROR_09e00776, "%s.", ss.str().c_str()); } } @@ -835,7 +835,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo std::stringstream ss; ss << "vkCreateImage: Image mip levels exceed image format maxMipLevels for format " << format_string; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e0077e, "IMAGE", "%s.", ss.str().c_str()); + VALIDATION_ERROR_09e0077e, "%s.", ss.str().c_str()); } VkImageUsageFlags attach_flags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | @@ -845,7 +845,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo ss << "vkCreateImage: Image usage flags include a frame buffer attachment bit and image width exceeds device " "maxFramebufferWidth"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e00788, "IMAGE", "%s.", ss.str().c_str()); + VALIDATION_ERROR_09e00788, "%s.", ss.str().c_str()); } if ((pCreateInfo->usage & attach_flags) && (pCreateInfo->extent.height > device_limits->maxFramebufferHeight)) { @@ -853,7 +853,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo ss << "vkCreateImage: Image usage flags include a frame buffer attachment bit and image height exceeds device " "maxFramebufferHeight"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e0078a, "IMAGE", "%s.", ss.str().c_str()); + VALIDATION_ERROR_09e0078a, "%s.", ss.str().c_str()); } uint64_t total_size = (uint64_t)pCreateInfo->extent.width * (uint64_t)pCreateInfo->extent.height * @@ -867,7 +867,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo if (total_size > format_limits.maxResourceSize) { skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, - IMAGE_INVALID_FORMAT_LIMITS_VIOLATION, "Image", + IMAGE_INVALID_FORMAT_LIMITS_VIOLATION, "CreateImage resource size exceeds allowable maximum Image resource size = 0x%" PRIxLEAST64 ", maximum resource size = 0x%" PRIxLEAST64 " ", total_size, format_limits.maxResourceSize); @@ -876,19 +876,19 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo if (pCreateInfo->arrayLayers > format_limits.maxArrayLayers) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, VALIDATION_ERROR_09e00780, - "Image", "CreateImage arrayLayers=%d exceeds allowable maximum supported by format of %d.", - pCreateInfo->arrayLayers, format_limits.maxArrayLayers); + "CreateImage arrayLayers=%d exceeds allowable maximum supported by format of %d.", pCreateInfo->arrayLayers, + format_limits.maxArrayLayers); } if ((pCreateInfo->samples & format_limits.sampleCounts) == 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, - VALIDATION_ERROR_09e0078e, "Image", "CreateImage samples %s is not supported by format 0x%.8X.", + VALIDATION_ERROR_09e0078e, "CreateImage samples %s is not supported by format 0x%.8X.", string_VkSampleCountFlagBits(pCreateInfo->samples), format_limits.sampleCounts); } if ((pCreateInfo->flags & VK_IMAGE_CREATE_SPARSE_ALIASED_BIT) && (!GetEnabledFeatures(device_data)->sparseResidencyAliased)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_FEATURE, "DS", + DRAWSTATE_INVALID_FEATURE, "vkCreateImage(): the sparseResidencyAliased device feature is disabled: Images cannot be created with the " "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT set."); } @@ -900,7 +900,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo // TODO: Add Maintenance2 VUID skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_UNDEFINED, "DS", + VALIDATION_ERROR_UNDEFINED, "vkCreateImage(): If pCreateInfo->flags contains VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR, " "format must be block, ETC or ASTC compressed, but is %s", string_VkFormat(pCreateInfo->format)); @@ -909,7 +909,7 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo // TODO: Add Maintenance2 VUID skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_UNDEFINED, "DS", + VALIDATION_ERROR_UNDEFINED, "vkCreateImage(): If pCreateInfo->flags contains VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR, " "flags must also contain VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT."); } @@ -973,23 +973,23 @@ bool ValidateImageAttributes(layer_data *device_data, IMAGE_STATE *image_state, if (range.aspectMask != VK_IMAGE_ASPECT_COLOR_BIT) { char const str[] = "vkCmdClearColorImage aspectMasks for all subresource ranges must be set to VK_IMAGE_ASPECT_COLOR_BIT"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", str); + HandleToUint64(image_state->image), DRAWSTATE_INVALID_IMAGE_ASPECT, str); } if (FormatIsDepthOrStencil(image_state->createInfo.format)) { char const str[] = "vkCmdClearColorImage called with depth/stencil image."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_1880000e, "IMAGE", "%s.", str); + HandleToUint64(image_state->image), VALIDATION_ERROR_1880000e, "%s.", str); } else if (FormatIsCompressed(image_state->createInfo.format)) { char const str[] = "vkCmdClearColorImage called with compressed image."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_1880000e, "IMAGE", "%s.", str); + HandleToUint64(image_state->image), VALIDATION_ERROR_1880000e, "%s.", str); } if (!(image_state->createInfo.usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT)) { char const str[] = "vkCmdClearColorImage called with image created without VK_IMAGE_USAGE_TRANSFER_DST_BIT."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_18800004, "IMAGE", "%s.", str); + HandleToUint64(image_state->image), VALIDATION_ERROR_18800004, "%s.", str); } return skip; } @@ -1025,14 +1025,14 @@ bool VerifyClearImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IM if (image_state->createInfo.tiling != VK_IMAGE_TILING_LINEAR) { // LAYOUT_GENERAL is allowed, but may not be performance optimal, flag as perf warning. skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + HandleToUint64(image_state->image), DRAWSTATE_INVALID_IMAGE_LAYOUT, "%s: Layout for cleared image should be TRANSFER_DST_OPTIMAL instead of GENERAL.", func_name); } } else if (VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR == dest_image_layout) { if (!GetDeviceExtensions(device_data)->vk_khr_shared_presentable_image) { // TODO: Add unique error id when available. skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), 0, "DS", + HandleToUint64(image_state->image), 0, "Must enable VK_KHR_shared_presentable_image extension before creating images with a layout type " "of VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR."); @@ -1040,7 +1040,7 @@ bool VerifyClearImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IM if (image_state->shared_presentable) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), 0, "DS", + HandleToUint64(image_state->image), 0, "Layout for shared presentable cleared image is %s but can only be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR.", string_VkImageLayout(dest_image_layout)); } @@ -1053,7 +1053,7 @@ bool VerifyClearImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IM assert(strcmp(func_name, "vkCmdClearColorImage()") == 0); } skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), error_code, "DS", + HandleToUint64(image_state->image), error_code, "%s: Layout for cleared image is %s but can only be TRANSFER_DST_OPTIMAL or GENERAL.", func_name, string_VkImageLayout(dest_image_layout)); } @@ -1073,10 +1073,10 @@ bool VerifyClearImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IM } else { assert(strcmp(func_name, "vkCmdClearColorImage()") == 0); } - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, - error_code, "DS", - "%s: Cannot clear an image whose layout is %s and doesn't match the current layout %s.", - func_name, string_VkImageLayout(dest_image_layout), string_VkImageLayout(node.layout)); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, + error_code, "%s: Cannot clear an image whose layout is %s and doesn't match the current layout %s.", + func_name, string_VkImageLayout(dest_image_layout), string_VkImageLayout(node.layout)); } } } @@ -1171,20 +1171,20 @@ bool PreCallValidateCmdClearDepthStencilImage(layer_data *device_data, VkCommand "vkCmdClearDepthStencilImage aspectMasks for all subresource ranges must be set to VK_IMAGE_ASPECT_DEPTH_BIT " "and/or VK_IMAGE_ASPECT_STENCIL_BIT"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", str); + HandleToUint64(commandBuffer), DRAWSTATE_INVALID_IMAGE_ASPECT, str); } } if (image_state && !FormatIsDepthOrStencil(image_state->createInfo.format)) { char const str[] = "vkCmdClearDepthStencilImage called without a depth/stencil image."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_18a0001c, "IMAGE", "%s.", str); + HandleToUint64(image), VALIDATION_ERROR_18a0001c, "%s.", str); } if (VK_IMAGE_USAGE_TRANSFER_DST_BIT != (VK_IMAGE_USAGE_TRANSFER_DST_BIT & image_state->createInfo.usage)) { char const str[] = "vkCmdClearDepthStencilImage() called with an image that was not created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT " "set."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_18a00012, "IMAGE", "%s.", str); + HandleToUint64(image), VALIDATION_ERROR_18a00012, "%s.", str); } VkFormatProperties props = GetFormatProperties(device_data, image_state->createInfo.format); VkImageTiling tiling = image_state->createInfo.tiling; @@ -1192,7 +1192,7 @@ bool PreCallValidateCmdClearDepthStencilImage(layer_data *device_data, VkCommand if ((GetDeviceExtensions(device_data)->vk_khr_maintenance1) && (VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR != (flags & VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_18a00010, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_18a00010, "vkCmdClearDepthStencilImage() called with an image of format %s and tiling %s that does not support " "VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR.", string_VkFormat(image_state->createInfo.format), string_VkImageTiling(image_state->createInfo.tiling)); @@ -1366,7 +1366,7 @@ static inline bool CheckItgOffset(layer_data *device_data, const GLOBAL_CB_NODE // If the queue family image transfer granularity is (0, 0, 0), then the offset must always be (0, 0, 0) if (IsExtentAllZeroes(&offset_extent) == false) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "%s: pRegion[%d].%s (x=%d, y=%d, z=%d) must be (x=0, y=0, z=0) when the command buffer's queue family " "image transfer granularity is (w=0, h=0, d=0).", function, i, member, offset->x, offset->y, offset->z); @@ -1376,7 +1376,7 @@ static inline bool CheckItgOffset(layer_data *device_data, const GLOBAL_CB_NODE // integer multiples of the image transfer granularity. if (IsExtentAligned(&offset_extent, granularity) == false) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "%s: pRegion[%d].%s (x=%d, y=%d, z=%d) dimensions must be even integer multiples of this command " "buffer's queue family image transfer granularity (w=%d, h=%d, d=%d).", function, i, member, offset->x, offset->y, offset->z, granularity->width, granularity->height, @@ -1397,7 +1397,7 @@ static inline bool CheckItgExtent(layer_data *device_data, const GLOBAL_CB_NODE // subresource extent. if (IsExtentEqual(extent, subresource_extent) == false) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "%s: pRegion[%d].%s (w=%d, h=%d, d=%d) must match the image subresource extents (w=%d, h=%d, d=%d) " "when the command buffer's queue family image transfer granularity is (w=0, h=0, d=0).", function, i, member, extent->width, extent->height, extent->depth, subresource_extent->width, @@ -1433,7 +1433,7 @@ static inline bool CheckItgExtent(layer_data *device_data, const GLOBAL_CB_NODE } if (!(x_ok && y_ok && z_ok)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "%s: pRegion[%d].%s (w=%d, h=%d, d=%d) dimensions must be even integer multiples of this command " "buffer's queue family image transfer granularity (w=%d, h=%d, d=%d) or offset (x=%d, y=%d, z=%d) + " "extent (w=%d, h=%d, d=%d) must match the image subresource extents (w=%d, h=%d, d=%d).", @@ -1529,7 +1529,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if (src_state->createInfo.imageType == VK_IMAGE_TYPE_1D) { if ((0 != region.srcOffset.y) || (1 != src_copy_extent.height)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(src_state->image), VALIDATION_ERROR_09c00124, "IMAGE", + HandleToUint64(src_state->image), VALIDATION_ERROR_09c00124, "vkCmdCopyImage(): pRegion[%d] srcOffset.y is %d and extent.height is %d. For 1D images these must " "be 0 and 1, respectively.", i, region.srcOffset.y, src_copy_extent.height); @@ -1539,7 +1539,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat // VUID-VkImageCopy-srcImage-01785 if ((src_state->createInfo.imageType == VK_IMAGE_TYPE_1D) && ((0 != region.srcOffset.z) || (1 != src_copy_extent.depth))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(src_state->image), VALIDATION_ERROR_09c00df2, "IMAGE", + HandleToUint64(src_state->image), VALIDATION_ERROR_09c00df2, "vkCmdCopyImage(): pRegion[%d] srcOffset.z is %d and extent.depth is %d. For 1D images " "these must be 0 and 1, respectively.", i, region.srcOffset.z, src_copy_extent.depth); @@ -1548,7 +1548,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat // VUID-VkImageCopy-srcImage-01787 if ((src_state->createInfo.imageType == VK_IMAGE_TYPE_2D) && (0 != region.srcOffset.z)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(src_state->image), VALIDATION_ERROR_09c00df6, "IMAGE", + HandleToUint64(src_state->image), VALIDATION_ERROR_09c00df6, "vkCmdCopyImage(): pRegion[%d] srcOffset.z is %d. For 2D images the z-offset must be 0.", i, region.srcOffset.z); } @@ -1558,7 +1558,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if ((0 != region.srcSubresource.baseArrayLayer) || (1 != region.srcSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(src_state->image), VALIDATION_ERROR_09c0011a, "IMAGE", + HandleToUint64(src_state->image), VALIDATION_ERROR_09c0011a, "vkCmdCopyImage(): pRegion[%d] srcSubresource.baseArrayLayer is %d and srcSubresource.layerCount " "is %d. For VK_IMAGE_TYPE_3D images these must be 0 and 1, respectively.", i, region.srcSubresource.baseArrayLayer, region.srcSubresource.layerCount); @@ -1568,7 +1568,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if (src_state->createInfo.imageType == VK_IMAGE_TYPE_3D || dst_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { if ((0 != region.srcSubresource.baseArrayLayer) || (1 != region.srcSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(src_state->image), VALIDATION_ERROR_09c0011a, "IMAGE", + HandleToUint64(src_state->image), VALIDATION_ERROR_09c0011a, "vkCmdCopyImage(): pRegion[%d] srcSubresource.baseArrayLayer is %d and " "srcSubresource.layerCount is %d. For copies with either source or dest of type " "VK_IMAGE_TYPE_3D, these must be 0 and 1, respectively.", @@ -1586,7 +1586,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat (SafeModulo(region.srcOffset.y, block_size.height) != 0) || (SafeModulo(region.srcOffset.z, block_size.depth) != 0)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(src_state->image), VALIDATION_ERROR_09c0013a, "IMAGE", + HandleToUint64(src_state->image), VALIDATION_ERROR_09c0013a, "vkCmdCopyImage(): pRegion[%d] srcOffset (%d, %d) must be multiples of the compressed image's " "texel width & height (%d, %d)..", i, region.srcOffset.x, region.srcOffset.y, block_size.width, block_size.height); @@ -1597,7 +1597,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat (src_copy_extent.width + region.srcOffset.x != mip_extent.width)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(src_state->image), VALIDATION_ERROR_09c0013c, "IMAGE", + HandleToUint64(src_state->image), VALIDATION_ERROR_09c0013c, "vkCmdCopyImage(): pRegion[%d] extent width (%d) must be a multiple of the compressed texture block " "width (%d), or when added to srcOffset.x (%d) must equal the image subresource width (%d)..", i, src_copy_extent.width, block_size.width, region.srcOffset.x, mip_extent.width); @@ -1608,7 +1608,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat (src_copy_extent.height + region.srcOffset.y != mip_extent.height)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(src_state->image), VALIDATION_ERROR_09c0013e, "IMAGE", + HandleToUint64(src_state->image), VALIDATION_ERROR_09c0013e, "vkCmdCopyImage(): pRegion[%d] extent height (%d) must be a multiple of the compressed texture block " "height (%d), or when added to srcOffset.y (%d) must equal the image subresource height (%d)..", i, src_copy_extent.height, block_size.height, region.srcOffset.y, mip_extent.height); @@ -1619,7 +1619,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if ((SafeModulo(copy_depth, block_size.depth) != 0) && (copy_depth + region.srcOffset.z != mip_extent.depth)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(src_state->image), VALIDATION_ERROR_09c00140, "IMAGE", + HandleToUint64(src_state->image), VALIDATION_ERROR_09c00140, "vkCmdCopyImage(): pRegion[%d] extent width (%d) must be a multiple of the compressed texture block " "depth (%d), or when added to srcOffset.z (%d) must equal the image subresource depth (%d)..", i, src_copy_extent.depth, block_size.depth, region.srcOffset.z, mip_extent.depth); @@ -1631,7 +1631,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if (dst_state->createInfo.imageType == VK_IMAGE_TYPE_1D) { if ((0 != region.dstOffset.y) || (1 != dst_copy_extent.height)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00130, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00130, "vkCmdCopyImage(): pRegion[%d] dstOffset.y is %d and dst_copy_extent.height is %d. For 1D images " "these must be 0 and 1, respectively.", i, region.dstOffset.y, dst_copy_extent.height); @@ -1641,7 +1641,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat // VUID-VkImageCopy-dstImage-01786 if ((dst_state->createInfo.imageType == VK_IMAGE_TYPE_1D) && ((0 != region.dstOffset.z) || (1 != dst_copy_extent.depth))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00df4, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00df4, "vkCmdCopyImage(): pRegion[%d] dstOffset.z is %d and extent.depth is %d. For 1D images these must be 0 " "and 1, respectively.", i, region.dstOffset.z, dst_copy_extent.depth); @@ -1650,7 +1650,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat // VUID-VkImageCopy-dstImage-01788 if ((dst_state->createInfo.imageType == VK_IMAGE_TYPE_2D) && (0 != region.dstOffset.z)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00df8, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00df8, "vkCmdCopyImage(): pRegion[%d] dstOffset.z is %d. For 2D images the z-offset must be 0.", i, region.dstOffset.z); } @@ -1658,7 +1658,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if (dst_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { if ((0 != region.dstSubresource.baseArrayLayer) || (1 != region.dstSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c0011a, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c0011a, "vkCmdCopyImage(): pRegion[%d] dstSubresource.baseArrayLayer is %d and dstSubresource.layerCount " "is %d. For VK_IMAGE_TYPE_3D images these must be 0 and 1, respectively.", i, region.dstSubresource.baseArrayLayer, region.dstSubresource.layerCount); @@ -1670,7 +1670,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if ((0 != region.dstSubresource.baseArrayLayer) || (1 != region.dstSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c0011a, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c0011a, "vkCmdCopyImage(): pRegion[%d] dstSubresource.baseArrayLayer is %d and dstSubresource.layerCount " "is %d. For VK_IMAGE_TYPE_3D images these must be 0 and 1, respectively.", i, region.dstSubresource.baseArrayLayer, region.dstSubresource.layerCount); @@ -1680,7 +1680,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if (src_state->createInfo.imageType == VK_IMAGE_TYPE_3D || dst_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { if ((0 != region.dstSubresource.baseArrayLayer) || (1 != region.dstSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c0011a, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c0011a, "vkCmdCopyImage(): pRegion[%d] dstSubresource.baseArrayLayer is %d and " "dstSubresource.layerCount is %d. For copies with either source or dest of type " "VK_IMAGE_TYPE_3D, these must be 0 and 1, respectively.", @@ -1698,7 +1698,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat (SafeModulo(region.dstOffset.y, block_size.height) != 0) || (SafeModulo(region.dstOffset.z, block_size.depth) != 0)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00144, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00144, "vkCmdCopyImage(): pRegion[%d] dstOffset (%d, %d) must be multiples of the compressed image's " "texel width & height (%d, %d)..", i, region.dstOffset.x, region.dstOffset.y, block_size.width, block_size.height); @@ -1709,7 +1709,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat (dst_copy_extent.width + region.dstOffset.x != mip_extent.width)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00146, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00146, "vkCmdCopyImage(): pRegion[%d] dst_copy_extent width (%d) must be a multiple of the compressed texture " "block width (%d), or when added to dstOffset.x (%d) must equal the image subresource width (%d)..", i, dst_copy_extent.width, block_size.width, region.dstOffset.x, mip_extent.width); @@ -1719,7 +1719,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if ((SafeModulo(dst_copy_extent.height, block_size.height) != 0) && (dst_copy_extent.height + region.dstOffset.y != mip_extent.height)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00148, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c00148, "vkCmdCopyImage(): pRegion[%d] dst_copy_extent height (%d) must be a multiple of the compressed " "texture block height (%d), or when added to dstOffset.y (%d) must equal the image subresource " "height (%d)..", @@ -1731,7 +1731,7 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat if ((SafeModulo(copy_depth, block_size.depth) != 0) && (copy_depth + region.dstOffset.z != mip_extent.depth)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(dst_state->image), VALIDATION_ERROR_09c0014a, "IMAGE", + HandleToUint64(dst_state->image), VALIDATION_ERROR_09c0014a, "vkCmdCopyImage(): pRegion[%d] dst_copy_extent width (%d) must be a multiple of the compressed texture " "block depth (%d), or when added to dstOffset.z (%d) must equal the image subresource depth (%d)..", i, dst_copy_extent.depth, block_size.depth, region.dstOffset.z, mip_extent.depth); @@ -1777,14 +1777,14 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod std::stringstream ss; ss << "vkCmdCopyImage: number of layers in pRegions[" << i << "] srcSubresource is zero"; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", "%s", ss.str().c_str()); + HandleToUint64(command_buffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "%s", ss.str().c_str()); } if (region.dstSubresource.layerCount == 0) { std::stringstream ss; ss << "vkCmdCopyImage: number of layers in pRegions[" << i << "] dstSubresource is zero"; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", "%s", ss.str().c_str()); + HandleToUint64(command_buffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "%s", ss.str().c_str()); } if (GetDeviceExtensions(device_data)->vk_khr_maintenance1) { @@ -1803,7 +1803,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod ss << "vkCmdCopyImage: number of depth slices in source and destination subresources for pRegions[" << i << "] do not match"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c00118, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_09c00118, "%s.", ss.str().c_str()); } } } else { @@ -1813,7 +1813,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod ss << "vkCmdCopyImage: number of layers in source and destination subresources for pRegions[" << i << "] do not match"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c00118, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_09c00118, "%s.", ss.str().c_str()); } } @@ -1822,7 +1822,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if (region.srcSubresource.aspectMask != region.dstSubresource.aspectMask) { char const str[] = "vkCmdCopyImage: Src and dest aspectMasks for each region must match"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c00112, "IMAGE", "%s.", str); + HandleToUint64(command_buffer), VALIDATION_ERROR_09c00112, "%s.", str); } } @@ -1832,7 +1832,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod ss << "vkCmdCopyImage: pRegion[" << i << "] srcSubresource.aspectMask cannot specify aspects not present in source image"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c0011c, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_09c0011c, "%s.", ss.str().c_str()); } // For each region, the aspectMask member of dstSubresource must be present in the destination image @@ -1840,7 +1840,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod std::stringstream ss; ss << "vkCmdCopyImage: pRegion[" << i << "] dstSubresource.aspectMask cannot specify aspects not present in dest image"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c0011e, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_09c0011e, "%s.", ss.str().c_str()); } // AspectMask must not contain VK_IMAGE_ASPECT_METADATA_BIT @@ -1849,7 +1849,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod std::stringstream ss; ss << "vkCmdCopyImage: pRegions[" << i << "] may not specify aspectMask containing VK_IMAGE_ASPECT_METADATA_BIT"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_0a600150, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_0a600150, "%s.", ss.str().c_str()); } // For each region, if aspectMask contains VK_IMAGE_ASPECT_COLOR_BIT, it must not contain either of @@ -1858,7 +1858,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod (region.srcSubresource.aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT))) { char const str[] = "vkCmdCopyImage aspectMask cannot specify both COLOR and DEPTH/STENCIL aspects"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_0a60014e, "IMAGE", "%s.", str); + HandleToUint64(command_buffer), VALIDATION_ERROR_0a60014e, "%s.", str); } // MipLevel must be less than the mipLevels specified in VkImageCreateInfo when the image was created @@ -1867,14 +1867,14 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod ss << "vkCmdCopyImage: pRegions[" << i << "] specifies a src mipLevel greater than the number specified when the srcImage was created."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_19000d40, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_19000d40, "%s.", ss.str().c_str()); } if (region.dstSubresource.mipLevel >= dst_image_state->createInfo.mipLevels) { std::stringstream ss; ss << "vkCmdCopyImage: pRegions[" << i << "] specifies a dst mipLevel greater than the number specified when the dstImage was created."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_19000d42, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_19000d42, "%s.", ss.str().c_str()); } // (baseArrayLayer + layerCount) must be less than or equal to the arrayLayers specified in VkImageCreateInfo when the @@ -1884,14 +1884,14 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod ss << "vkCmdCopyImage: srcImage arrayLayers was " << src_image_state->createInfo.arrayLayers << " but subRegion[" << i << "] baseArrayLayer + layerCount is " << (region.srcSubresource.baseArrayLayer + region.srcSubresource.layerCount); skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_19000d44, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_19000d44, "%s.", ss.str().c_str()); } if ((region.dstSubresource.baseArrayLayer + region.dstSubresource.layerCount) > dst_image_state->createInfo.arrayLayers) { std::stringstream ss; ss << "vkCmdCopyImage: dstImage arrayLayers was " << dst_image_state->createInfo.arrayLayers << " but subRegion[" << i << "] baseArrayLayer + layerCount is " << (region.dstSubresource.baseArrayLayer + region.dstSubresource.layerCount); skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_19000d46, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_19000d46, "%s.", ss.str().c_str()); } // Check region extents for 1D-1D, 2D-2D, and 3D-3D copies @@ -1905,7 +1905,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod << " ], extent [ " << src_copy_extent.width << ", " << src_copy_extent.height << ", " << src_copy_extent.depth << " ] exceeds the source image dimensions"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_190000f4, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_190000f4, "%s.", ss.str().c_str()); } // The destination region specified by a given element of regions must be a region that is contained within dst_image @@ -1917,7 +1917,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod << " ], extent [ " << dst_copy_extent.width << ", " << dst_copy_extent.height << ", " << dst_copy_extent.depth << " ] exceeds the destination image dimensions"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_190000f6, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_190000f6, "%s.", ss.str().c_str()); } } @@ -1927,7 +1927,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod uint32_t extent_check = ExceedsBounds(&(region.srcOffset), &src_copy_extent, &subresource_extent); if (extent_check & x_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c00120, "IMAGE", + HandleToUint64(command_buffer), VALIDATION_ERROR_09c00120, "vkCmdCopyImage: Source image pRegion %1d x-dimension offset [%1d] + extent [%1d] exceeds subResource " "width [%1d].", i, region.srcOffset.x, src_copy_extent.width, subresource_extent.width); @@ -1935,14 +1935,14 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if (extent_check & y_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c00122, "IMAGE", + HandleToUint64(command_buffer), VALIDATION_ERROR_09c00122, "vkCmdCopyImage: Source image pRegion %1d y-dimension offset [%1d] + extent [%1d] exceeds subResource " "height [%1d].", i, region.srcOffset.y, src_copy_extent.height, subresource_extent.height); } if (extent_check & z_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c00126, "IMAGE", + HandleToUint64(command_buffer), VALIDATION_ERROR_09c00126, "vkCmdCopyImage: Source image pRegion %1d z-dimension offset [%1d] + extent [%1d] exceeds subResource " "depth [%1d].", i, region.srcOffset.z, src_copy_extent.depth, subresource_extent.depth); @@ -1955,21 +1955,21 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod extent_check = ExceedsBounds(&(region.dstOffset), &dst_copy_extent, &subresource_extent); if (extent_check & x_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c0012c, "IMAGE", + HandleToUint64(command_buffer), VALIDATION_ERROR_09c0012c, "vkCmdCopyImage: Dest image pRegion %1d x-dimension offset [%1d] + extent [%1d] exceeds subResource " "width [%1d].", i, region.dstOffset.x, dst_copy_extent.width, subresource_extent.width); } if (extent_check & y_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c0012e, "IMAGE", + HandleToUint64(command_buffer), VALIDATION_ERROR_09c0012e, "vkCmdCopyImage: Dest image pRegion %1d y-dimension offset [%1d] + extent [%1d] exceeds subResource " "height [%1d].", i, region.dstOffset.y, dst_copy_extent.height, subresource_extent.height); } if (extent_check & z_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_09c00132, "IMAGE", + HandleToUint64(command_buffer), VALIDATION_ERROR_09c00132, "vkCmdCopyImage: Dest image pRegion %1d z-dimension offset [%1d] + extent [%1d] exceeds subResource " "depth [%1d].", i, region.dstOffset.z, dst_copy_extent.depth, subresource_extent.depth); @@ -1984,7 +1984,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod std::stringstream ss; ss << "vkCmdCopyImage: pRegions[" << i << "] src overlaps with pRegions[" << j << "]."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_190000f8, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(command_buffer), VALIDATION_ERROR_190000f8, "%s.", ss.str().c_str()); } } } @@ -1997,7 +1997,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if (src_image_state->createInfo.format != dst_image_state->createInfo.format) { char const str[] = "vkCmdCopyImage called with unmatched source and dest image depth/stencil formats."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), DRAWSTATE_MISMATCHED_IMAGE_FORMAT, "IMAGE", str); + HandleToUint64(command_buffer), DRAWSTATE_MISMATCHED_IMAGE_FORMAT, str); } } else { size_t srcSize = FormatSize(src_image_state->createInfo.format); @@ -2005,7 +2005,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if (srcSize != destSize) { char const str[] = "vkCmdCopyImage called with unmatched source and dest image format sizes."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_1900010e, "IMAGE", "%s.", str); + HandleToUint64(command_buffer), VALIDATION_ERROR_1900010e, "%s.", str); } } @@ -2013,7 +2013,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if (src_image_state->createInfo.samples != dst_image_state->createInfo.samples) { char const str[] = "vkCmdCopyImage() called on image pair with non-identical sample counts."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), VALIDATION_ERROR_19000110, "IMAGE", "%s", str); + HandleToUint64(command_buffer), VALIDATION_ERROR_19000110, "%s", str); } skip |= ValidateMemoryIsBoundToImage(device_data, src_image_state, "vkCmdCopyImage()", VALIDATION_ERROR_190000fe); @@ -2086,7 +2086,7 @@ bool PreCallValidateCmdClearAttachments(layer_data *device_data, VkCommandBuffer // CmdClearAttachments. skip |= log_msg( report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), DRAWSTATE_CLEAR_CMD_BEFORE_DRAW, "DS", + HandleToUint64(commandBuffer), DRAWSTATE_CLEAR_CMD_BEFORE_DRAW, "vkCmdClearAttachments() issued on command buffer object 0x%" PRIx64 " prior to any Draw Cmds. It is recommended you use RenderPass LOAD_OP_CLEAR on Attachments prior to any Draw.", HandleToUint64(commandBuffer)); @@ -2106,20 +2106,20 @@ bool PreCallValidateCmdClearAttachments(layer_data *device_data, VkCommandBuffer if (0 == clear_desc->aspectMask) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_01c00c03, "IMAGE", " "); + HandleToUint64(commandBuffer), VALIDATION_ERROR_01c00c03, " "); } else if (clear_desc->aspectMask & VK_IMAGE_ASPECT_METADATA_BIT) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_01c00028, "IMAGE", " "); + HandleToUint64(commandBuffer), VALIDATION_ERROR_01c00028, " "); } else if (clear_desc->aspectMask & VK_IMAGE_ASPECT_COLOR_BIT) { if (clear_desc->colorAttachment >= subpass_desc->colorAttachmentCount) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1860001e, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1860001e, "vkCmdClearAttachments() color attachment index %d out of range for active subpass %d.", clear_desc->colorAttachment, cb_node->activeSubpass); } else if (subpass_desc->pColorAttachments[clear_desc->colorAttachment].attachment == VK_ATTACHMENT_UNUSED) { skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), - DRAWSTATE_MISSING_ATTACHMENT_REFERENCE, "DS", + DRAWSTATE_MISSING_ATTACHMENT_REFERENCE, "vkCmdClearAttachments() color attachment index %d is VK_ATTACHMENT_UNUSED; ignored.", clear_desc->colorAttachment); } else { @@ -2131,20 +2131,20 @@ bool PreCallValidateCmdClearAttachments(layer_data *device_data, VkCommandBuffer char const str[] = "vkCmdClearAttachments() aspectMask [%d] must set only VK_IMAGE_ASPECT_COLOR_BIT of a color attachment."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_01c00026, "IMAGE", str, i); + HandleToUint64(commandBuffer), VALIDATION_ERROR_01c00026, str, i); } } else { // Must be depth and/or stencil if (((clear_desc->aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT) != VK_IMAGE_ASPECT_DEPTH_BIT) && ((clear_desc->aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT) != VK_IMAGE_ASPECT_STENCIL_BIT)) { char const str[] = "vkCmdClearAttachments() aspectMask [%d] is not a valid combination of bits."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_01c00c01, "IMAGE", str, i); + HandleToUint64(commandBuffer), VALIDATION_ERROR_01c00c01, str, i); } if (!subpass_desc->pDepthStencilAttachment || (subpass_desc->pDepthStencilAttachment->attachment == VK_ATTACHMENT_UNUSED)) { skip |= log_msg( report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), DRAWSTATE_MISSING_ATTACHMENT_REFERENCE, "DS", + HandleToUint64(commandBuffer), DRAWSTATE_MISSING_ATTACHMENT_REFERENCE, "vkCmdClearAttachments() depth/stencil clear with no depth/stencil attachment in subpass; ignored"); } else { image_view = framebuffer->createInfo.pAttachments[subpass_desc->pDepthStencilAttachment->attachment]; @@ -2159,7 +2159,7 @@ bool PreCallValidateCmdClearAttachments(layer_data *device_data, VkCommandBuffer if (false == ContainsRect(cb_node->activeRenderPassBeginInfo.renderArea, pRects[j].rect)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_18600020, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_18600020, "vkCmdClearAttachments(): The area defined by pRects[%d] is not contained in the area of " "the current render pass instance.", j); @@ -2169,7 +2169,7 @@ bool PreCallValidateCmdClearAttachments(layer_data *device_data, VkCommandBuffer if (false == ContainsRect(prim_cb->activeRenderPassBeginInfo.renderArea, pRects[j].rect)) { return log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_18600020, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_18600020, "vkCmdClearAttachments(): The area defined by pRects[%d] is not contained in the area of " "the current render pass instance.", j); @@ -2183,7 +2183,7 @@ bool PreCallValidateCmdClearAttachments(layer_data *device_data, VkCommandBuffer if ((pRects[j].baseArrayLayer >= attachment_layer_count) || (pRects[j].baseArrayLayer + pRects[j].layerCount > attachment_layer_count)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_18600022, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_18600022, "vkCmdClearAttachments(): The layers defined in pRects[%d] are not contained in the layers " "of pAttachment[%d].", j, i); @@ -2213,17 +2213,17 @@ bool PreCallValidateCmdResolveImage(layer_data *device_data, GLOBAL_CB_NODE *cb_ if (pRegions[i].srcSubresource.layerCount == 0) { char const str[] = "vkCmdResolveImage: number of layers in source subresource is zero"; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_ASPECT, "IMAGE", str); + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_ASPECT, str); } if (pRegions[i].dstSubresource.layerCount == 0) { char const str[] = "vkCmdResolveImage: number of layers in destination subresource is zero"; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_ASPECT, "IMAGE", str); + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_ASPECT, str); } if (pRegions[i].srcSubresource.layerCount != pRegions[i].dstSubresource.layerCount) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_0a200216, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_0a200216, "vkCmdResolveImage: layerCount in source and destination subresource of pRegions[%d] does not match.", i); } if ((pRegions[i].srcSubresource.aspectMask != VK_IMAGE_ASPECT_COLOR_BIT) || @@ -2231,29 +2231,29 @@ bool PreCallValidateCmdResolveImage(layer_data *device_data, GLOBAL_CB_NODE *cb_ char const str[] = "vkCmdResolveImage: src and dest aspectMasks for each region must specify only VK_IMAGE_ASPECT_COLOR_BIT"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_0a200214, "IMAGE", "%s.", str); + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_0a200214, "%s.", str); } } if (src_image_state->createInfo.format != dst_image_state->createInfo.format) { char const str[] = "vkCmdResolveImage called with unmatched source and dest formats."; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_FORMAT, "IMAGE", str); + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_FORMAT, str); } if (src_image_state->createInfo.imageType != dst_image_state->createInfo.imageType) { char const str[] = "vkCmdResolveImage called with unmatched source and dest image types."; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_TYPE, "IMAGE", str); + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_TYPE, str); } if (src_image_state->createInfo.samples == VK_SAMPLE_COUNT_1_BIT) { char const str[] = "vkCmdResolveImage called with source sample count less than 2."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_1c800202, "IMAGE", "%s.", str); + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_1c800202, "%s.", str); } if (dst_image_state->createInfo.samples != VK_SAMPLE_COUNT_1_BIT) { char const str[] = "vkCmdResolveImage called with dest sample count greater than 1."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_1c800206, "IMAGE", "%s.", str); + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_1c800206, "%s.", str); } // TODO: Need to validate image layouts, which will include layout validation for shared presentable images } else { @@ -2314,7 +2314,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod VkFormatFeatureFlags flags = (tiling == VK_IMAGE_TILING_LINEAR ? props.linearTilingFeatures : props.optimalTilingFeatures); if (VK_FORMAT_FEATURE_BLIT_SRC_BIT != (flags & VK_FORMAT_FEATURE_BLIT_SRC_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001b4, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001b4, "vkCmdBlitImage: source image format %s does not support VK_FORMAT_FEATURE_BLIT_SRC_BIT feature.", string_VkFormat(src_format)); } @@ -2323,7 +2323,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod (VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT != (flags & VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001d6, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001d6, "vkCmdBlitImage: source image format %s does not support linear filtering.", string_VkFormat(src_format)); } @@ -2331,13 +2331,13 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod (flags & VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001d8, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001d8, "vkCmdBlitImage: source image format %s does not support cubic filtering.", string_VkFormat(src_format)); } if ((VK_FILTER_CUBIC_IMG == filter) && (VK_IMAGE_TYPE_3D != src_type)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001da, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001da, "vkCmdBlitImage: source image type must be VK_IMAGE_TYPE_3D when cubic filtering is specified."); } @@ -2346,7 +2346,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod flags = (tiling == VK_IMAGE_TILING_LINEAR ? props.linearTilingFeatures : props.optimalTilingFeatures); if (VK_FORMAT_FEATURE_BLIT_DST_BIT != (flags & VK_FORMAT_FEATURE_BLIT_DST_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001be, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001be, "vkCmdBlitImage: destination image format %s does not support VK_FORMAT_FEATURE_BLIT_DST_BIT feature.", string_VkFormat(dst_format)); } @@ -2354,7 +2354,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if ((VK_SAMPLE_COUNT_1_BIT != src_image_state->createInfo.samples) || (VK_SAMPLE_COUNT_1_BIT != dst_image_state->createInfo.samples)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001c8, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001c8, "vkCmdBlitImage: source or dest image has sample count other than VK_SAMPLE_COUNT_1_BIT."); } @@ -2365,7 +2365,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod << "the other one must also have unsigned integer format. " << "Source format is " << string_VkFormat(src_format) << " Destination format is " << string_VkFormat(dst_format); skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001cc, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001cc, "%s.", ss.str().c_str()); } // Validate consistency for signed formats @@ -2375,7 +2375,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod << "the other one must also have signed integer format. " << "Source format is " << string_VkFormat(src_format) << " Destination format is " << string_VkFormat(dst_format); skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001ca, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001ca, "%s.", ss.str().c_str()); } // Validate filter for Depth/Stencil formats @@ -2384,7 +2384,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod ss << "vkCmdBlitImage: If the format of srcImage is a depth, stencil, or depth stencil " << "then filter must be VK_FILTER_NEAREST."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001d0, "IMAGE", "%s.", ss.str().c_str()); + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001d0, "%s.", ss.str().c_str()); } // Validate aspect bits and formats for depth/stencil images @@ -2395,9 +2395,8 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod << "stencil, the other one must have exactly the same format. " << "Source format is " << string_VkFormat(src_format) << " Destination format is " << string_VkFormat(dst_format); - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001ce, "IMAGE", "%s.", ss.str().c_str()); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001ce, "%s.", ss.str().c_str()); } #if 0 // TODO: Cannot find VU statements or spec language for these in CmdBlitImage. Verify or remove. @@ -2410,7 +2409,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod ss << "vkCmdBlitImage: Combination depth/stencil image formats must have only one of VK_IMAGE_ASPECT_DEPTH_BIT " << "and VK_IMAGE_ASPECT_STENCIL_BIT set in srcImage and dstImage"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "%s", ss.str().c_str()); } } @@ -2420,7 +2419,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod ss << "vkCmdBlitImage: Stencil-only image formats must have only the VK_IMAGE_ASPECT_STENCIL_BIT " << "set in both the srcImage and dstImage"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "%s", ss.str().c_str()); } } @@ -2430,7 +2429,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod ss << "vkCmdBlitImage: Depth-only image formats must have only the VK_IMAGE_ASPECT_DEPTH " << "set in both the srcImage and dstImage"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_IMAGE_ASPECT, "%s", ss.str().c_str()); } } @@ -2455,43 +2454,43 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod std::stringstream ss; ss << "vkCmdBlitImage: pRegions[" << i << "].srcOffsets specify a zero-volume area."; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_EXTENTS, "IMAGE", "%s", ss.str().c_str()); + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_EXTENTS, "%s", ss.str().c_str()); } if ((rgn.dstOffsets[0].x == rgn.dstOffsets[1].x) || (rgn.dstOffsets[0].y == rgn.dstOffsets[1].y) || (rgn.dstOffsets[0].z == rgn.dstOffsets[1].z)) { std::stringstream ss; ss << "vkCmdBlitImage: pRegions[" << i << "].dstOffsets specify a zero-volume area."; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_EXTENTS, "IMAGE", "%s", ss.str().c_str()); + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_EXTENTS, "%s", ss.str().c_str()); } if (rgn.srcSubresource.layerCount == 0) { char const str[] = "vkCmdBlitImage: number of layers in source subresource is zero"; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_ASPECT, "IMAGE", str); + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_ASPECT, str); } if (rgn.dstSubresource.layerCount == 0) { char const str[] = "vkCmdBlitImage: number of layers in destination subresource is zero"; skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_ASPECT, "IMAGE", str); + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_MISMATCHED_IMAGE_ASPECT, str); } // Check that src/dst layercounts match if (rgn.srcSubresource.layerCount != rgn.dstSubresource.layerCount) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001de, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001de, "vkCmdBlitImage: layerCount in source and destination subresource of pRegions[%d] does not match.", i); } if (rgn.srcSubresource.aspectMask != rgn.dstSubresource.aspectMask) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001dc, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001dc, "vkCmdBlitImage: aspectMask members for pRegion[%d] do not match.", i); } if (!VerifyAspectsPresent(rgn.srcSubresource.aspectMask, src_format)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e2, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e2, "vkCmdBlitImage: region [%d] source aspectMask (0x%x) specifies aspects not present in source " "image format %s.", i, rgn.srcSubresource.aspectMask, string_VkFormat(src_format)); @@ -2500,7 +2499,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if (!VerifyAspectsPresent(rgn.dstSubresource.aspectMask, dst_format)) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e4, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e4, "vkCmdBlitImage: region [%d] dest aspectMask (0x%x) specifies aspects not present in dest image format %s.", i, rgn.dstSubresource.aspectMask, string_VkFormat(dst_format)); } @@ -2510,7 +2509,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if (VK_IMAGE_TYPE_1D == src_type) { if ((0 != rgn.srcOffsets[0].y) || (1 != rgn.srcOffsets[1].y)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001ea, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001ea, "vkCmdBlitImage: region [%d], source image of type VK_IMAGE_TYPE_1D with srcOffset[].y values " "of (%1d, %1d). These must be (0, 1).", i, rgn.srcOffsets[0].y, rgn.srcOffsets[1].y); @@ -2520,7 +2519,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if ((VK_IMAGE_TYPE_1D == src_type) || (VK_IMAGE_TYPE_2D == src_type)) { if ((0 != rgn.srcOffsets[0].z) || (1 != rgn.srcOffsets[1].z)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001ee, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001ee, "vkCmdBlitImage: region [%d], source image of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D with " "srcOffset[].z values of (%1d, %1d). These must be (0, 1).", i, rgn.srcOffsets[0].z, rgn.srcOffsets[1].z); @@ -2533,7 +2532,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod oob = true; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e6, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e6, "vkCmdBlitImage: region [%d] srcOffset[].x values (%1d, %1d) exceed srcSubresource width extent (%1d).", i, rgn.srcOffsets[0].x, rgn.srcOffsets[1].x, src_extent.width); } @@ -2542,7 +2541,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod oob = true; skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e8, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e8, "vkCmdBlitImage: region [%d] srcOffset[].y values (%1d, %1d) exceed srcSubresource height extent (%1d).", i, rgn.srcOffsets[0].y, rgn.srcOffsets[1].y, src_extent.height); } @@ -2551,18 +2550,18 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod oob = true; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001ec, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001ec, "vkCmdBlitImage: region [%d] srcOffset[].z values (%1d, %1d) exceed srcSubresource depth extent (%1d).", i, rgn.srcOffsets[0].z, rgn.srcOffsets[1].z, src_extent.depth); } if (rgn.srcSubresource.mipLevel >= src_image_state->createInfo.mipLevels) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001ae, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001ae, "vkCmdBlitImage: region [%d] source image, attempt to access a non-existant mip level %1d.", i, rgn.srcSubresource.mipLevel); } else if (oob) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001ae, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001ae, "vkCmdBlitImage: region [%d] source image blit region exceeds image dimensions.", i); } @@ -2571,7 +2570,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if (VK_IMAGE_TYPE_1D == dst_type) { if ((0 != rgn.dstOffsets[0].y) || (1 != rgn.dstOffsets[1].y)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f4, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f4, "vkCmdBlitImage: region [%d], dest image of type VK_IMAGE_TYPE_1D with dstOffset[].y values of " "(%1d, %1d). These must be (0, 1).", i, rgn.dstOffsets[0].y, rgn.dstOffsets[1].y); @@ -2581,7 +2580,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if ((VK_IMAGE_TYPE_1D == dst_type) || (VK_IMAGE_TYPE_2D == dst_type)) { if ((0 != rgn.dstOffsets[0].z) || (1 != rgn.dstOffsets[1].z)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f8, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f8, "vkCmdBlitImage: region [%d], dest image of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D with " "dstOffset[].z values of (%1d, %1d). These must be (0, 1).", i, rgn.dstOffsets[0].z, rgn.dstOffsets[1].z); @@ -2594,7 +2593,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod oob = true; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f0, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f0, "vkCmdBlitImage: region [%d] dstOffset[].x values (%1d, %1d) exceed dstSubresource width extent (%1d).", i, rgn.dstOffsets[0].x, rgn.dstOffsets[1].x, dst_extent.width); } @@ -2603,7 +2602,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod oob = true; skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f2, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f2, "vkCmdBlitImage: region [%d] dstOffset[].y values (%1d, %1d) exceed dstSubresource height extent (%1d).", i, rgn.dstOffsets[0].y, rgn.dstOffsets[1].y, dst_extent.height); } @@ -2612,18 +2611,18 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod oob = true; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f6, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001f6, "vkCmdBlitImage: region [%d] dstOffset[].z values (%1d, %1d) exceed dstSubresource depth extent (%1d).", i, rgn.dstOffsets[0].z, rgn.dstOffsets[1].z, dst_extent.depth); } if (rgn.dstSubresource.mipLevel >= dst_image_state->createInfo.mipLevels) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001b0, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001b0, "vkCmdBlitImage: region [%d] destination image, attempt to access a non-existant mip level %1d.", i, rgn.dstSubresource.mipLevel); } else if (oob) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001b0, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_184001b0, "vkCmdBlitImage: region [%d] destination image blit region exceeds image dimensions.", i); } @@ -2631,7 +2630,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if ((0 != rgn.srcSubresource.baseArrayLayer) || (1 != rgn.srcSubresource.layerCount) || (0 != rgn.dstSubresource.baseArrayLayer) || (1 != rgn.dstSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e0, "IMAGE", + HandleToUint64(cb_node->commandBuffer), VALIDATION_ERROR_09a001e0, "vkCmdBlitImage: region [%d] blit to/from a 3D image type with a non-zero baseArrayLayer, or a " "layerCount other than 1.", i); @@ -2684,7 +2683,7 @@ bool ValidateCmdBufImageLayouts(layer_data *device_data, GLOBAL_CB_NODE *pCB, if (cb_image_data.first.hasSubresource) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_IMAGE_LAYOUT, "Cannot submit cmd buffer using image (0x%" PRIx64 ") [sub-resource: aspectMask 0x%X array layer %u, mip level %u], with layout %s when first use is %s.", HandleToUint64(cb_image_data.first.image), cb_image_data.first.subresource.aspectMask, @@ -2692,7 +2691,7 @@ bool ValidateCmdBufImageLayouts(layer_data *device_data, GLOBAL_CB_NODE *pCB, string_VkImageLayout(imageLayout), string_VkImageLayout(cb_image_data.second.initialLayout)); } else { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_IMAGE_LAYOUT, "Cannot submit cmd buffer using image (0x%" PRIx64 ") with layout %s when first use is %s.", HandleToUint64(cb_image_data.first.image), string_VkImageLayout(imageLayout), string_VkImageLayout(cb_image_data.second.initialLayout)); @@ -2745,14 +2744,14 @@ static bool ValidateMaskBits(core_validation::layer_data *device_data, VkCommand if (accessMask & ~(required_bit | optional_bits)) { // TODO: Verify against Valid Use skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cmdBuffer), DRAWSTATE_INVALID_BARRIER, "DS", + HandleToUint64(cmdBuffer), DRAWSTATE_INVALID_BARRIER, "Additional bits in %s accessMask 0x%X %s are specified when layout is %s.", type, accessMask, string_VkAccessFlags(accessMask).c_str(), string_VkImageLayout(layout)); } } else { if (!required_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cmdBuffer), DRAWSTATE_INVALID_BARRIER, "DS", + HandleToUint64(cmdBuffer), DRAWSTATE_INVALID_BARRIER, "%s AccessMask %d %s must contain at least one of access bits %d %s when layout is %s, unless the app " "has previously added a barrier for this transition.", type, accessMask, string_VkAccessFlags(accessMask).c_str(), optional_bits, @@ -2765,7 +2764,7 @@ static bool ValidateMaskBits(core_validation::layer_data *device_data, VkCommand opt_bits = "and may have optional bits " + ss.str() + ' ' + string_VkAccessFlags(optional_bits); } skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cmdBuffer), DRAWSTATE_INVALID_BARRIER, "DS", + HandleToUint64(cmdBuffer), DRAWSTATE_INVALID_BARRIER, "%s AccessMask %d %s must have required access bit %d %s %s when layout is %s, unless the app has " "previously added a barrier for this transition.", type, accessMask, string_VkAccessFlags(accessMask).c_str(), required_bit, @@ -2786,7 +2785,7 @@ bool ValidateLayoutVsAttachmentDescription(const debug_report_data *report_data, if ((first_layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL) || (first_layout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_12200688, "DS", "Cannot clear attachment %d with invalid first layout %s.", attachment, + VALIDATION_ERROR_12200688, "Cannot clear attachment %d with invalid first layout %s.", attachment, string_VkImageLayout(first_layout)); } } @@ -2803,7 +2802,7 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, if ((FormatIsColor(format) || FormatHasDepth(format)) && pCreateInfo->pAttachments[i].loadOp == VK_ATTACHMENT_LOAD_OP_LOAD) { skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_RENDERPASS, "DS", + DRAWSTATE_INVALID_RENDERPASS, "Render pass has an attachment with loadOp == VK_ATTACHMENT_LOAD_OP_LOAD and initialLayout == " "VK_IMAGE_LAYOUT_UNDEFINED. This is probably not what you intended. Consider using " "VK_ATTACHMENT_LOAD_OP_DONT_CARE instead if the image truely is undefined at the start of the " @@ -2811,7 +2810,7 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, } if (FormatHasStencil(format) && pCreateInfo->pAttachments[i].stencilLoadOp == VK_ATTACHMENT_LOAD_OP_LOAD) { skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_RENDERPASS, "DS", + DRAWSTATE_INVALID_RENDERPASS, "Render pass has an attachment with stencilLoadOp == VK_ATTACHMENT_LOAD_OP_LOAD and initialLayout " "== VK_IMAGE_LAYOUT_UNDEFINED. This is probably not what you intended. Consider using " "VK_ATTACHMENT_LOAD_OP_DONT_CARE instead if the image truely is undefined at the start of the " @@ -2839,14 +2838,14 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, case VK_IMAGE_LAYOUT_GENERAL: // May not be optimal. TODO: reconsider this warning based on other constraints. skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DRAWSTATE_INVALID_IMAGE_LAYOUT, "Layout for input attachment is GENERAL but should be READ_ONLY_OPTIMAL."); break; default: // No other layouts are acceptable skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + DRAWSTATE_INVALID_IMAGE_LAYOUT, "Layout for input attachment is %s but can only be READ_ONLY_OPTIMAL or GENERAL.", string_VkImageLayout(subpass.pInputAttachments[j].layout)); } @@ -2861,7 +2860,7 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, } if (found_layout_mismatch) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_140006ae, "DS", + VALIDATION_ERROR_140006ae, "CreateRenderPass: Subpass %u pInputAttachments[%u] (%u) has layout %u, but is also used as a " "depth/color attachment with a different layout.", i, j, attach_index, layout); @@ -2881,7 +2880,7 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, pCreateInfo->pAttachments[attach_index].loadOp == VK_ATTACHMENT_LOAD_OP_CLEAR) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1400069c, "DS", + VALIDATION_ERROR_1400069c, "CreateRenderPass: attachment %u is first used as an input attachment in subpass %u with loadOp=CLEAR.", attach_index, attach_index); } @@ -2905,13 +2904,13 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, case VK_IMAGE_LAYOUT_GENERAL: // May not be optimal; TODO: reconsider this warning based on other constraints? skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DRAWSTATE_INVALID_IMAGE_LAYOUT, "Layout for color attachment is GENERAL but should be COLOR_ATTACHMENT_OPTIMAL."); break; default: skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + DRAWSTATE_INVALID_IMAGE_LAYOUT, "Layout for color attachment is %s but can only be COLOR_ATTACHMENT_OPTIMAL or GENERAL.", string_VkImageLayout(subpass.pColorAttachments[j].layout)); } @@ -2934,7 +2933,7 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, // May not be optimal; TODO: reconsider this warning based on other constraints? GENERAL can be better than // doing a bunch of transitions. skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DRAWSTATE_INVALID_IMAGE_LAYOUT, "GENERAL layout for depth attachment may not give optimal performance."); break; @@ -2949,7 +2948,7 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, default: // No other layouts are acceptable skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + DRAWSTATE_INVALID_IMAGE_LAYOUT, "Layout for depth attachment is %s but can only be DEPTH_STENCIL_ATTACHMENT_OPTIMAL, " "DEPTH_STENCIL_READ_ONLY_OPTIMAL or GENERAL.", string_VkImageLayout(subpass.pDepthStencilAttachment->layout)); @@ -2984,7 +2983,7 @@ bool ValidateMapImageLayouts(core_validation::layer_data *device_data, VkDevice if (layout != VK_IMAGE_LAYOUT_PREINITIALIZED && layout != VK_IMAGE_LAYOUT_GENERAL) { skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem_info->mem), DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + HandleToUint64(mem_info->mem), DRAWSTATE_INVALID_IMAGE_LAYOUT, "Mapping an image with layout %s can result in undefined behavior if this memory is used " "by the device. Only GENERAL or PREINITIALIZED should be used.", string_VkImageLayout(layout)); @@ -3016,12 +3015,12 @@ static bool validate_usage_flags(layer_data *device_data, VkFlags actual, VkFlag // TODO: Fix callers with msgCode == -1 to use correct validation checks. skip = log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[obj_type], obj_handle, - MEMTRACK_INVALID_USAGE_FLAG, "MEM", + MEMTRACK_INVALID_USAGE_FLAG, "Invalid usage flag for %s 0x%" PRIx64 " used by %s. In this case, %s should have %s set during creation.", type_str, obj_handle, func_name, type_str, usage_str); } else { skip = - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[obj_type], obj_handle, msgCode, "MEM", + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[obj_type], obj_handle, msgCode, "Invalid usage flag for %s 0x%" PRIx64 " used by %s. In this case, %s should have %s set during creation.", type_str, obj_handle, func_name, type_str, usage_str); } @@ -3053,21 +3052,21 @@ bool PreCallValidateCreateBuffer(layer_data *device_data, const VkBufferCreateIn if ((pCreateInfo->flags & VK_BUFFER_CREATE_SPARSE_BINDING_BIT) && (!GetEnabledFeatures(device_data)->sparseBinding)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_01400726, "DS", + VALIDATION_ERROR_01400726, "vkCreateBuffer(): the sparseBinding device feature is disabled: Buffers cannot be created with the " "VK_BUFFER_CREATE_SPARSE_BINDING_BIT set."); } if ((pCreateInfo->flags & VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT) && (!GetEnabledFeatures(device_data)->sparseResidencyBuffer)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_01400728, "DS", + VALIDATION_ERROR_01400728, "vkCreateBuffer(): the sparseResidencyBuffer device feature is disabled: Buffers cannot be created with " "the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT set."); } if ((pCreateInfo->flags & VK_BUFFER_CREATE_SPARSE_ALIASED_BIT) && (!GetEnabledFeatures(device_data)->sparseResidencyAliased)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0140072a, "DS", + VALIDATION_ERROR_0140072a, "vkCreateBuffer(): the sparseResidencyAliased device feature is disabled: Buffers cannot be created with " "the VK_BUFFER_CREATE_SPARSE_ALIASED_BIT set."); } @@ -3107,23 +3106,23 @@ bool ValidateImageAspectMask(layer_data *device_data, VkImage image, VkFormat fo if (FormatIsColor(format)) { if ((aspect_mask & VK_IMAGE_ASPECT_COLOR_BIT) != VK_IMAGE_ASPECT_COLOR_BIT) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_0a400c01, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_0a400c01, "%s: Color image formats must have the VK_IMAGE_ASPECT_COLOR_BIT set.", func_name); } else if ((aspect_mask & VK_IMAGE_ASPECT_COLOR_BIT) != aspect_mask) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_0a400c01, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_0a400c01, "%s: Color image formats must have ONLY the VK_IMAGE_ASPECT_COLOR_BIT set.", func_name); } } else if (FormatIsDepthAndStencil(format)) { if ((aspect_mask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) == 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_0a400c01, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_0a400c01, "%s: Depth/stencil image formats must have at least one of VK_IMAGE_ASPECT_DEPTH_BIT and " "VK_IMAGE_ASPECT_STENCIL_BIT set.", func_name); } else if ((aspect_mask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) != aspect_mask) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_0a400c01, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_0a400c01, "%s: Combination depth/stencil image formats can have only the VK_IMAGE_ASPECT_DEPTH_BIT and " "VK_IMAGE_ASPECT_STENCIL_BIT set.", func_name); @@ -3131,21 +3130,21 @@ bool ValidateImageAspectMask(layer_data *device_data, VkImage image, VkFormat fo } else if (FormatIsDepthOnly(format)) { if ((aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) != VK_IMAGE_ASPECT_DEPTH_BIT) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_0a400c01, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_0a400c01, "%s: Depth-only image formats must have the VK_IMAGE_ASPECT_DEPTH_BIT set.", func_name); } else if ((aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) != aspect_mask) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_0a400c01, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_0a400c01, "%s: Depth-only image formats can have only the VK_IMAGE_ASPECT_DEPTH_BIT set.", func_name); } } else if (FormatIsStencilOnly(format)) { if ((aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) != VK_IMAGE_ASPECT_STENCIL_BIT) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_0a400c01, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_0a400c01, "%s: Stencil-only image formats must have the VK_IMAGE_ASPECT_STENCIL_BIT set.", func_name); } else if ((aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) != aspect_mask) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_0a400c01, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_0a400c01, "%s: Stencil-only image formats can have only the VK_IMAGE_ASPECT_STENCIL_BIT set.", func_name); } } @@ -3166,7 +3165,7 @@ bool ValidateImageSubresourceRange(const layer_data *device_data, const uint32_t // Validate mip levels if (subresourceRange.baseMipLevel >= image_mip_count) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, image_handle, - errorCodes.base_mip_err, "IMAGE", + errorCodes.base_mip_err, "%s: %s.baseMipLevel (= %" PRIu32 ") is greater or equal to the mip level count of the image (i.e. greater or equal to %" PRIu32 ").", cmd_name, param_name, subresourceRange.baseMipLevel, image_mip_count); @@ -3175,13 +3174,13 @@ bool ValidateImageSubresourceRange(const layer_data *device_data, const uint32_t if (subresourceRange.levelCount != VK_REMAINING_MIP_LEVELS) { if (subresourceRange.levelCount == 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, image_handle, - errorCodes.mip_count_err, "IMAGE", "%s: %s.levelCount is 0.", cmd_name, param_name); + errorCodes.mip_count_err, "%s: %s.levelCount is 0.", cmd_name, param_name); } else { const uint64_t necessary_mip_count = uint64_t{subresourceRange.baseMipLevel} + uint64_t{subresourceRange.levelCount}; if (necessary_mip_count > image_mip_count) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, image_handle, - errorCodes.mip_count_err, "IMAGE", + errorCodes.mip_count_err, "%s: %s.baseMipLevel + .levelCount (= %" PRIu32 " + %" PRIu32 " = %" PRIu64 ") is greater than the mip level count of the image (i.e. greater than %" PRIu32 ").", cmd_name, param_name, subresourceRange.baseMipLevel, subresourceRange.levelCount, @@ -3193,7 +3192,7 @@ bool ValidateImageSubresourceRange(const layer_data *device_data, const uint32_t // Validate array layers if (subresourceRange.baseArrayLayer >= image_layer_count) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, image_handle, - errorCodes.base_layer_err, "IMAGE", + errorCodes.base_layer_err, "%s: %s.baseArrayLayer (= %" PRIu32 ") is greater or equal to the %s of the image when it was created (i.e. greater or equal to %" PRIu32 ").", cmd_name, param_name, subresourceRange.baseArrayLayer, image_layer_count_var_name, image_layer_count); @@ -3202,14 +3201,14 @@ bool ValidateImageSubresourceRange(const layer_data *device_data, const uint32_t if (subresourceRange.layerCount != VK_REMAINING_ARRAY_LAYERS) { if (subresourceRange.layerCount == 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, image_handle, - errorCodes.layer_count_err, "IMAGE", "%s: %s.layerCount is 0.", cmd_name, param_name); + errorCodes.layer_count_err, "%s: %s.layerCount is 0.", cmd_name, param_name); } else { const uint64_t necessary_layer_count = uint64_t{subresourceRange.baseArrayLayer} + uint64_t{subresourceRange.layerCount}; if (necessary_layer_count > image_layer_count) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, image_handle, - errorCodes.layer_count_err, "IMAGE", + errorCodes.layer_count_err, "%s: %s.baseArrayLayer + .layerCount (= %" PRIu32 " + %" PRIu32 " = %" PRIu64 ") is greater than the %s of the image when it was created (i.e. greater than %" PRIu32 ").", cmd_name, param_name, subresourceRange.baseArrayLayer, subresourceRange.layerCount, @@ -3325,7 +3324,7 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr << ". Images created with the VK_IMAGE_CREATE_MUTABLE_FORMAT BIT " << "can support ImageViews with differing formats but they must be in the same compatibility class."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0ac007f4, "IMAGE", "%s", ss.str().c_str()); + VALIDATION_ERROR_0ac007f4, "%s", ss.str().c_str()); } } } else { @@ -3336,7 +3335,7 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr << HandleToUint64(create_info->image) << " format " << string_VkFormat(image_format) << ". Formats MUST be IDENTICAL unless VK_IMAGE_CREATE_MUTABLE_FORMAT BIT was set on image creation."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0ac007f6, "IMAGE", "%s", ss.str().c_str()); + VALIDATION_ERROR_0ac007f6, "%s", ss.str().c_str()); } } @@ -3347,7 +3346,7 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr case VK_IMAGE_TYPE_1D: if (view_type != VK_IMAGE_VIEW_TYPE_1D && view_type != VK_IMAGE_VIEW_TYPE_1D_ARRAY) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0ac007fa, "IMAGE", + VALIDATION_ERROR_0ac007fa, "vkCreateImageView(): pCreateInfo->viewType %s is not compatible with image type %s.", string_VkImageViewType(view_type), string_VkImageType(image_type)); } @@ -3357,12 +3356,12 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr if ((view_type == VK_IMAGE_VIEW_TYPE_CUBE || view_type == VK_IMAGE_VIEW_TYPE_CUBE_ARRAY) && !(image_flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0ac007d6, "IMAGE", + VALIDATION_ERROR_0ac007d6, "vkCreateImageView(): pCreateInfo->viewType %s is not compatible with image type %s.", string_VkImageViewType(view_type), string_VkImageType(image_type)); } else if (view_type != VK_IMAGE_VIEW_TYPE_CUBE && view_type != VK_IMAGE_VIEW_TYPE_CUBE_ARRAY) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0ac007fa, "IMAGE", + VALIDATION_ERROR_0ac007fa, "vkCreateImageView(): pCreateInfo->viewType %s is not compatible with image type %s.", string_VkImageViewType(view_type), string_VkImageType(image_type)); } @@ -3375,14 +3374,14 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr if (!(image_flags & VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0ac007da, "IMAGE", + VALIDATION_ERROR_0ac007da, "vkCreateImageView(): pCreateInfo->viewType %s is not compatible with image type %s.", string_VkImageViewType(view_type), string_VkImageType(image_type)); } else if ((image_flags & (VK_IMAGE_CREATE_SPARSE_BINDING_BIT | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT | VK_IMAGE_CREATE_SPARSE_ALIASED_BIT))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0ac007fa, "IMAGE", + VALIDATION_ERROR_0ac007fa, "vkCreateImageView(): pCreateInfo->viewType %s is not compatible with image type %s " "when the VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or " "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT flags are enabled.", @@ -3390,7 +3389,7 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr } } else { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0ac007fa, "IMAGE", + VALIDATION_ERROR_0ac007fa, "vkCreateImageView(): pCreateInfo->viewType %s is not compatible with image type %s.", string_VkImageViewType(view_type), string_VkImageType(image_type)); } @@ -3398,7 +3397,7 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr } else { if (view_type != VK_IMAGE_VIEW_TYPE_3D) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0ac007fa, "IMAGE", + VALIDATION_ERROR_0ac007fa, "vkCreateImageView(): pCreateInfo->viewType %s is not compatible with image type %s.", string_VkImageViewType(view_type), string_VkImageType(image_type)); } @@ -3432,36 +3431,36 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr if (check_tiling_features) { if (tiling_features == 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - error_codes[0], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s flag set.", - string_VkFormat(view_format), string_VkImageTiling(image_tiling)); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, error_codes[0], + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s flag set.", + string_VkFormat(view_format), string_VkImageTiling(image_tiling)); } else if ((image_usage & VK_IMAGE_USAGE_SAMPLED_BIT) && !(tiling_features & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - error_codes[1], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " - "VK_IMAGE_USAGE_SAMPLED_BIT flags set.", - string_VkFormat(view_format), string_VkImageTiling(image_tiling)); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, error_codes[1], + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " + "VK_IMAGE_USAGE_SAMPLED_BIT flags set.", + string_VkFormat(view_format), string_VkImageTiling(image_tiling)); } else if ((image_usage & VK_IMAGE_USAGE_STORAGE_BIT) && !(tiling_features & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - error_codes[2], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " - "VK_IMAGE_USAGE_STORAGE_BIT flags set.", - string_VkFormat(view_format), string_VkImageTiling(image_tiling)); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, error_codes[2], + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " + "VK_IMAGE_USAGE_STORAGE_BIT flags set.", + string_VkFormat(view_format), string_VkImageTiling(image_tiling)); } else if ((image_usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) && !(tiling_features & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - error_codes[3], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " - "VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT flags set.", - string_VkFormat(view_format), string_VkImageTiling(image_tiling)); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, error_codes[3], + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " + "VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT flags set.", + string_VkFormat(view_format), string_VkImageTiling(image_tiling)); } else if ((image_usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) && !(tiling_features & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - error_codes[4], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " - "VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT flags set.", - string_VkFormat(view_format), string_VkImageTiling(image_tiling)); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, error_codes[4], + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " + "VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT flags set.", + string_VkFormat(view_format), string_VkImageTiling(image_tiling)); } } } @@ -3518,12 +3517,12 @@ static bool validateIdleBuffer(layer_data *device_data, VkBuffer buffer) { auto buffer_state = GetBufferState(device_data, buffer); if (!buffer_state) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, HandleToUint64(buffer), - DRAWSTATE_DOUBLE_DESTROY, "DS", "Cannot free buffer 0x%" PRIx64 " that has not been allocated.", + DRAWSTATE_DOUBLE_DESTROY, "Cannot free buffer 0x%" PRIx64 " that has not been allocated.", HandleToUint64(buffer)); } else { if (buffer_state->in_use.load()) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - HandleToUint64(buffer), VALIDATION_ERROR_23c00734, "DS", + HandleToUint64(buffer), VALIDATION_ERROR_23c00734, "Cannot free buffer 0x%" PRIx64 " that is in use by a command buffer.", HandleToUint64(buffer)); } } @@ -3624,7 +3623,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if (image_state->createInfo.imageType == VK_IMAGE_TYPE_1D) { if ((pRegions[i].imageOffset.y != 0) || (pRegions[i].imageExtent.height != 1)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_0160018e, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_0160018e, "%s(): pRegion[%d] imageOffset.y is %d and imageExtent.height is %d. For 1D images these must be 0 " "and 1, respectively.", function, i, pRegions[i].imageOffset.y, pRegions[i].imageExtent.height); @@ -3634,7 +3633,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if ((image_state->createInfo.imageType == VK_IMAGE_TYPE_1D) || (image_state->createInfo.imageType == VK_IMAGE_TYPE_2D)) { if ((pRegions[i].imageOffset.z != 0) || (pRegions[i].imageExtent.depth != 1)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_01600192, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_01600192, "%s(): pRegion[%d] imageOffset.z is %d and imageExtent.depth is %d. For 1D and 2D images these " "must be 0 and 1, respectively.", function, i, pRegions[i].imageOffset.z, pRegions[i].imageExtent.depth); @@ -3644,7 +3643,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if (image_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { if ((0 != pRegions[i].imageSubresource.baseArrayLayer) || (1 != pRegions[i].imageSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_016001aa, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_016001aa, "%s(): pRegion[%d] imageSubresource.baseArrayLayer is %d and imageSubresource.layerCount is %d. " "For 3D images these must be 0 and 1, respectively.", function, i, pRegions[i].imageSubresource.baseArrayLayer, pRegions[i].imageSubresource.layerCount); @@ -3656,7 +3655,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t auto texel_size = FormatSize(image_state->createInfo.format); if (!FormatIsDepthAndStencil(image_state->createInfo.format) && SafeModulo(pRegions[i].bufferOffset, texel_size) != 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_01600182, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_01600182, "%s(): pRegion[%d] bufferOffset 0x%" PRIxLEAST64 " must be a multiple of this format's texel size (" PRINTF_SIZE_T_SPECIFIER ").", function, i, pRegions[i].bufferOffset, texel_size); @@ -3665,7 +3664,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t // BufferOffset must be a multiple of 4 if (SafeModulo(pRegions[i].bufferOffset, 4) != 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_01600184, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_01600184, "%s(): pRegion[%d] bufferOffset 0x%" PRIxLEAST64 " must be a multiple of 4.", function, i, pRegions[i].bufferOffset); } @@ -3674,7 +3673,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if ((pRegions[i].bufferRowLength != 0) && (pRegions[i].bufferRowLength < pRegions[i].imageExtent.width)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_01600186, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_01600186, "%s(): pRegion[%d] bufferRowLength (%d) must be zero or greater-than-or-equal-to imageExtent.width (%d).", function, i, pRegions[i].bufferRowLength, pRegions[i].imageExtent.width); } @@ -3683,7 +3682,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if ((pRegions[i].bufferImageHeight != 0) && (pRegions[i].bufferImageHeight < pRegions[i].imageExtent.height)) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_01600188, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_01600188, "%s(): pRegion[%d] bufferImageHeight (%d) must be zero or greater-than-or-equal-to imageExtent.height (%d).", function, i, pRegions[i].bufferImageHeight, pRegions[i].imageExtent.height); } @@ -3693,7 +3692,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t std::bitset<num_bits> aspect_mask_bits(pRegions[i].imageSubresource.aspectMask); if (aspect_mask_bits.count() != 1) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_016001a8, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_016001a8, "%s: aspectMasks for imageSubresource in each region must have only a single bit set.", function); } @@ -3701,7 +3700,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if (!VerifyAspectsPresent(pRegions[i].imageSubresource.aspectMask, image_state->createInfo.format)) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_016001a6, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_016001a6, "%s(): pRegion[%d] subresource aspectMask 0x%x specifies aspects that are not present in image format 0x%x.", function, i, pRegions[i].imageSubresource.aspectMask, image_state->createInfo.format); } @@ -3717,7 +3716,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if (SafeModulo(pRegions[i].bufferRowLength, block_size.width) != 0) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_01600196, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_01600196, "%s(): pRegion[%d] bufferRowLength (%d) must be a multiple of the compressed image's texel width (%d)..", function, i, pRegions[i].bufferRowLength, block_size.width); } @@ -3726,7 +3725,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if (SafeModulo(pRegions[i].bufferImageHeight, block_size.height) != 0) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_01600198, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_01600198, "%s(): pRegion[%d] bufferImageHeight (%d) must be a multiple of the compressed image's texel height (%d)..", function, i, pRegions[i].bufferImageHeight, block_size.height); } @@ -3737,7 +3736,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t (SafeModulo(pRegions[i].imageOffset.z, block_size.depth) != 0)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_0160019a, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_0160019a, "%s(): pRegion[%d] imageOffset(x,y) (%d, %d) must be multiples of the compressed image's texel " "width & height (%d, %d)..", function, i, pRegions[i].imageOffset.x, pRegions[i].imageOffset.y, block_size.width, block_size.height); @@ -3747,7 +3746,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t size_t block_size_in_bytes = FormatSize(image_state->createInfo.format); if (SafeModulo(pRegions[i].bufferOffset, block_size_in_bytes) != 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_0160019c, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_0160019c, "%s(): pRegion[%d] bufferOffset (0x%" PRIxLEAST64 ") must be a multiple of the compressed image's texel block size (" PRINTF_SIZE_T_SPECIFIER ")..", function, i, pRegions[i].bufferOffset, block_size_in_bytes); @@ -3758,7 +3757,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if ((SafeModulo(pRegions[i].imageExtent.width, block_size.width) != 0) && (pRegions[i].imageExtent.width + pRegions[i].imageOffset.x != mip_extent.width)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_0160019e, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_0160019e, "%s(): pRegion[%d] extent width (%d) must be a multiple of the compressed texture block width " "(%d), or when added to offset.x (%d) must equal the image subresource width (%d)..", function, i, pRegions[i].imageExtent.width, block_size.width, pRegions[i].imageOffset.x, @@ -3769,7 +3768,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if ((SafeModulo(pRegions[i].imageExtent.height, block_size.height) != 0) && (pRegions[i].imageExtent.height + pRegions[i].imageOffset.y != mip_extent.height)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_016001a0, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_016001a0, "%s(): pRegion[%d] extent height (%d) must be a multiple of the compressed texture block height " "(%d), or when added to offset.y (%d) must equal the image subresource height (%d)..", function, i, pRegions[i].imageExtent.height, block_size.height, pRegions[i].imageOffset.y, @@ -3780,7 +3779,7 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if ((SafeModulo(pRegions[i].imageExtent.depth, block_size.depth) != 0) && (pRegions[i].imageExtent.depth + pRegions[i].imageOffset.z != mip_extent.depth)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), VALIDATION_ERROR_016001a2, "IMAGE", + HandleToUint64(image_state->image), VALIDATION_ERROR_016001a2, "%s(): pRegion[%d] extent width (%d) must be a multiple of the compressed texture block depth " "(%d), or when added to offset.z (%d) must equal the image subresource depth (%d)..", function, i, pRegions[i].imageExtent.depth, block_size.depth, pRegions[i].imageOffset.z, @@ -3803,10 +3802,9 @@ static bool ValidateImageBounds(const debug_report_data *report_data, const IMAG if (IsExtentSizeZero(&extent)) // Warn on zero area subresource { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, (uint64_t)0, - IMAGE_ZERO_AREA_SUBREGION, "IMAGE", "%s: pRegion[%d] imageExtent of {%1d, %1d, %1d} has zero area", - func_name, i, extent.width, extent.height, extent.depth); + skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + (uint64_t)0, IMAGE_ZERO_AREA_SUBREGION, "%s: pRegion[%d] imageExtent of {%1d, %1d, %1d} has zero area", + func_name, i, extent.width, extent.height, extent.depth); } VkExtent3D image_extent = GetImageSubresourceExtent(image_state, &(pRegions[i].imageSubresource)); @@ -3827,7 +3825,7 @@ static bool ValidateImageBounds(const debug_report_data *report_data, const IMAG if (0 != ExceedsBounds(&offset, &extent, &image_extent)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, (uint64_t)0, - msg_code, "IMAGE", "%s: pRegion[%d] exceeds image bounds..", func_name, i); + msg_code, "%s: pRegion[%d] exceeds image bounds..", func_name, i); } } @@ -3891,9 +3889,9 @@ static inline bool ValidateBufferBounds(const debug_report_data *report_data, IM max_buffer_offset += pRegions[i].bufferOffset; // add initial offset (bytes) if (buffer_size < max_buffer_offset) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - (uint64_t)0, msg_code, "IMAGE", "%s: pRegion[%d] exceeds buffer size of %" PRIu64 " bytes..", - func_name, i, buffer_size); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, (uint64_t)0, + msg_code, "%s: pRegion[%d] exceeds buffer size of %" PRIu64 " bytes..", func_name, i, buffer_size); } } } @@ -3916,7 +3914,7 @@ bool PreCallValidateCmdCopyImageToBuffer(layer_data *device_data, VkImageLayout VkQueueFlags queue_flags = GetPhysDevProperties(device_data)->queue_family_properties[pPool->queueFamilyIndex].queueFlags; if (0 == (queue_flags & (VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->createInfo.commandPool), VALIDATION_ERROR_19202415, "DS", + HandleToUint64(cb_node->createInfo.commandPool), VALIDATION_ERROR_19202415, "Cannot call vkCmdCopyImageToBuffer() on a command buffer allocated from a pool without graphics, compute, " "or transfer capabilities.."); } @@ -3983,7 +3981,7 @@ bool PreCallValidateCmdCopyBufferToImage(layer_data *device_data, VkImageLayout VkQueueFlags queue_flags = GetPhysDevProperties(device_data)->queue_family_properties[pPool->queueFamilyIndex].queueFlags; if (0 == (queue_flags & (VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->createInfo.commandPool), VALIDATION_ERROR_18e02415, "DS", + HandleToUint64(cb_node->createInfo.commandPool), VALIDATION_ERROR_18e02415, "Cannot call vkCmdCopyBufferToImage() on a command buffer allocated from a pool without graphics, compute, " "or transfer capabilities.."); } @@ -4039,7 +4037,7 @@ bool PreCallValidateGetImageSubresourceLayout(layer_data *device_data, VkImage i std::bitset<num_bits> aspect_mask_bits(sub_aspect); if (aspect_mask_bits.count() != 1) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), - VALIDATION_ERROR_2a6007ca, "IMAGE", + VALIDATION_ERROR_2a6007ca, "vkGetImageSubresourceLayout(): VkImageSubresource.aspectMask must have exactly 1 bit set."); } @@ -4050,25 +4048,25 @@ bool PreCallValidateGetImageSubresourceLayout(layer_data *device_data, VkImage i // image must have been created with tiling equal to VK_IMAGE_TILING_LINEAR if (image_entry->createInfo.tiling != VK_IMAGE_TILING_LINEAR) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), - VALIDATION_ERROR_2a6007c8, "IMAGE", - "vkGetImageSubresourceLayout(): Image must have tiling of VK_IMAGE_TILING_LINEAR."); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), + VALIDATION_ERROR_2a6007c8, "vkGetImageSubresourceLayout(): Image must have tiling of VK_IMAGE_TILING_LINEAR."); } // mipLevel must be less than the mipLevels specified in VkImageCreateInfo when the image was created if (pSubresource->mipLevel >= image_entry->createInfo.mipLevels) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), - VALIDATION_ERROR_2a600d68, "IMAGE", - "vkGetImageSubresourceLayout(): pSubresource.mipLevel (%d) must be less than %d.", pSubresource->mipLevel, - image_entry->createInfo.mipLevels); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), + VALIDATION_ERROR_2a600d68, "vkGetImageSubresourceLayout(): pSubresource.mipLevel (%d) must be less than %d.", + pSubresource->mipLevel, image_entry->createInfo.mipLevels); } // arrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when the image was created if (pSubresource->arrayLayer >= image_entry->createInfo.arrayLayers) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), - VALIDATION_ERROR_2a600d6a, "IMAGE", - "vkGetImageSubresourceLayout(): pSubresource.arrayLayer (%d) must be less than %d.", - pSubresource->arrayLayer, image_entry->createInfo.arrayLayers); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), + VALIDATION_ERROR_2a600d6a, "vkGetImageSubresourceLayout(): pSubresource.arrayLayer (%d) must be less than %d.", + pSubresource->arrayLayer, image_entry->createInfo.arrayLayers); } // subresource's aspect must be compatible with image's format. @@ -4082,7 +4080,7 @@ bool PreCallValidateGetImageSubresourceLayout(layer_data *device_data, VkImage i } if (sub_aspect != (sub_aspect & allowed_flags)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), vuid, "IMAGE", + HandleToUint64(image), vuid, "vkGetImageSubresourceLayout(): For multi-planar images, VkImageSubresource.aspectMask (0x%" PRIx32 ") must be a single-plane specifier flag.", sub_aspect); @@ -4091,13 +4089,13 @@ bool PreCallValidateGetImageSubresourceLayout(layer_data *device_data, VkImage i if (sub_aspect != VK_IMAGE_ASPECT_COLOR_BIT) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), - VALIDATION_ERROR_0a400c01, "IMAGE", + VALIDATION_ERROR_0a400c01, "vkGetImageSubresourceLayout(): For color formats, VkImageSubresource.aspectMask must be VK_IMAGE_ASPECT_COLOR."); } } else if (FormatIsDepthOrStencil(img_format)) { if ((sub_aspect != VK_IMAGE_ASPECT_DEPTH_BIT) && (sub_aspect != VK_IMAGE_ASPECT_STENCIL_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image), VALIDATION_ERROR_0a400c01, "IMAGE", + HandleToUint64(image), VALIDATION_ERROR_0a400c01, "vkGetImageSubresourceLayout(): For depth/stencil formats, VkImageSubresource.aspectMask must be " "either VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT."); } diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 8d654aae..c02a9a52 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -72,7 +72,7 @@ #if defined __ANDROID__ #include <android/log.h> -#define LOGCONSOLE(...) ((void)__android_log_print(ANDROID_LOG_INFO, "DS", __VA_ARGS__)) +#define LOGCONSOLE(...) ((void)__android_log_print(ANDROID_LOG_INFO, "CORE_VALIDATION", __VA_ARGS__)) #else #define LOGCONSOLE(...) \ { \ @@ -415,7 +415,7 @@ static bool ValidateMemoryIsValid(layer_data *dev_data, VkDeviceMemory mem, uint if (mem_info) { if (!mem_info->bound_ranges[bound_object_handle].valid) { return log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), MEMTRACK_INVALID_MEM_REGION, "MEM", + HandleToUint64(mem), MEMTRACK_INVALID_MEM_REGION, "%s: Cannot read invalid region of memory allocation 0x%" PRIx64 " for bound %s object 0x%" PRIx64 ", please fill the memory before using.", functionName, HandleToUint64(mem), object_string[type], bound_object_handle); @@ -430,7 +430,7 @@ bool ValidateImageMemoryIsValid(layer_data *dev_data, IMAGE_STATE *image_state, if (image_state->binding.mem == MEMTRACKER_SWAP_CHAIN_IMAGE_KEY) { if (!image_state->valid) { return log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(image_state->binding.mem), MEMTRACK_INVALID_MEM_REGION, "MEM", + HandleToUint64(image_state->binding.mem), MEMTRACK_INVALID_MEM_REGION, "%s: Cannot read invalid swapchain image 0x%" PRIx64 ", please fill the memory before using.", functionName, HandleToUint64(image_state->image)); } @@ -580,17 +580,17 @@ bool VerifyBoundMemoryIsValid(const layer_data *dev_data, VkDeviceMemory mem, ui const char *type_name, UNIQUE_VALIDATION_ERROR_CODE error_code) { bool result = false; if (VK_NULL_HANDLE == mem) { - result = log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, handle, error_code, "MEM", - "%s: Vk%s object 0x%" PRIx64 " used with no memory bound. Memory should be bound by calling vkBind%sMemory().", - api_name, type_name, handle, type_name); + result = + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, handle, error_code, + "%s: Vk%s object 0x%" PRIx64 " used with no memory bound. Memory should be bound by calling vkBind%sMemory().", + api_name, type_name, handle, type_name); } else if (MEMORY_UNBOUND == mem) { - result = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, handle, - error_code, "MEM", - "%s: Vk%s object 0x%" PRIx64 - " used with no memory bound and previously bound memory was freed. Memory must not be freed prior to this " - "operation.", - api_name, type_name, handle); + result = + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, handle, error_code, + "%s: Vk%s object 0x%" PRIx64 + " used with no memory bound and previously bound memory was freed. Memory must not be freed prior to this " + "operation.", + api_name, type_name, handle); } return result; } @@ -670,7 +670,7 @@ static bool ValidateSetMemBinding(layer_data *dev_data, VkDeviceMemory mem, uint assert(type == kVulkanObjectTypeImage); } skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), error_code, "MEM", + HandleToUint64(mem), error_code, "In %s, attempting to bind memory (0x%" PRIx64 ") to object (0x%" PRIx64 ") which was created with sparse memory flags (VK_%s_CREATE_SPARSE_*_BIT).", apiName, HandleToUint64(mem), handle, handle_type); @@ -686,13 +686,13 @@ static bool ValidateSetMemBinding(layer_data *dev_data, VkDeviceMemory mem, uint assert(type == kVulkanObjectTypeImage); } skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), error_code, "MEM", + HandleToUint64(mem), error_code, "In %s, attempting to bind memory (0x%" PRIx64 ") to object (0x%" PRIx64 ") which has already been bound to mem object 0x%" PRIx64 ".", apiName, HandleToUint64(mem), handle, HandleToUint64(prev_binding->mem)); } else if (mem_binding->binding.mem == MEMORY_UNBOUND) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), MEMTRACK_REBIND_OBJECT, "MEM", + HandleToUint64(mem), MEMTRACK_REBIND_OBJECT, "In %s, attempting to bind memory (0x%" PRIx64 ") to object (0x%" PRIx64 ") which was previous bound to memory that has since been freed. Memory bindings are immutable in " "Vulkan so this attempt to bind to new memory is not allowed.", @@ -734,7 +734,7 @@ static bool validate_status(layer_data *dev_data, GLOBAL_CB_NODE *pNode, CBStatu const char *fail_msg, UNIQUE_VALIDATION_ERROR_CODE const msg_code) { if (!(pNode->status & status_mask)) { return log_msg(dev_data->report_data, msg_flags, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pNode->commandBuffer), msg_code, "DS", "command buffer object 0x%" PRIx64 ": %s..", + HandleToUint64(pNode->commandBuffer), msg_code, "command buffer object 0x%" PRIx64 ": %s..", HandleToUint64(pNode->commandBuffer), fail_msg); } return false; @@ -853,7 +853,7 @@ static bool logInvalidAttachmentMessage(layer_data const *dev_data, const char * uint32_t secondary_attach, const char *msg, const char *caller, UNIQUE_VALIDATION_ERROR_CODE error_code) { return log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - HandleToUint64(rp1_state->renderPass), error_code, "DS", + HandleToUint64(rp1_state->renderPass), error_code, "%s: RenderPasses incompatible between %s w/ renderPass 0x%" PRIx64 " and %s w/ renderPass 0x%" PRIx64 " Attachment %u is not compatible with %u: %s.", caller, type1_string, HandleToUint64(rp1_state->renderPass), type2_string, HandleToUint64(rp2_state->renderPass), @@ -964,7 +964,7 @@ static bool validateRenderPassCompatibility(layer_data const *dev_data, const ch if (rp1_state->createInfo.subpassCount != rp2_state->createInfo.subpassCount) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - HandleToUint64(rp1_state->renderPass), error_code, "DS", + HandleToUint64(rp1_state->renderPass), error_code, "%s: RenderPasses incompatible between %s w/ renderPass 0x%" PRIx64 " with a subpassCount of %u and %s w/ renderPass 0x%" PRIx64 " with a subpassCount of %u.", caller, type1_string, HandleToUint64(rp1_state->renderPass), rp1_state->createInfo.subpassCount, @@ -1020,7 +1020,7 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND (pCB->currentDrawData.buffers[vertex_binding] == VK_NULL_HANDLE)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), DRAWSTATE_VTX_INDEX_OUT_OF_BOUNDS, "DS", + HandleToUint64(pCB->commandBuffer), DRAWSTATE_VTX_INDEX_OUT_OF_BOUNDS, "The Pipeline State Object (0x%" PRIx64 ") expects that this Command Buffer's vertex binding Index %u should be set via " "vkCmdBindVertexBuffers. This is because VkVertexInputBindingDescription struct at " @@ -1032,7 +1032,7 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND if (!pCB->currentDrawData.buffers.empty() && !pCB->vertex_buffer_used) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), - DRAWSTATE_VTX_INDEX_OUT_OF_BOUNDS, "DS", + DRAWSTATE_VTX_INDEX_OUT_OF_BOUNDS, "Vertex buffers are bound to command buffer (0x%" PRIx64 ") but no vertex buffers are attached to this Pipeline State Object (0x%" PRIx64 ").", HandleToUint64(pCB->commandBuffer), HandleToUint64(state.pipeline_state->pipeline)); @@ -1055,7 +1055,7 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND list_bits(ss, missingViewportMask); ss << " are used by pipeline state object, but were not provided via calls to vkCmdSetViewport()."; skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_VIEWPORT_SCISSOR_MISMATCH, "DS", "%s", ss.str().c_str()); + DRAWSTATE_VIEWPORT_SCISSOR_MISMATCH, "%s", ss.str().c_str()); } } @@ -1068,7 +1068,7 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND list_bits(ss, missingScissorMask); ss << " are used by pipeline state object, but were not provided via calls to vkCmdSetScissor()."; skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_VIEWPORT_SCISSOR_MISMATCH, "DS", "%s", ss.str().c_str()); + DRAWSTATE_VIEWPORT_SCISSOR_MISMATCH, "%s", ss.str().c_str()); } } } @@ -1099,7 +1099,7 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND if (!dev_data->extensions.vk_amd_mixed_attachment_samples && ((subpass_num_samples & static_cast<unsigned>(pso_num_samples)) != subpass_num_samples)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), DRAWSTATE_NUM_SAMPLES_MISMATCH, "DS", + HandleToUint64(pPipeline->pipeline), DRAWSTATE_NUM_SAMPLES_MISMATCH, "Num samples mismatch! At draw-time in Pipeline (0x%" PRIx64 ") with %u samples while current RenderPass (0x%" PRIx64 ") w/ %u samples!", HandleToUint64(pPipeline->pipeline), pso_num_samples, @@ -1107,7 +1107,7 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND } } else { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), DRAWSTATE_NUM_SAMPLES_MISMATCH, "DS", + HandleToUint64(pPipeline->pipeline), DRAWSTATE_NUM_SAMPLES_MISMATCH, "No active render pass found at draw-time in Pipeline (0x%" PRIx64 ")!", HandleToUint64(pPipeline->pipeline)); } @@ -1150,10 +1150,10 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND pPipeline->rp_state.get(), caller, rp_error); } if (pPipeline->graphicsPipelineCI.subpass != pCB->activeSubpass) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), sp_error, "DS", - "Pipeline was built for subpass %u but used in subpass %u.", pPipeline->graphicsPipelineCI.subpass, - pCB->activeSubpass); + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + HandleToUint64(pPipeline->pipeline), sp_error, "Pipeline was built for subpass %u but used in subpass %u.", + pPipeline->graphicsPipelineCI.subpass, pCB->activeSubpass); } } @@ -1189,7 +1189,7 @@ static bool ValidateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, CMD if (nullptr == pPipe) { result |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_PIPELINE, "DS", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_PIPELINE, "At Draw/Dispatch time no valid VkPipeline is bound! This is illegal. Please bind one with vkCmdBindPipeline()."); // Early return as any further checks below will be busted w/o a pipeline if (result) return true; @@ -1209,7 +1209,7 @@ static bool ValidateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, CMD if ((state.boundDescriptorSets.size() <= setIndex) || (!state.boundDescriptorSets[setIndex])) { result |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_DESCRIPTOR_SET_NOT_BOUND, "DS", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_DESCRIPTOR_SET_NOT_BOUND, "VkPipeline 0x%" PRIx64 " uses set #%u but that set is not bound.", HandleToUint64(pPipe->pipeline), setIndex); } else if (!verify_set_layout_compatibility(state.boundDescriptorSets[setIndex], &pipeline_layout, setIndex, errorString)) { @@ -1217,7 +1217,7 @@ static bool ValidateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, CMD VkDescriptorSet setHandle = state.boundDescriptorSets[setIndex]->GetSet(); result |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(setHandle), DRAWSTATE_PIPELINE_LAYOUTS_INCOMPATIBLE, "DS", + HandleToUint64(setHandle), DRAWSTATE_PIPELINE_LAYOUTS_INCOMPATIBLE, "VkDescriptorSet (0x%" PRIx64 ") bound as set #%u is not compatible with overlapping VkPipelineLayout 0x%" PRIx64 " due to: %s", HandleToUint64(setHandle), setIndex, HandleToUint64(pipeline_layout.layout), errorString.c_str()); @@ -1240,7 +1240,7 @@ static bool ValidateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, CMD auto set = descriptor_set->GetSet(); result |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(set), - DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, "DS", + DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, "Descriptor set 0x%" PRIx64 " encountered the following validation error at %s time: %s", HandleToUint64(set), function, err_str.c_str()); } @@ -1296,12 +1296,12 @@ static bool ValidatePipelineLocked(layer_data *dev_data, std::vector<std::unique (pPipeline->graphicsPipelineCI.basePipelineIndex != -1))) { // This check is a superset of VALIDATION_ERROR_096005a8 and VALIDATION_ERROR_096005aa skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "DS", + HandleToUint64(pPipeline->pipeline), DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "Invalid Pipeline CreateInfo: exactly one of base pipeline index and handle must be specified"); } else if (pPipeline->graphicsPipelineCI.basePipelineIndex != -1) { if (pPipeline->graphicsPipelineCI.basePipelineIndex >= pipelineIndex) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_208005a0, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_208005a0, "Invalid Pipeline CreateInfo: base pipeline must occur earlier in array than derivative pipeline."); } else { pBasePipeline = pPipelines[pPipeline->graphicsPipelineCI.basePipelineIndex].get(); @@ -1312,7 +1312,7 @@ static bool ValidatePipelineLocked(layer_data *dev_data, std::vector<std::unique if (pBasePipeline && !(pBasePipeline->graphicsPipelineCI.flags & VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "DS", + HandleToUint64(pPipeline->pipeline), DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "Invalid Pipeline CreateInfo: base pipeline does not allow derivatives."); } } @@ -1333,7 +1333,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq auto subpass_desc = &pPipeline->rp_state->createInfo.pSubpasses[pPipeline->graphicsPipelineCI.subpass]; if (pPipeline->graphicsPipelineCI.subpass >= pPipeline->rp_state->createInfo.subpassCount) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005ee, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005ee, "Invalid Pipeline CreateInfo State: Subpass index %u is out of range for this renderpass (0..%u).", pPipeline->graphicsPipelineCI.subpass, pPipeline->rp_state->createInfo.subpassCount - 1); subpass_desc = nullptr; @@ -1344,7 +1344,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq if (color_blend_state->attachmentCount != subpass_desc->colorAttachmentCount) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005d4, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005d4, "vkCreateGraphicsPipelines(): Render pass (0x%" PRIx64 ") subpass %u has colorAttachmentCount of %u which doesn't match the pColorBlendState->attachmentCount of %u.", HandleToUint64(pPipeline->rp_state->renderPass), pPipeline->graphicsPipelineCI.subpass, @@ -1361,7 +1361,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq sizeof(pAttachments[0]))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_0f4004ba, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_0f4004ba, "Invalid Pipeline CreateInfo: If independent blend feature not enabled, all elements of " "pAttachments must be identical."); break; @@ -1372,7 +1372,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq if (!dev_data->enabled_features.logicOp && (pPipeline->graphicsPipelineCI.pColorBlendState->logicOpEnable != VK_FALSE)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_0f4004bc, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_0f4004bc, "Invalid Pipeline CreateInfo: If logic operations feature not enabled, logicOpEnable must be VK_FALSE."); } } @@ -1385,7 +1385,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq for (uint32_t stage = VK_SHADER_STAGE_VERTEX_BIT; stage & VK_SHADER_STAGE_ALL_GRAPHICS; stage <<= 1) { if (pPipeline->duplicate_shaders & stage) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "DS", + HandleToUint64(pPipeline->pipeline), DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "Invalid Pipeline CreateInfo State: Multiple shaders provided for stage %s", string_VkShaderStageFlagBits(VkShaderStageFlagBits(stage))); } @@ -1394,7 +1394,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq // VS is required if (!(pPipeline->active_shaders & VK_SHADER_STAGE_VERTEX_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005ae, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005ae, "Invalid Pipeline CreateInfo State: Vertex Shader required."); } // Either both or neither TC/TE shaders should be defined @@ -1402,18 +1402,18 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq bool has_eval = (pPipeline->active_shaders & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) != 0; if (has_control && !has_eval) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005b2, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005b2, "Invalid Pipeline CreateInfo State: TE and TC shaders must be included or excluded as a pair."); } if (!has_control && has_eval) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005b4, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005b4, "Invalid Pipeline CreateInfo State: TE and TC shaders must be included or excluded as a pair."); } // Compute shaders should be specified independent of Gfx shaders if (pPipeline->active_shaders & VK_SHADER_STAGE_COMPUTE_BIT) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005b0, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005b0, "Invalid Pipeline CreateInfo State: Do not specify Compute Shader for Gfx Pipeline."); } // VK_PRIMITIVE_TOPOLOGY_PATCH_LIST primitive topology is only valid for tessellation pipelines. @@ -1422,7 +1422,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq (!pPipeline->graphicsPipelineCI.pInputAssemblyState || pPipeline->graphicsPipelineCI.pInputAssemblyState->topology != VK_PRIMITIVE_TOPOLOGY_PATCH_LIST)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005c0, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005c0, "Invalid Pipeline CreateInfo State: VK_PRIMITIVE_TOPOLOGY_PATCH_LIST must be set as IA topology for " "tessellation pipelines."); } @@ -1430,7 +1430,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq pPipeline->graphicsPipelineCI.pInputAssemblyState->topology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST) { if (!has_control || !has_eval) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005c2, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005c2, "Invalid Pipeline CreateInfo State: VK_PRIMITIVE_TOPOLOGY_PATCH_LIST primitive topology is only valid " "for tessellation pipelines."); } @@ -1441,7 +1441,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq if ((pPipeline->graphicsPipelineCI.pRasterizationState->depthClampEnable == VK_TRUE) && (!dev_data->enabled_features.depthClamp)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_1020061c, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_1020061c, "vkCreateGraphicsPipelines(): the depthClamp device feature is disabled: the depthClampEnable member " "of the VkPipelineRasterizationStateCreateInfo structure must be set to VK_FALSE."); } @@ -1450,7 +1450,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq (pPipeline->graphicsPipelineCI.pRasterizationState->depthBiasClamp != 0.0) && (!dev_data->enabled_features.depthBiasClamp)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), DRAWSTATE_INVALID_FEATURE, "DS", + HandleToUint64(pPipeline->pipeline), DRAWSTATE_INVALID_FEATURE, "vkCreateGraphicsPipelines(): the depthBiasClamp device feature is disabled: the depthBiasClamp member " "of the VkPipelineRasterizationStateCreateInfo structure must be set to 0.0 unless the " "VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state is enabled"); @@ -1461,7 +1461,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq if ((pPipeline->graphicsPipelineCI.pMultisampleState->alphaToOneEnable == VK_TRUE) && (!dev_data->enabled_features.alphaToOne)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_10000622, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_10000622, "vkCreateGraphicsPipelines(): the alphaToOne device feature is disabled: the alphaToOneEnable " "member of the VkPipelineMultisampleStateCreateInfo structure must be set to VK_FALSE."); } @@ -1471,14 +1471,14 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq subpass_desc->pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) { if (!pPipeline->graphicsPipelineCI.pDepthStencilState) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005e0, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005e0, "Invalid Pipeline CreateInfo State: pDepthStencilState is NULL when rasterization is enabled " "and subpass uses a depth/stencil attachment."); } else if ((pPipeline->graphicsPipelineCI.pDepthStencilState->depthBoundsTestEnable == VK_TRUE) && (!dev_data->enabled_features.depthBounds)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_0f6004ac, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_0f6004ac, "vkCreateGraphicsPipelines(): the depthBounds device feature is disabled: the " "depthBoundsTestEnable member of the VkPipelineDepthStencilStateCreateInfo structure must be " "set to VK_FALSE."); @@ -1495,7 +1495,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq } if (color_attachment_count > 0 && pPipeline->graphicsPipelineCI.pColorBlendState == nullptr) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005e2, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_096005e2, "Invalid Pipeline CreateInfo State: pColorBlendState is NULL when rasterization is enabled and " "subpass uses color attachments."); } @@ -1514,7 +1514,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq if ((properties.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) == 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_14a004de, "IMAGE", + VALIDATION_ERROR_14a004de, "vkCreateGraphicsPipelines: pCreateInfo[%d].pVertexInputState->vertexAttributeDescriptions[%d].format " "(%s) is not a supported vertex buffer format.", pipelineIndex, j, string_VkFormat(format)); @@ -1538,7 +1538,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector<std::uniq } if (pPipeline->graphicsPipelineCI.pMultisampleState->rasterizationSamples != max_sample_count) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_09600bc2, "DS", + HandleToUint64(pPipeline->pipeline), VALIDATION_ERROR_09600bc2, "vkCreateGraphicsPipelines: pCreateInfo[%d].pMultisampleState->rasterizationSamples (%s) != max " "attachment samples (%s) used in subpass %u.", pipelineIndex, @@ -1571,14 +1571,14 @@ static bool validateIdleDescriptorSet(const layer_data *dev_data, VkDescriptorSe auto set_node = dev_data->setMap.find(set); if (set_node == dev_data->setMap.end()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(set), DRAWSTATE_DOUBLE_DESTROY, "DS", + HandleToUint64(set), DRAWSTATE_DOUBLE_DESTROY, "Cannot call %s() on descriptor set 0x%" PRIx64 " that has not been allocated.", func_str.c_str(), HandleToUint64(set)); } else { // TODO : This covers various error cases so should pass error enum into this function and use passed in enum here if (set_node->second->in_use.load()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(set), VALIDATION_ERROR_2860026a, "DS", + HandleToUint64(set), VALIDATION_ERROR_2860026a, "Cannot call %s() on descriptor set 0x%" PRIx64 " that is in use by a command buffer.", func_str.c_str(), HandleToUint64(set)); } @@ -1637,11 +1637,11 @@ bool ValidateCmdSubpassState(const layer_data *dev_data, const GLOBAL_CB_NODE *p if (pCB->activeSubpassContents == VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS && (cmd_type != CMD_EXECUTECOMMANDS && cmd_type != CMD_NEXTSUBPASS && cmd_type != CMD_ENDRENDERPASS)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", + HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_COMMAND_BUFFER, "Commands cannot be called in a subpass using secondary command buffers."); } else if (pCB->activeSubpassContents == VK_SUBPASS_CONTENTS_INLINE && cmd_type == CMD_EXECUTECOMMANDS) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", + HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_COMMAND_BUFFER, "vkCmdExecuteCommands() cannot be called in a subpass using inline commands."); } return skip; @@ -1663,7 +1663,7 @@ bool ValidateCmdQueueFlags(layer_data *dev_data, const GLOBAL_CB_NODE *cb_node, } } return log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), error_code, "DS", + HandleToUint64(cb_node->commandBuffer), error_code, "Cannot call %s on a command buffer allocated from a pool without %s capabilities..", caller_name, required_flags_string.c_str()); } @@ -1683,7 +1683,7 @@ static bool ReportInvalidCommandBuffer(layer_data *dev_data, const GLOBAL_CB_NOD const char *type_str = object_string[obj.type]; const char *cause_str = GetCauseStr(obj); skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", + HandleToUint64(cb_state->commandBuffer), DRAWSTATE_INVALID_COMMAND_BUFFER, "You are adding %s to command buffer 0x%" PRIx64 " that is invalid because bound %s 0x%" PRIx64 " was %s.", call_source, HandleToUint64(cb_state->commandBuffer), type_str, obj.handle, cause_str); } @@ -1777,7 +1777,7 @@ bool ValidateCmd(layer_data *dev_data, const GLOBAL_CB_NODE *cb_state, const CMD } const auto error = error_it->second; return log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), error, "DS", + HandleToUint64(cb_state->commandBuffer), error, "You must call vkBeginCommandBuffer() before this call to %s.", caller_name); } } @@ -1986,7 +1986,7 @@ bool insideRenderPass(const layer_data *dev_data, const GLOBAL_CB_NODE *pCB, con bool inside = false; if (pCB->activeRenderPass) { inside = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), msgCode, "DS", + HandleToUint64(pCB->commandBuffer), msgCode, "%s: It is invalid to issue this call inside an active render pass (0x%" PRIx64 ").", apiName, HandleToUint64(pCB->activeRenderPass->renderPass)); } @@ -2001,8 +2001,8 @@ bool outsideRenderPass(const layer_data *dev_data, GLOBAL_CB_NODE *pCB, const ch ((pCB->createInfo.level == VK_COMMAND_BUFFER_LEVEL_SECONDARY) && (!pCB->activeRenderPass) && !(pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT))) { outside = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), msgCode, "DS", - "%s: This call must be issued inside an active render pass.", apiName); + HandleToUint64(pCB->commandBuffer), msgCode, "%s: This call must be issued inside an active render pass.", + apiName); } return outside; } @@ -2106,7 +2106,7 @@ static bool ValidatePhysicalDeviceQueueFamily(instance_layer_data *instance_data if (requested_queue_family >= pd_state->queue_family_count) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - HandleToUint64(pd_state->phys_device), err_code, "DL", + HandleToUint64(pd_state->phys_device), err_code, "%s: %s (= %" PRIu32 ") is not less than any previously obtained pQueueFamilyPropertyCount from " "vkGetPhysicalDeviceQueueFamilyProperties%s (%s).", @@ -2146,7 +2146,7 @@ static bool ValidateDeviceQueueCreateInfos(instance_layer_data *instance_data, c requested_queue_count > pd_state->queue_family_properties[requested_queue_family].queueCount) { skip |= log_msg( instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - HandleToUint64(pd_state->phys_device), VALIDATION_ERROR_06c002fc, "DL", + HandleToUint64(pd_state->phys_device), VALIDATION_ERROR_06c002fc, "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueCount (=%" PRIu32 ") is not less than or equal to available queue count for this pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueFamilyIndex} (=%" PRIu32 ") obtained previously from vkGetPhysicalDeviceQueueFamilyProperties%s (%s).", @@ -2173,7 +2173,7 @@ static bool ValidateRequestedFeatures(instance_layer_data *instance_data, const for (uint32_t i = 0; i < total_bools; i++) { if (requested[i] > actual[i]) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, DEVLIMITS_INVALID_FEATURE_REQUESTED, "DL", + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, DEVLIMITS_INVALID_FEATURE_REQUESTED, "While calling vkCreateDevice(), requesting feature '%s' in VkPhysicalDeviceFeatures struct, which is " "not available on this device.", GetPhysDevFeatureString(i)); @@ -2184,7 +2184,7 @@ static bool ValidateRequestedFeatures(instance_layer_data *instance_data, const // If user didn't request features, notify them that they should // TODO: Verify this against the spec. I believe this is an invalid use of the API and should return an error skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - 0, DEVLIMITS_INVALID_FEATURE_REQUESTED, "DL", + 0, DEVLIMITS_INVALID_FEATURE_REQUESTED, "You requested features that are unavailable on this device. You should first query feature availability " "by calling vkGetPhysicalDeviceFeatures()."); } @@ -2202,9 +2202,9 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice // TODO: object_tracker should perhaps do this instead // and it does not seem to currently work anyway -- the loader just crashes before this point if (!GetPhysicalDeviceState(instance_data, gpu)) { - skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - 0, DEVLIMITS_MUST_QUERY_COUNT, "DL", - "Invalid call to vkCreateDevice() w/o first calling vkEnumeratePhysicalDevices()."); + skip |= + log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, + DEVLIMITS_MUST_QUERY_COUNT, "Invalid call to vkCreateDevice() w/o first calling vkEnumeratePhysicalDevices()."); } // Check that any requested features are available @@ -2340,20 +2340,20 @@ static bool ValidateStageMaskGsTsEnables(layer_data *dev_data, VkPipelineStageFl UNIQUE_VALIDATION_ERROR_CODE geo_error_id, UNIQUE_VALIDATION_ERROR_CODE tess_error_id) { bool skip = false; if (!dev_data->enabled_features.geometryShader && (stageMask & VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT)) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - geo_error_id, "DL", - "%s call includes a stageMask with VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT bit set when device does not have " - "geometryShader feature enabled.", - caller); + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, geo_error_id, + "%s call includes a stageMask with VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT bit set when device does not have " + "geometryShader feature enabled.", + caller); } if (!dev_data->enabled_features.tessellationShader && (stageMask & (VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT))) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - tess_error_id, "DL", - "%s call includes a stageMask with VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT and/or " - "VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT bit(s) set when device does not have " - "tessellationShader feature enabled.", - caller); + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, tess_error_id, + "%s call includes a stageMask with VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT and/or " + "VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT bit(s) set when device does not have " + "tessellationShader feature enabled.", + caller); } return skip; } @@ -2437,7 +2437,7 @@ static bool VerifyQueueStateToSeq(layer_data *dev_data, QUEUE_STATE *initial_que for (auto event : queryEventsPair.second) { if (dev_data->eventMap[event].needsSignaled) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, DRAWSTATE_INVALID_QUERY, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, DRAWSTATE_INVALID_QUERY, "Cannot get query results on queryPool 0x%" PRIx64 " with index %d which was guarded by unsignaled event 0x%" PRIx64 ".", HandleToUint64(queryEventsPair.first.pool), queryEventsPair.first.index, @@ -2565,7 +2565,7 @@ static bool validateCommandBufferSimultaneousUse(layer_data *dev_data, GLOBAL_CB if ((pCB->in_use.load() || current_submit_count > 1) && !(pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, - VALIDATION_ERROR_31a0008e, "DS", + VALIDATION_ERROR_31a0008e, "Command Buffer 0x%" PRIx64 " is already in use and is not marked for simultaneous use.", HandleToUint64(pCB->commandBuffer)); } @@ -2580,7 +2580,7 @@ static bool validateCommandBufferState(layer_data *dev_data, GLOBAL_CB_NODE *cb_ if ((cb_state->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT) && (cb_state->submitCount + current_submit_count > 1)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, - DRAWSTATE_COMMAND_BUFFER_SINGLE_SUBMIT_VIOLATION, "DS", + DRAWSTATE_COMMAND_BUFFER_SINGLE_SUBMIT_VIOLATION, "Commandbuffer 0x%" PRIx64 " was begun w/ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT set, but has been submitted 0x%" PRIxLEAST64 " times.", @@ -2596,14 +2596,14 @@ static bool validateCommandBufferState(layer_data *dev_data, GLOBAL_CB_NODE *cb_ case CB_NEW: skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - (uint64_t)(cb_state->commandBuffer), vu_id, "DS", + (uint64_t)(cb_state->commandBuffer), vu_id, "Command buffer 0x%" PRIx64 " used in the call to %s is unrecorded and contains no commands.", HandleToUint64(cb_state->commandBuffer), call_source); break; case CB_RECORDING: skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), DRAWSTATE_NO_END_COMMAND_BUFFER, "DS", + HandleToUint64(cb_state->commandBuffer), DRAWSTATE_NO_END_COMMAND_BUFFER, "You must call vkEndCommandBuffer() on command buffer 0x%" PRIx64 " before this call to %s!", HandleToUint64(cb_state->commandBuffer), call_source); break; @@ -2625,7 +2625,7 @@ static bool validateResources(layer_data *dev_data, GLOBAL_CB_NODE *cb_node) { auto buffer_state = GetBufferState(dev_data, buffer); if (buffer != VK_NULL_HANDLE && !buffer_state) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - HandleToUint64(buffer), DRAWSTATE_INVALID_BUFFER, "DS", + HandleToUint64(buffer), DRAWSTATE_INVALID_BUFFER, "Cannot submit cmd buffer using deleted buffer 0x%" PRIx64 ".", HandleToUint64(buffer)); } } @@ -2649,7 +2649,7 @@ bool ValidImageBufferQueue(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, const if (!found) { skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[object->type], - object->handle, DRAWSTATE_INVALID_QUEUE_FAMILY, "DS", + object->handle, DRAWSTATE_INVALID_QUEUE_FAMILY, "vkQueueSubmit: Command buffer 0x%" PRIx64 " contains %s 0x%" PRIx64 " which was not created allowing concurrent access to this queue family %d.", HandleToUint64(cb_node->commandBuffer), object_string[object->type], object->handle, @@ -2669,7 +2669,7 @@ static bool validateQueueFamilyIndices(layer_data *dev_data, GLOBAL_CB_NODE *pCB if (pPool && queue_state) { if (pPool->queueFamilyIndex != queue_state->queueFamilyIndex) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), VALIDATION_ERROR_31a00094, "DS", + HandleToUint64(pCB->commandBuffer), VALIDATION_ERROR_31a00094, "vkQueueSubmit: Primary command buffer 0x%" PRIx64 " created in queue family %d is being submitted on queue 0x%" PRIx64 " from queue family %d.", HandleToUint64(pCB->commandBuffer), pPool->queueFamilyIndex, HandleToUint64(queue), @@ -2713,7 +2713,7 @@ static bool validatePrimaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_NO if ((pSubCB->primaryCommandBuffer != pCB->commandBuffer) && !(pSubCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)) { log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, - VALIDATION_ERROR_31a00092, "DS", + VALIDATION_ERROR_31a00092, "Commandbuffer 0x%" PRIx64 " was submitted with secondary buffer 0x%" PRIx64 " but that buffer has subsequently been bound to primary cmd buffer 0x%" PRIx64 " and it does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set.", @@ -2734,14 +2734,14 @@ static bool ValidateFenceForSubmit(layer_data *dev_data, FENCE_NODE *pFence) { if (pFence->state == FENCE_INFLIGHT) { // TODO: opportunities for VALIDATION_ERROR_31a00080, VALIDATION_ERROR_316008b4, VALIDATION_ERROR_16400a0e skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - HandleToUint64(pFence->fence), DRAWSTATE_INVALID_FENCE, "DS", + HandleToUint64(pFence->fence), DRAWSTATE_INVALID_FENCE, "Fence 0x%" PRIx64 " is already in use by another submission.", HandleToUint64(pFence->fence)); } else if (pFence->state == FENCE_RETIRED) { // TODO: opportunities for VALIDATION_ERROR_31a0007e, VALIDATION_ERROR_316008b2, VALIDATION_ERROR_16400a0e skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - HandleToUint64(pFence->fence), MEMTRACK_INVALID_FENCE_STATE, "MEM", + HandleToUint64(pFence->fence), MEMTRACK_INVALID_FENCE_STATE, "Fence 0x%" PRIx64 " submitted in SIGNALED state. Fences must be reset before being submitted", HandleToUint64(pFence->fence)); } @@ -2773,7 +2773,7 @@ static void PostCallRecordQueueSubmit(layer_data *dev_data, VkQueue queue, uint3 if (!dev_data->external_sync_warning) { dev_data->external_sync_warning = true; log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - HandleToUint64(fence), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + HandleToUint64(fence), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "vkQueueSubmit(): Signaling external fence 0x%" PRIx64 " on queue 0x%" PRIx64 " will disable validation of preceding command buffer lifecycle states and the in-use status of associated " "objects.", @@ -2825,7 +2825,7 @@ static void PostCallRecordQueueSubmit(layer_data *dev_data, VkQueue queue, uint3 if (!dev_data->external_sync_warning) { dev_data->external_sync_warning = true; log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, - HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "vkQueueSubmit(): Signaling external semaphore 0x%" PRIx64 " on queue 0x%" PRIx64 " will disable validation of preceding command buffer lifecycle states and the in-use status of " "associated objects.", @@ -2881,7 +2881,7 @@ static bool PreCallValidateQueueSubmit(layer_data *dev_data, VkQueue queue, uint if (unsignaled_semaphores.count(semaphore) || (!(signaled_semaphores.count(semaphore)) && !(pSemaphore->signaled))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, - HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "Queue 0x%" PRIx64 " is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.", HandleToUint64(queue), HandleToUint64(semaphore)); } else { @@ -2899,7 +2899,7 @@ static bool PreCallValidateQueueSubmit(layer_data *dev_data, VkQueue queue, uint if (pSemaphore && (pSemaphore->scope == kSyncScopeInternal || internal_semaphores.count(semaphore))) { if (signaled_semaphores.count(semaphore) || (!(unsignaled_semaphores.count(semaphore)) && pSemaphore->signaled)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, - HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "Queue 0x%" PRIx64 " is signaling semaphore 0x%" PRIx64 " that has already been signaled but not waited on by queue 0x%" PRIx64 ".", HandleToUint64(queue), HandleToUint64(semaphore), HandleToUint64(pSemaphore->signaler.first)); @@ -2960,7 +2960,7 @@ static bool PreCallValidateAllocateMemory(layer_data *dev_data) { bool skip = false; if (dev_data->memObjMap.size() >= dev_data->phys_dev_properties.properties.limits.maxMemoryAllocationCount) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_UNDEFINED, "MEM", + HandleToUint64(dev_data->device), VALIDATION_ERROR_UNDEFINED, "Number of currently valid memory objects is not less than the maximum allowed (%u).", dev_data->phys_dev_properties.properties.limits.maxMemoryAllocationCount); } @@ -2997,8 +2997,8 @@ bool ValidateObjectNotInUse(const layer_data *dev_data, BASE_NODE *obj_node, VK_ if (obj_node->in_use.load()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[obj_struct.type], obj_struct.handle, - error_code, "DS", "Cannot call %s on %s 0x%" PRIx64 " that is currently in use by a command buffer.", - caller_name, object_string[obj_struct.type], obj_struct.handle); + error_code, "Cannot call %s on %s 0x%" PRIx64 " that is currently in use by a command buffer.", caller_name, + object_string[obj_struct.type], obj_struct.handle); } return skip; } @@ -3018,7 +3018,7 @@ static void PostCallRecordFreeMemory(layer_data *dev_data, VkDeviceMemory mem, D // Clear mem binding for any bound objects for (auto obj : mem_info->obj_bindings) { log_msg(dev_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, get_debug_report_enum[obj.type], obj.handle, - MEMTRACK_FREED_MEM_REF, "MEM", "VK Object 0x%" PRIx64 " still has a reference to mem obj 0x%" PRIx64, + MEMTRACK_FREED_MEM_REF, "VK Object 0x%" PRIx64 " still has a reference to mem obj 0x%" PRIx64, HandleToUint64(obj.handle), HandleToUint64(mem_info->mem)); BINDABLE *bindable_state = nullptr; switch (obj.type) { @@ -3066,9 +3066,8 @@ static bool ValidateMapMemRange(layer_data *dev_data, VkDeviceMemory mem, VkDevi bool skip = false; if (size == 0) { - skip = - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), MEMTRACK_INVALID_MAP, "MEM", "VkMapMemory: Attempting to map memory range of size zero"); + skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, + HandleToUint64(mem), MEMTRACK_INVALID_MAP, "VkMapMemory: Attempting to map memory range of size zero"); } auto mem_element = dev_data->memObjMap.find(mem); @@ -3077,7 +3076,7 @@ static bool ValidateMapMemRange(layer_data *dev_data, VkDeviceMemory mem, VkDevi // It is an application error to call VkMapMemory on an object that is already mapped if (mem_info->mem_range.size != 0) { skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), MEMTRACK_INVALID_MAP, "MEM", + HandleToUint64(mem), MEMTRACK_INVALID_MAP, "VkMapMemory: Attempting to map memory on an already-mapped object 0x%" PRIx64, HandleToUint64(mem)); } @@ -3085,7 +3084,7 @@ static bool ValidateMapMemRange(layer_data *dev_data, VkDeviceMemory mem, VkDevi if (size == VK_WHOLE_SIZE) { if (offset >= mem_info->alloc_info.allocationSize) { skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), MEMTRACK_INVALID_MAP, "MEM", + HandleToUint64(mem), MEMTRACK_INVALID_MAP, "Mapping Memory from 0x%" PRIx64 " to 0x%" PRIx64 " with size of VK_WHOLE_SIZE oversteps total array size 0x%" PRIx64, offset, mem_info->alloc_info.allocationSize, mem_info->alloc_info.allocationSize); @@ -3093,7 +3092,7 @@ static bool ValidateMapMemRange(layer_data *dev_data, VkDeviceMemory mem, VkDevi } else { if ((offset + size) > mem_info->alloc_info.allocationSize) { skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), VALIDATION_ERROR_31200552, "MEM", + HandleToUint64(mem), VALIDATION_ERROR_31200552, "Mapping Memory from 0x%" PRIx64 " to 0x%" PRIx64 " oversteps total array size 0x%" PRIx64 ".", offset, size + offset, mem_info->alloc_info.allocationSize); } @@ -3117,7 +3116,7 @@ static bool deleteMemRanges(layer_data *dev_data, VkDeviceMemory mem) { if (!mem_info->mem_range.size) { // Valid Usage: memory must currently be mapped skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), VALIDATION_ERROR_33600562, "MEM", + HandleToUint64(mem), VALIDATION_ERROR_33600562, "Unmapping Memory without memory being mapped: mem obj 0x%" PRIx64 ".", HandleToUint64(mem)); } mem_info->mem_range.size = 0; @@ -3181,7 +3180,7 @@ static inline bool verifyWaitFenceState(layer_data *dev_data, VkFence fence, con if (pFence->state == FENCE_UNSIGNALED) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - HandleToUint64(fence), MEMTRACK_INVALID_FENCE_STATE, "MEM", + HandleToUint64(fence), MEMTRACK_INVALID_FENCE_STATE, "%s called for fence 0x%" PRIx64 " which has not been submitted on a Queue or during acquire next image.", apiCall, HandleToUint64(fence)); } @@ -3359,9 +3358,9 @@ static bool PreCallValidateDestroyFence(layer_data *dev_data, VkFence fence, FEN bool skip = false; if (*fence_node) { if ((*fence_node)->scope == kSyncScopeInternal && (*fence_node)->state == FENCE_INFLIGHT) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - HandleToUint64(fence), VALIDATION_ERROR_24e008c0, "DS", "Fence 0x%" PRIx64 " is in use.", - HandleToUint64(fence)); + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, + HandleToUint64(fence), VALIDATION_ERROR_24e008c0, "Fence 0x%" PRIx64 " is in use.", HandleToUint64(fence)); } } return skip; @@ -3487,7 +3486,7 @@ static bool PreCallValidateGetQueryPoolResults(layer_data *dev_data, VkQueryPool if ((query_pool_state->second.createInfo.queryType == VK_QUERY_TYPE_TIMESTAMP) && (flags & VK_QUERY_RESULT_PARTIAL_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, - VALIDATION_ERROR_2fa00664, "DS", + VALIDATION_ERROR_2fa00664, "QueryPool 0x%" PRIx64 " was created with a queryType of VK_QUERY_TYPE_TIMESTAMP but flags contains VK_QUERY_RESULT_PARTIAL_BIT.", HandleToUint64(query_pool)); @@ -3517,7 +3516,7 @@ static bool PreCallValidateGetQueryPoolResults(layer_data *dev_data, VkQueryPool auto query_event_pair = cb->waitedEventsBeforeQueryReset.find(query); if (query_event_pair == cb->waitedEventsBeforeQueryReset.end()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, DRAWSTATE_INVALID_QUERY, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, DRAWSTATE_INVALID_QUERY, "Cannot get query results on queryPool 0x%" PRIx64 " with index %d which is in flight.", HandleToUint64(query_pool), first_query + i); } @@ -3525,13 +3524,13 @@ static bool PreCallValidateGetQueryPoolResults(layer_data *dev_data, VkQueryPool } } else if (!query_state_pair->second) { // Unavailable and Not in flight skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, - DRAWSTATE_INVALID_QUERY, "DS", + DRAWSTATE_INVALID_QUERY, "Cannot get query results on queryPool 0x%" PRIx64 " with index %d which is unavailable.", HandleToUint64(query_pool), first_query + i); } } else { // Uninitialized skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, - DRAWSTATE_INVALID_QUERY, "DS", + DRAWSTATE_INVALID_QUERY, "Cannot get query results on queryPool 0x%" PRIx64 " with index %d as data has not been collected for this index.", HandleToUint64(query_pool), first_query + i); @@ -3610,7 +3609,7 @@ static bool rangesIntersect(layer_data const *dev_data, MEMORY_RANGE const *rang const char *r2_type_str = range2->image ? "image" : "buffer"; auto obj_type = range1->image ? VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT : VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT; *skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, obj_type, range1->handle, MEMTRACK_INVALID_ALIASING, "MEM", + dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, obj_type, range1->handle, MEMTRACK_INVALID_ALIASING, "%s %s 0x%" PRIx64 " is aliased with %s %s 0x%" PRIx64 " which may indicate a bug. For further info refer to the Buffer-Image Granularity section of the Vulkan " "specification. " @@ -3676,7 +3675,7 @@ static bool ValidateInsertMemoryRange(layer_data const *dev_data, uint64_t handl if (memoryOffset >= mem_info->alloc_info.allocationSize) { UNIQUE_VALIDATION_ERROR_CODE error_code = is_image ? VALIDATION_ERROR_1740082c : VALIDATION_ERROR_1700080e; skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem_info->mem), error_code, "MEM", + HandleToUint64(mem_info->mem), error_code, "In %s, attempting to bind memory (0x%" PRIx64 ") to object (0x%" PRIx64 "), memoryOffset=0x%" PRIxLEAST64 " must be less than the memory allocation size 0x%" PRIxLEAST64 ".", api_name, HandleToUint64(mem_info->mem), HandleToUint64(handle), memoryOffset, @@ -3824,7 +3823,7 @@ static bool ValidateMemoryTypes(const layer_data *dev_data, const DEVICE_MEM_INF bool skip = false; if (((1 << mem_info->alloc_info.memoryTypeIndex) & memory_type_bits) == 0) { skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem_info->mem), msgCode, "MT", + HandleToUint64(mem_info->mem), msgCode, "%s(): MemoryRequirements->memoryTypeBits (0x%X) for this object type are not compatible with the memory " "type (0x%X) of this memory object 0x%" PRIx64 ".", funcName, memory_type_bits, mem_info->alloc_info.memoryTypeIndex, HandleToUint64(mem_info->mem)); @@ -3845,7 +3844,7 @@ static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffe // BindBufferMemory, but it's implied in that memory being bound must conform with VkMemoryRequirements from // vkGetBufferMemoryRequirements() skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - buffer_handle, DRAWSTATE_INVALID_BUFFER, "DS", + buffer_handle, DRAWSTATE_INVALID_BUFFER, "%s: Binding memory to buffer 0x%" PRIx64 " but vkGetBufferMemoryRequirements() has not been called on that buffer.", api_name, HandleToUint64(buffer_handle)); @@ -3866,7 +3865,7 @@ static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffe // Validate memory requirements alignment if (SafeModulo(memoryOffset, buffer_state->requirements.alignment) != 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - buffer_handle, VALIDATION_ERROR_17000818, "DS", + buffer_handle, VALIDATION_ERROR_17000818, "%s: memoryOffset is 0x%" PRIxLEAST64 " but must be an integer multiple of the VkMemoryRequirements::alignment value 0x%" PRIxLEAST64 ", returned from a call to vkGetBufferMemoryRequirements with buffer.", @@ -3877,7 +3876,7 @@ static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffe // Validate memory requirements size if (buffer_state->requirements.size > (mem_info->alloc_info.allocationSize - memoryOffset)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - buffer_handle, VALIDATION_ERROR_1700081a, "DS", + buffer_handle, VALIDATION_ERROR_1700081a, "%s: memory size minus memoryOffset is 0x%" PRIxLEAST64 " but must be at least as large as VkMemoryRequirements::size value 0x%" PRIxLEAST64 ", returned from a call to vkGetBufferMemoryRequirements with buffer.", @@ -3893,7 +3892,7 @@ static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffe } skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - buffer_handle, validation_error, "DS", + buffer_handle, validation_error, "%s: for dedicated memory allocation 0x%" PRIxLEAST64 ", VkMemoryDedicatedAllocateInfoKHR::buffer 0x%" PRIXLEAST64 " must be equal to buffer 0x%" PRIxLEAST64 " and memoryOffset 0x%" PRIxLEAST64 " must be zero.", @@ -3926,7 +3925,7 @@ static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffe if (usage & usage_list[i]) { if (SafeModulo(memoryOffset, offset_requirement[i]) != 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - buffer_handle, msgCode[i], "DS", + buffer_handle, msgCode[i], "%s: %s memoryOffset is 0x%" PRIxLEAST64 " but must be a multiple of device limit %s 0x%" PRIxLEAST64 ".", api_name, memory_type[i], memoryOffset, offset_name[i], offset_requirement[i]); @@ -4356,7 +4355,7 @@ static bool checkCommandBufferInFlight(layer_data *dev_data, const GLOBAL_CB_NOD bool skip = false; if (cb_node->in_use.load()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), error_code, "DS", + HandleToUint64(cb_node->commandBuffer), error_code, "Attempt to %s command buffer (0x%" PRIx64 ") which is in use.", action, HandleToUint64(cb_node->commandBuffer)); } @@ -4435,7 +4434,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool(VkDevice device, const VkQueryPoo if (pCreateInfo && pCreateInfo->queryType == VK_QUERY_TYPE_PIPELINE_STATISTICS) { if (!dev_data->enabled_features.pipelineStatisticsQuery) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, - VALIDATION_ERROR_11c0062e, "DS", + VALIDATION_ERROR_11c0062e, "Query pool with type VK_QUERY_TYPE_PIPELINE_STATISTICS created on a device with " "VkDeviceCreateInfo.pEnabledFeatures.pipelineStatisticsQuery == VK_FALSE."); } @@ -4520,7 +4519,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, auto pFence = GetFenceNode(dev_data, pFences[i]); if (pFence && pFence->scope == kSyncScopeInternal && pFence->state == FENCE_INFLIGHT) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - HandleToUint64(pFences[i]), VALIDATION_ERROR_32e008c6, "DS", "Fence 0x%" PRIx64 " is in use.", + HandleToUint64(pFences[i]), VALIDATION_ERROR_32e008c6, "Fence 0x%" PRIx64 " is in use.", HandleToUint64(pFences[i])); } } @@ -4553,7 +4552,7 @@ void invalidateCommandBuffers(const layer_data *dev_data, std::unordered_set<GLO for (auto cb_node : cb_nodes) { if (cb_node->state == CB_RECORDING) { log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", + HandleToUint64(cb_node->commandBuffer), DRAWSTATE_INVALID_COMMAND_BUFFER, "Invalidating a command buffer that's currently being recorded: 0x%" PRIx64 ".", HandleToUint64(cb_node->commandBuffer)); cb_node->state = CB_INVALID_INCOMPLETE; @@ -4837,7 +4836,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT(VkDevice device, VkValid for (uint32_t i = 0; i < srcCacheCount; i++) { if (src[i] == dst) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT, - 0, VALIDATION_ERROR_3e600c00, "DS", + 0, VALIDATION_ERROR_3e600c00, "vkMergeValidationCachesEXT: dstCache (0x%" PRIx64 ") must not appear in pSrcCaches array.", HandleToUint64(dstCache)); result = VK_ERROR_VALIDATION_FAILED_EXT; @@ -4886,7 +4885,7 @@ bool validate_dual_src_blend_feature(layer_data *device_data, PIPELINE_STATE *pi (pipe_state->attachments[i].srcAlphaBlendFactor == VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pipe_state->pipeline), DRAWSTATE_INVALID_FEATURE, "DS", + HandleToUint64(pipe_state->pipeline), DRAWSTATE_INVALID_FEATURE, "CmdBindPipeline: vkPipeline (0x%" PRIx64 ") attachment[" PRINTF_SIZE_T_SPECIFIER "] has a dual-source blend factor but this device feature is not enabled.", HandleToUint64(pipe_state->pipeline), i); @@ -5046,13 +5045,13 @@ static bool validatePushConstantRange(const layer_data *dev_data, const uint32_t if (offset >= maxPushConstantsSize) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_11a0024c, "DS", + VALIDATION_ERROR_11a0024c, "%s call has push constants index %u with offset %u that exceeds this device's maxPushConstantSize of %u.", caller_name, index, offset, maxPushConstantsSize); } if (size > maxPushConstantsSize - offset) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_11a00254, "DS", + VALIDATION_ERROR_11a00254, "%s call has push constants index %u with offset %u and size %u that exceeds this device's " "maxPushConstantSize of %u.", caller_name, index, offset, size, maxPushConstantsSize); @@ -5061,20 +5060,20 @@ static bool validatePushConstantRange(const layer_data *dev_data, const uint32_t if (offset >= maxPushConstantsSize) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1bc002e4, "DS", + VALIDATION_ERROR_1bc002e4, "%s call has push constants index %u with offset %u that exceeds this device's maxPushConstantSize of %u.", caller_name, index, offset, maxPushConstantsSize); } if (size > maxPushConstantsSize - offset) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1bc002e6, "DS", + VALIDATION_ERROR_1bc002e6, "%s call has push constants index %u with offset %u and size %u that exceeds this device's " "maxPushConstantSize of %u.", caller_name, index, offset, size, maxPushConstantsSize); } } else { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INTERNAL_ERROR, "DS", "%s caller not supported.", caller_name); + DRAWSTATE_INTERNAL_ERROR, "%s caller not supported.", caller_name); } } // size needs to be non-zero and a multiple of 4. @@ -5082,48 +5081,48 @@ static bool validatePushConstantRange(const layer_data *dev_data, const uint32_t if (0 == strcmp(caller_name, "vkCreatePipelineLayout()")) { if (size == 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_11a00250, "DS", + VALIDATION_ERROR_11a00250, "%s call has push constants index %u with size %u. Size must be greater than zero.", caller_name, index, size); } if (size & 0x3) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_11a00252, "DS", + VALIDATION_ERROR_11a00252, "%s call has push constants index %u with size %u. Size must be a multiple of 4.", caller_name, index, size); } } else if (0 == strcmp(caller_name, "vkCmdPushConstants()")) { if (size == 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1bc2c21b, "DS", + VALIDATION_ERROR_1bc2c21b, "%s call has push constants index %u with size %u. Size must be greater than zero.", caller_name, index, size); } if (size & 0x3) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1bc002e2, "DS", + VALIDATION_ERROR_1bc002e2, "%s call has push constants index %u with size %u. Size must be a multiple of 4.", caller_name, index, size); } } else { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INTERNAL_ERROR, "DS", "%s caller not supported.", caller_name); + DRAWSTATE_INTERNAL_ERROR, "%s caller not supported.", caller_name); } } // offset needs to be a multiple of 4. if ((offset & 0x3) != 0) { if (0 == strcmp(caller_name, "vkCreatePipelineLayout()")) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_11a0024e, "DS", + VALIDATION_ERROR_11a0024e, "%s call has push constants index %u with offset %u. Offset must be a multiple of 4.", caller_name, index, offset); } else if (0 == strcmp(caller_name, "vkCmdPushConstants()")) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1bc002e0, "DS", - "%s call has push constants with offset %u. Offset must be a multiple of 4.", caller_name, offset); + VALIDATION_ERROR_1bc002e0, "%s call has push constants with offset %u. Offset must be a multiple of 4.", + caller_name, offset); } else { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INTERNAL_ERROR, "DS", "%s caller not supported.", caller_name); + DRAWSTATE_INTERNAL_ERROR, "%s caller not supported.", caller_name); } } return skip; @@ -5227,7 +5226,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const // Validate layout count against device physical limit if (pCreateInfo->setLayoutCount > dev_data->phys_dev_props.limits.maxBoundDescriptorSets) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe0023c, "DS", + VALIDATION_ERROR_0fe0023c, "vkCreatePipelineLayout(): setLayoutCount (%d) exceeds physical device maxBoundDescriptorSets limit (%d).", pCreateInfo->setLayoutCount, dev_data->phys_dev_props.limits.maxBoundDescriptorSets); } @@ -5239,7 +5238,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const pCreateInfo->pPushConstantRanges[i].size, "vkCreatePipelineLayout()", i); if (0 == pCreateInfo->pPushConstantRanges[i].stageFlags) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_11a2dc03, "DS", "vkCreatePipelineLayout() call has no stageFlags set."); + VALIDATION_ERROR_11a2dc03, "vkCreatePipelineLayout() call has no stageFlags set."); } } @@ -5248,7 +5247,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const for (j = i + 1; j < pCreateInfo->pushConstantRangeCount; ++j) { if (0 != (pCreateInfo->pPushConstantRanges[i].stageFlags & pCreateInfo->pPushConstantRanges[j].stageFlags)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00248, "DS", + VALIDATION_ERROR_0fe00248, "vkCreatePipelineLayout() Duplicate stage flags found in ranges %d and %d.", i, j); } } @@ -5269,7 +5268,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const if (push_descriptor_set_count > 1) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe0024a, "DS", "vkCreatePipelineLayout() Multiple push descriptor sets found."); + VALIDATION_ERROR_0fe0024a, "vkCreatePipelineLayout() Multiple push descriptor sets found."); } // Max descriptors by type, within a single pipeline stage @@ -5278,7 +5277,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const if (max_descriptors_per_stage[DSL_TYPE_SAMPLERS] > dev_data->phys_dev_props.limits.maxPerStageDescriptorSamplers) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe0023e, "DS", + VALIDATION_ERROR_0fe0023e, "vkCreatePipelineLayout(): max per-stage sampler bindings count (%d) exceeds device " "maxPerStageDescriptorSamplers limit (%d).", max_descriptors_per_stage[DSL_TYPE_SAMPLERS], dev_data->phys_dev_props.limits.maxPerStageDescriptorSamplers); @@ -5287,7 +5286,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const // Uniform buffers if (max_descriptors_per_stage[DSL_TYPE_UNIFORM_BUFFERS] > dev_data->phys_dev_props.limits.maxPerStageDescriptorUniformBuffers) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00240, "DS", + VALIDATION_ERROR_0fe00240, "vkCreatePipelineLayout(): max per-stage uniform buffer bindings count (%d) exceeds device " "maxPerStageDescriptorUniformBuffers limit (%d).", max_descriptors_per_stage[DSL_TYPE_UNIFORM_BUFFERS], @@ -5297,7 +5296,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const // Storage buffers if (max_descriptors_per_stage[DSL_TYPE_STORAGE_BUFFERS] > dev_data->phys_dev_props.limits.maxPerStageDescriptorStorageBuffers) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00242, "DS", + VALIDATION_ERROR_0fe00242, "vkCreatePipelineLayout(): max per-stage storage buffer bindings count (%d) exceeds device " "maxPerStageDescriptorStorageBuffers limit (%d).", max_descriptors_per_stage[DSL_TYPE_STORAGE_BUFFERS], @@ -5307,7 +5306,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const // Sampled images if (max_descriptors_per_stage[DSL_TYPE_SAMPLED_IMAGES] > dev_data->phys_dev_props.limits.maxPerStageDescriptorSampledImages) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00244, "DS", + VALIDATION_ERROR_0fe00244, "vkCreatePipelineLayout(): max per-stage sampled image bindings count (%d) exceeds device " "maxPerStageDescriptorSampledImages limit (%d).", max_descriptors_per_stage[DSL_TYPE_SAMPLED_IMAGES], @@ -5317,7 +5316,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const // Storage images if (max_descriptors_per_stage[DSL_TYPE_STORAGE_IMAGES] > dev_data->phys_dev_props.limits.maxPerStageDescriptorStorageImages) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00246, "DS", + VALIDATION_ERROR_0fe00246, "vkCreatePipelineLayout(): max per-stage storage image bindings count (%d) exceeds device " "maxPerStageDescriptorStorageImages limit (%d).", max_descriptors_per_stage[DSL_TYPE_STORAGE_IMAGES], @@ -5328,7 +5327,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const if (max_descriptors_per_stage[DSL_TYPE_INPUT_ATTACHMENTS] > dev_data->phys_dev_props.limits.maxPerStageDescriptorInputAttachments) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00d18, "DS", + VALIDATION_ERROR_0fe00d18, "vkCreatePipelineLayout(): max per-stage input attachment bindings count (%d) exceeds device " "maxPerStageDescriptorInputAttachments limit (%d).", max_descriptors_per_stage[DSL_TYPE_INPUT_ATTACHMENTS], @@ -5342,7 +5341,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const if ((sum_all_stages[VK_DESCRIPTOR_TYPE_SAMPLER] + sum_all_stages[VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER]) > dev_data->phys_dev_props.limits.maxDescriptorSetSamplers) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00d1a, "DS", + VALIDATION_ERROR_0fe00d1a, "vkCreatePipelineLayout(): sum of sampler bindings among all stages (%d) exceeds device " "maxDescriptorSetSamplers limit (%d).", sum_all_stages[VK_DESCRIPTOR_TYPE_SAMPLER] + sum_all_stages[VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER], @@ -5352,7 +5351,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const // Uniform buffers if (sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER] > dev_data->phys_dev_props.limits.maxDescriptorSetUniformBuffers) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00d1c, "DS", + VALIDATION_ERROR_0fe00d1c, "vkCreatePipelineLayout(): sum of uniform buffer bindings among all stages (%d) exceeds device " "maxDescriptorSetUniformBuffers limit (%d).", sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER], @@ -5363,7 +5362,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const if (sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC] > dev_data->phys_dev_props.limits.maxDescriptorSetUniformBuffersDynamic) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00d1e, "DS", + VALIDATION_ERROR_0fe00d1e, "vkCreatePipelineLayout(): sum of dynamic uniform buffer bindings among all stages (%d) exceeds device " "maxDescriptorSetUniformBuffersDynamic limit (%d).", sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC], @@ -5373,7 +5372,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const // Storage buffers if (sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_BUFFER] > dev_data->phys_dev_props.limits.maxDescriptorSetStorageBuffers) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00d20, "DS", + VALIDATION_ERROR_0fe00d20, "vkCreatePipelineLayout(): sum of storage buffer bindings among all stages (%d) exceeds device " "maxDescriptorSetStorageBuffers limit (%d).", sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_BUFFER], @@ -5384,7 +5383,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const if (sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC] > dev_data->phys_dev_props.limits.maxDescriptorSetStorageBuffersDynamic) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00d22, "DS", + VALIDATION_ERROR_0fe00d22, "vkCreatePipelineLayout(): sum of dynamic storage buffer bindings among all stages (%d) exceeds device " "maxDescriptorSetStorageBuffersDynamic limit (%d).", sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC], @@ -5396,7 +5395,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER]) > dev_data->phys_dev_props.limits.maxDescriptorSetSampledImages) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00d24, "DS", + VALIDATION_ERROR_0fe00d24, "vkCreatePipelineLayout(): sum of sampled image bindings among all stages (%d) exceeds device " "maxDescriptorSetSampledImages limit (%d).", sum_all_stages[VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE] + sum_all_stages[VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER] + @@ -5408,7 +5407,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const if ((sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_IMAGE] + sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER]) > dev_data->phys_dev_props.limits.maxDescriptorSetStorageImages) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00d26, "DS", + VALIDATION_ERROR_0fe00d26, "vkCreatePipelineLayout(): sum of storage image bindings among all stages (%d) exceeds device " "maxDescriptorSetStorageImages limit (%d).", sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_IMAGE] + sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER], @@ -5418,7 +5417,7 @@ static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const // Input attachments if (sum_all_stages[VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT] > dev_data->phys_dev_props.limits.maxDescriptorSetInputAttachments) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0fe00d28, "DS", + VALIDATION_ERROR_0fe00d28, "vkCreatePipelineLayout(): sum of input attachment bindings among all stages (%d) exceeds device " "maxDescriptorSetInputAttachments limit (%d).", sum_all_stages[VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT], @@ -5524,7 +5523,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool(VkDevice device, const VkDes DESCRIPTOR_POOL_STATE *pNewNode = new DESCRIPTOR_POOL_STATE(*pDescriptorPool, pCreateInfo); if (NULL == pNewNode) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, - HandleToUint64(*pDescriptorPool), DRAWSTATE_OUT_OF_MEMORY, "DS", + HandleToUint64(*pDescriptorPool), DRAWSTATE_OUT_OF_MEMORY, "Out of memory while attempting to allocate DESCRIPTOR_POOL_STATE in vkCreateDescriptorPool()")) return VK_ERROR_VALIDATION_FAILED_EXT; } else { @@ -5604,7 +5603,7 @@ static bool PreCallValidateFreeDescriptorSets(const layer_data *dev_data, VkDesc if (pool_state && !(VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT & pool_state->createInfo.flags)) { // Can't Free from a NON_FREE pool skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, - HandleToUint64(pool), VALIDATION_ERROR_28600270, "DS", + HandleToUint64(pool), VALIDATION_ERROR_28600270, "It is invalid to call vkFreeDescriptorSets() with a pool created without setting " "VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT."); } @@ -5741,7 +5740,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, // This implicitly resets the Cmd Buffer so make sure any fence is done and then clear memory references if (cb_node->in_use.load()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_16e00062, "MEM", + HandleToUint64(commandBuffer), VALIDATION_ERROR_16e00062, "Calling vkBeginCommandBuffer() on active command buffer %" PRIx64 " before it has completed. You must check command buffer fence before this call.", HandleToUint64(commandBuffer)); @@ -5753,7 +5752,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, if (!pInfo) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_16e00066, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_16e00066, "vkBeginCommandBuffer(): Secondary Command Buffer (0x%" PRIx64 ") must have inheritance info.", HandleToUint64(commandBuffer)); } else { @@ -5777,7 +5776,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, (pInfo->queryFlags & VK_QUERY_CONTROL_PRECISE_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), - VALIDATION_ERROR_16e00068, "DS", + VALIDATION_ERROR_16e00068, "vkBeginCommandBuffer(): Secondary Command Buffer (0x%" PRIx64 ") must not have VK_QUERY_CONTROL_PRECISE_BIT if occulusionQuery is disabled or the device " "does not support precise occlusion queries.", @@ -5790,7 +5789,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, if (pInfo->subpass >= renderPass->createInfo.subpassCount) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), - VALIDATION_ERROR_0280006c, "DS", + VALIDATION_ERROR_0280006c, "vkBeginCommandBuffer(): Secondary Command Buffers (0x%" PRIx64 ") must have a subpass index (%d) that is less than the number of subpasses (%d).", HandleToUint64(commandBuffer), pInfo->subpass, renderPass->createInfo.subpassCount); @@ -5800,7 +5799,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, } if (CB_RECORDING == cb_node->state) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_16e00062, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_16e00062, "vkBeginCommandBuffer(): Cannot call Begin on command buffer (0x%" PRIx64 ") in the RECORDING state. Must first call vkEndCommandBuffer().", HandleToUint64(commandBuffer)); @@ -5810,7 +5809,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, if (!(VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT & pPool->createFlags)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_16e00064, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_16e00064, "Call to vkBeginCommandBuffer() on command buffer (0x%" PRIx64 ") attempts to implicitly reset cmdBuffer created from command pool (0x%" PRIx64 ") that does NOT have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT bit set.", @@ -5865,7 +5864,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { skip |= ValidateCmd(dev_data, pCB, CMD_ENDCOMMANDBUFFER, "vkEndCommandBuffer()"); for (auto query : pCB->activeQueries) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_2740007a, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_2740007a, "Ending command buffer with in progress query: queryPool 0x%" PRIx64 ", index %d.", HandleToUint64(query.pool), query.index); } @@ -5893,7 +5892,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, auto pPool = GetCommandPoolNode(dev_data, cmdPool); if (!(VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT & pPool->createFlags)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_3260005c, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_3260005c, "Attempt to reset command buffer (0x%" PRIx64 ") created from command pool (0x%" PRIx64 ") that does NOT have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT bit set.", HandleToUint64(commandBuffer), HandleToUint64(cmdPool)); @@ -5948,7 +5947,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewport(VkCommandBuffer commandBuffer, uint32_ skip |= ValidateCmd(dev_data, pCB, CMD_SETVIEWPORT, "vkCmdSetViewport()"); if (pCB->static_status & CBSTATUS_VIEWPORT_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1e00098a, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1e00098a, "vkCmdSetViewport(): pipeline was created without VK_DYNAMIC_STATE_VIEWPORT flag.."); } if (!skip) { @@ -5971,7 +5970,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t skip |= ValidateCmd(dev_data, pCB, CMD_SETSCISSOR, "vkCmdSetScissor()"); if (pCB->static_status & CBSTATUS_SCISSOR_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1d80049c, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1d80049c, "vkCmdSetScissor(): pipeline was created without VK_DYNAMIC_STATE_SCISSOR flag.."); } if (!skip) { @@ -5994,7 +5993,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth(VkCommandBuffer commandBuffer, float if (pCB->static_status & CBSTATUS_LINE_WIDTH_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1d600626, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1d600626, "vkCmdSetLineWidth called but pipeline was created without VK_DYNAMIC_STATE_LINE_WIDTH flag."); } if (!skip) { @@ -6016,12 +6015,12 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias(VkCommandBuffer commandBuffer, float skip |= ValidateCmd(dev_data, pCB, CMD_SETDEPTHBIAS, "vkCmdSetDepthBias()"); if (pCB->static_status & CBSTATUS_DEPTH_BIAS_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1cc0062a, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1cc0062a, "vkCmdSetDepthBias(): pipeline was created without VK_DYNAMIC_STATE_DEPTH_BIAS flag.."); } if ((depthBiasClamp != 0.0) && (!dev_data->enabled_features.depthBiasClamp)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1cc0062c, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1cc0062c, "vkCmdSetDepthBias(): the depthBiasClamp device feature is disabled: the depthBiasClamp parameter must " "be set to 0.0."); } @@ -6044,7 +6043,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants(VkCommandBuffer commandBuffer, c skip |= ValidateCmd(dev_data, pCB, CMD_SETBLENDCONSTANTS, "vkCmdSetBlendConstants()"); if (pCB->static_status & CBSTATUS_BLEND_CONSTANTS_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1ca004c8, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1ca004c8, "vkCmdSetBlendConstants(): pipeline was created without VK_DYNAMIC_STATE_BLEND_CONSTANTS flag.."); } if (!skip) { @@ -6065,7 +6064,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds(VkCommandBuffer commandBuffer, floa skip |= ValidateCmd(dev_data, pCB, CMD_SETDEPTHBOUNDS, "vkCmdSetDepthBounds()"); if (pCB->static_status & CBSTATUS_DEPTH_BOUNDS_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1ce004ae, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1ce004ae, "vkCmdSetDepthBounds(): pipeline was created without VK_DYNAMIC_STATE_DEPTH_BOUNDS flag.."); } if (!skip) { @@ -6089,7 +6088,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask(VkCommandBuffer commandBuffe if (pCB->static_status & CBSTATUS_STENCIL_READ_MASK_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1da004b4, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1da004b4, "vkCmdSetStencilCompareMask(): pipeline was created without VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK flag.."); } if (!skip) { @@ -6111,7 +6110,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, skip |= ValidateCmd(dev_data, pCB, CMD_SETSTENCILWRITEMASK, "vkCmdSetStencilWriteMask()"); if (pCB->static_status & CBSTATUS_STENCIL_WRITE_MASK_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1de004b6, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1de004b6, "vkCmdSetStencilWriteMask(): pipeline was created without VK_DYNAMIC_STATE_STENCIL_WRITE_MASK flag.."); } if (!skip) { @@ -6133,7 +6132,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilReference(VkCommandBuffer commandBuffer, skip |= ValidateCmd(dev_data, pCB, CMD_SETSTENCILREFERENCE, "vkCmdSetStencilReference()"); if (pCB->static_status & CBSTATUS_STENCIL_REFERENCE_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1dc004b8, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1dc004b8, "vkCmdSetStencilReference(): pipeline was created without VK_DYNAMIC_STATE_STENCIL_REFERENCE flag.."); } if (!skip) { @@ -6291,7 +6290,7 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL if (!descriptor_set->IsUpdated() && (descriptor_set->GetTotalDescriptorCount() != 0)) { skip |= log_msg( device_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(pDescriptorSets[set_idx]), DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, "DS", + HandleToUint64(pDescriptorSets[set_idx]), DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, "Descriptor Set 0x%" PRIx64 " bound but it was never updated. You may want to either update it or not bind it.", HandleToUint64(pDescriptorSets[set_idx])); } @@ -6299,7 +6298,7 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL if (!verify_set_layout_compatibility(descriptor_set, pipeline_layout, set_idx + firstSet, error_string)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(pDescriptorSets[set_idx]), VALIDATION_ERROR_17c002cc, "DS", + HandleToUint64(pDescriptorSets[set_idx]), VALIDATION_ERROR_17c002cc, "descriptorSet #%u being bound is not compatible with overlapping descriptorSetLayout at index %u of " "pipelineLayout 0x%" PRIx64 " due to: %s.", set_idx, set_idx + firstSet, HandleToUint64(layout), error_string.c_str()); @@ -6312,7 +6311,7 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL if ((total_dynamic_descriptors + set_dynamic_descriptor_count) > dynamicOffsetCount) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(pDescriptorSets[set_idx]), - DRAWSTATE_INVALID_DYNAMIC_OFFSET_COUNT, "DS", + DRAWSTATE_INVALID_DYNAMIC_OFFSET_COUNT, "descriptorSet #%u (0x%" PRIx64 ") requires %u dynamicOffsets, but only %u dynamicOffsets are left in pDynamicOffsets array. " "There must be one dynamic offset for each dynamic descriptor being bound.", @@ -6326,7 +6325,7 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL device_data->phys_dev_properties.properties.limits.minUniformBufferOffsetAlignment) != 0) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, VALIDATION_ERROR_17c002d4, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, VALIDATION_ERROR_17c002d4, "vkCmdBindDescriptorSets(): pDynamicOffsets[%d] is %d but must be a multiple of " "device limit minUniformBufferOffsetAlignment 0x%" PRIxLEAST64 ".", cur_dyn_offset, pDynamicOffsets[cur_dyn_offset], @@ -6338,7 +6337,7 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL device_data->phys_dev_properties.properties.limits.minStorageBufferOffsetAlignment) != 0) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, VALIDATION_ERROR_17c002d4, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, VALIDATION_ERROR_17c002d4, "vkCmdBindDescriptorSets(): pDynamicOffsets[%d] is %d but must be a multiple of " "device limit minStorageBufferOffsetAlignment 0x%" PRIxLEAST64 ".", cur_dyn_offset, pDynamicOffsets[cur_dyn_offset], @@ -6353,7 +6352,7 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL } } else { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(pDescriptorSets[set_idx]), DRAWSTATE_INVALID_SET, "DS", + HandleToUint64(pDescriptorSets[set_idx]), DRAWSTATE_INVALID_SET, "Attempt to bind descriptor set 0x%" PRIx64 " that doesn't exist!", HandleToUint64(pDescriptorSets[set_idx])); } @@ -6361,7 +6360,7 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL // dynamicOffsetCount must equal the total number of dynamic descriptors in the sets being bound if (total_dynamic_descriptors != dynamicOffsetCount) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_17c002ce, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_17c002ce, "Attempting to bind %u descriptorSets with %u dynamic descriptors, but dynamicOffsetCount is %u. It should " "exactly match the number of dynamic descriptors.", setCount, total_dynamic_descriptors, dynamicOffsetCount); @@ -6408,7 +6407,7 @@ bool ValidatePipelineBindPoint(layer_data *device_data, GLOBAL_CB_NODE *cb_state auto cb_u64 = HandleToUint64(cb_state->commandBuffer); auto cp_u64 = HandleToUint64(cb_state->createInfo.commandPool); skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - cb_u64, error, "DS", + cb_u64, error, "%s: CommandBuffer 0x%" PRIxLEAST64 " was allocated from VkCommandPool 0x%" PRIxLEAST64 " that does not support bindpoint %s.", func_name, cb_u64, cp_u64, string_VkPipelineBindPoint(bind_point)); @@ -6437,14 +6436,14 @@ static bool PreCallValidateCmdPushDescriptorSetKHR(layer_data *device_data, GLOB const auto *dsl = set_layouts[set].get(); if (dsl && (0 == (dsl->GetCreateFlags() & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR))) { skip = log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, layout_u64, VALIDATION_ERROR_1be002da, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, layout_u64, VALIDATION_ERROR_1be002da, "%s: Set index %" PRIu32 " does not match push descriptor set layout index for VkPipelineLayout 0x%" PRIxLEAST64 ".", func_name, set, layout_u64); } } else { skip = log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, - layout_u64, VALIDATION_ERROR_1be002d8, "DS", + layout_u64, VALIDATION_ERROR_1be002d8, "%s: Set index %" PRIu32 " is outside of range for VkPipelineLayout 0x%" PRIxLEAST64 " (set < %" PRIu32 ").", func_name, set, layout_u64, static_cast<uint32_t>(set_layouts.size())); @@ -6516,7 +6515,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkB auto offset_align = GetIndexAlignment(indexType); if (offset % offset_align) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_17e00360, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_17e00360, "vkCmdBindIndexBuffer() offset (0x%" PRIxLEAST64 ") does not fall on alignment (%s) boundary.", offset, string_VkIndexType(indexType)); } @@ -6564,7 +6563,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers(VkCommandBuffer commandBuffer, u skip |= ValidateMemoryIsBoundToBuffer(dev_data, buffer_state, "vkCmdBindVertexBuffers()", VALIDATION_ERROR_182004e8); if (pOffsets[i] >= buffer_state->createInfo.size) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - HandleToUint64(buffer_state->buffer), VALIDATION_ERROR_182004e4, "DS", + HandleToUint64(buffer_state->buffer), VALIDATION_ERROR_182004e4, "vkCmdBindVertexBuffers() offset (0x%" PRIxLEAST64 ") is beyond the end of the buffer.", pOffsets[i]); } } @@ -6877,7 +6876,7 @@ bool ValidateImageSampleCount(layer_data *dev_data, IMAGE_STATE *image_state, Vk bool skip = false; if (image_state->createInfo.samples != sample_count) { skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), msgCode, "DS", + HandleToUint64(image_state->image), msgCode, "%s for image 0x%" PRIx64 " was created with a sample count of %s but must be %s.", location, HandleToUint64(image_state->image), string_VkSampleCountFlagBits(image_state->createInfo.samples), string_VkSampleCountFlagBits(sample_count)); @@ -7215,7 +7214,7 @@ static bool ValidateImageBarrierImage(layer_data *device_data, const char *funcN if (!sub_image_found) { skip |= log_msg( device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, - VALIDATION_ERROR_1b800936, "CORE", + VALIDATION_ERROR_1b800936, "%s: Barrier pImageMemoryBarriers[%d].image (0x%" PRIx64 ") is not referenced by the VkSubpassDescription for active subpass (%d) of current renderPass (0x%" PRIx64 ").", funcName, img_index, HandleToUint64(img_bar_image), active_subpass, rp_handle); @@ -7223,14 +7222,14 @@ static bool ValidateImageBarrierImage(layer_data *device_data, const char *funcN } else { // !image_match auto const fb_handle = HandleToUint64(fb_state->framebuffer); skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, - fb_handle, VALIDATION_ERROR_1b800936, "CORE", + fb_handle, VALIDATION_ERROR_1b800936, "%s: Barrier pImageMemoryBarriers[%d].image (0x%" PRIx64 ") does not match an image from the current framebuffer (0x%" PRIx64 ").", funcName, img_index, HandleToUint64(img_bar_image), fb_handle); } if (img_barrier.oldLayout != img_barrier.newLayout) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b80093a, "CORE", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b80093a, "%s: As the Image Barrier for image 0x%" PRIx64 " is being executed within a render pass instance, oldLayout must equal newLayout yet they are %s and %s.", funcName, HandleToUint64(img_barrier.image), string_VkImageLayout(img_barrier.oldLayout), @@ -7238,7 +7237,7 @@ static bool ValidateImageBarrierImage(layer_data *device_data, const char *funcN } else { if (sub_image_found && sub_image_layout != img_barrier.oldLayout) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - rp_handle, VALIDATION_ERROR_1b800938, "CORE", + rp_handle, VALIDATION_ERROR_1b800938, "%s: Barrier pImageMemoryBarriers[%d].image (0x%" PRIx64 ") is referenced by the VkSubpassDescription for active subpass (%d) of current renderPass (0x%" PRIx64 ") as having layout %s, but image barrier has layout %s.", @@ -7260,7 +7259,7 @@ static bool ValidateRenderPassImageBarriers(layer_data *device_data, const char const auto &img_src_access_mask = img_barrier.srcAccessMask; if (img_src_access_mask != (sub_src_access_mask & img_src_access_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - rp_handle, VALIDATION_ERROR_1b80092e, "CORE", + rp_handle, VALIDATION_ERROR_1b80092e, "%s: Barrier pImageMemoryBarriers[%d].srcAccessMask(0x%X) is not a subset of VkSubpassDependency " "srcAccessMask(0x%X) of subpass %d of renderPass 0x%" PRIx64 ".", funcName, i, img_src_access_mask, sub_src_access_mask, active_subpass, rp_handle); @@ -7268,7 +7267,7 @@ static bool ValidateRenderPassImageBarriers(layer_data *device_data, const char const auto &img_dst_access_mask = img_barrier.dstAccessMask; if (img_dst_access_mask != (sub_dst_access_mask & img_dst_access_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - rp_handle, VALIDATION_ERROR_1b800930, "CORE", + rp_handle, VALIDATION_ERROR_1b800930, "%s: Barrier pImageMemoryBarriers[%d].dstAccessMask(0x%X) is not a subset of VkSubpassDependency " "dstAccessMask(0x%X) of subpass %d of renderPass 0x%" PRIx64 ".", funcName, i, img_dst_access_mask, sub_dst_access_mask, active_subpass, rp_handle); @@ -7276,7 +7275,7 @@ static bool ValidateRenderPassImageBarriers(layer_data *device_data, const char if (VK_QUEUE_FAMILY_IGNORED != img_barrier.srcQueueFamilyIndex || VK_QUEUE_FAMILY_IGNORED != img_barrier.dstQueueFamilyIndex) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - rp_handle, VALIDATION_ERROR_1b80093c, "CORE", + rp_handle, VALIDATION_ERROR_1b80093c, "%s: Barrier pImageMemoryBarriers[%d].srcQueueFamilyIndex is %d and " "pImageMemoryBarriers[%d].dstQueueFamilyIndex is %d but both must be VK_QUEUE_FAMILY_IGNORED.", funcName, i, img_barrier.srcQueueFamilyIndex, i, img_barrier.dstQueueFamilyIndex); @@ -7312,7 +7311,7 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch if (!rp_state->hasSelfDependency[active_subpass]) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, - VALIDATION_ERROR_1b800928, "CORE", + VALIDATION_ERROR_1b800928, "%s: Barriers cannot be set during subpass %d of renderPass 0x%" PRIx64 " with no self-dependency specified.", funcName, active_subpass, rp_handle); } else { @@ -7325,7 +7324,7 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch if ((sub_src_stage_mask != VK_PIPELINE_STAGE_ALL_COMMANDS_BIT) && (src_stage_mask != (sub_src_stage_mask & src_stage_mask))) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - rp_handle, VALIDATION_ERROR_1b80092a, "CORE", + rp_handle, VALIDATION_ERROR_1b80092a, "%s: Barrier srcStageMask(0x%X) is not a subset of VkSubpassDependency srcStageMask(0x%X) of subpass " "%d of renderPass 0x%" PRIx64 ".", funcName, src_stage_mask, sub_src_stage_mask, active_subpass, rp_handle); @@ -7333,14 +7332,14 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch if ((sub_dst_stage_mask != VK_PIPELINE_STAGE_ALL_COMMANDS_BIT) && (dst_stage_mask != (sub_dst_stage_mask & dst_stage_mask))) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - rp_handle, VALIDATION_ERROR_1b80092c, "CORE", + rp_handle, VALIDATION_ERROR_1b80092c, "%s: Barrier dstStageMask(0x%X) is not a subset of VkSubpassDependency dstStageMask(0x%X) of subpass " "%d of renderPass 0x%" PRIx64 ".", funcName, dst_stage_mask, sub_dst_stage_mask, active_subpass, rp_handle); } if (0 != buffer_mem_barrier_count) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - rp_handle, VALIDATION_ERROR_1b800934, "CORE", + rp_handle, VALIDATION_ERROR_1b800934, "%s: bufferMemoryBarrierCount is non-zero (%d) for subpass %d of renderPass 0x%" PRIx64 ".", funcName, buffer_mem_barrier_count, active_subpass, rp_handle); } @@ -7350,7 +7349,7 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch const auto &mb_src_access_mask = mem_barriers[i].srcAccessMask; if (mb_src_access_mask != (sub_src_access_mask & mb_src_access_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, VALIDATION_ERROR_1b80092e, "CORE", + VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, VALIDATION_ERROR_1b80092e, "%s: Barrier pMemoryBarriers[%d].srcAccessMask(0x%X) is not a subset of VkSubpassDependency " "srcAccessMask(0x%X) of subpass %d of renderPass 0x%" PRIx64 ".", funcName, i, mb_src_access_mask, sub_src_access_mask, active_subpass, rp_handle); @@ -7358,7 +7357,7 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch const auto &mb_dst_access_mask = mem_barriers[i].dstAccessMask; if (mb_dst_access_mask != (sub_dst_access_mask & mb_dst_access_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, VALIDATION_ERROR_1b800930, "CORE", + VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, VALIDATION_ERROR_1b800930, "%s: Barrier pMemoryBarriers[%d].dstAccessMask(0x%X) is not a subset of VkSubpassDependency " "dstAccessMask(0x%X) of subpass %d of renderPass 0x%" PRIx64 ".", funcName, i, mb_dst_access_mask, sub_dst_access_mask, active_subpass, rp_handle); @@ -7368,7 +7367,7 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch sub_src_access_mask, sub_dst_access_mask, image_mem_barrier_count, image_barriers); if (sub_dep.dependencyFlags != dependency_flags) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - rp_handle, VALIDATION_ERROR_1b800932, "CORE", + rp_handle, VALIDATION_ERROR_1b800932, "%s: dependencyFlags param (0x%X) does not equal VkSubpassDependency dependencyFlags value (0x%X) for " "subpass %d of renderPass 0x%" PRIx64 ".", funcName, dependency_flags, sub_dep.dependencyFlags, cb_state->activeSubpass, rp_handle); @@ -7519,9 +7518,8 @@ class ValidatorState { const UNIQUE_VALIDATION_ERROR_CODE val_code = val_codes_[vu_index]; const char *annotation = GetFamilyAnnotation(family); return log_msg(report_data_, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, cb_handle64_, - val_code, "DS", "%s: Barrier using %s 0x%" PRIx64 " created with sharingMode %s, has %s %u%s. %s", - func_name_, GetTypeString(), barrier_handle64_, GetModeString(), param_name, family, annotation, - vu_summary[vu_index]); + val_code, "%s: Barrier using %s 0x%" PRIx64 " created with sharingMode %s, has %s %u%s. %s", func_name_, + GetTypeString(), barrier_handle64_, GetModeString(), param_name, family, annotation, vu_summary[vu_index]); } bool LogMsg(VuIndex vu_index, uint32_t src_family, uint32_t dst_family) const { @@ -7529,7 +7527,7 @@ class ValidatorState { const char *src_annotation = GetFamilyAnnotation(src_family); const char *dst_annotation = GetFamilyAnnotation(dst_family); return log_msg(report_data_, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, cb_handle64_, - val_code, "DS", + val_code, "%s: Barrier using %s 0x%" PRIx64 " created with sharingMode %s, has srcQueueFamilyIndex %u%s and dstQueueFamilyIndex %u%s. %s", func_name_, GetTypeString(), barrier_handle64_, GetModeString(), src_family, src_annotation, dst_family, @@ -7550,7 +7548,7 @@ class ValidatorState { const char *src_annotation = val.GetFamilyAnnotation(src_family); const char *dst_annotation = val.GetFamilyAnnotation(dst_family); return log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, - HandleToUint64(queue), val_code, "DS", + HandleToUint64(queue), val_code, "%s: Barrier submitted to queue with family index %u, using %s 0x%" PRIx64 " created with sharingMode %s, has srcQueueFamilyIndex %u%s and dstQueueFamilyIndex %u%s. %s", "vkQueueSubmit", queue_family, val.GetTypeString(), val.barrier_handle64_, val.GetModeString(), @@ -7702,13 +7700,13 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB const auto &mem_barrier = pMemBarriers[i]; if (!ValidateAccessMaskPipelineStage(mem_barrier.srcAccessMask, src_stage_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800940, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800940, "%s: pMemBarriers[%d].srcAccessMask (0x%X) is not supported by srcStageMask (0x%X).", funcName, i, mem_barrier.srcAccessMask, src_stage_mask); } if (!ValidateAccessMaskPipelineStage(mem_barrier.dstAccessMask, dst_stage_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800942, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800942, "%s: pMemBarriers[%d].dstAccessMask (0x%X) is not supported by dstStageMask (0x%X).", funcName, i, mem_barrier.dstAccessMask, dst_stage_mask); } @@ -7717,13 +7715,13 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB auto mem_barrier = &pImageMemBarriers[i]; if (!ValidateAccessMaskPipelineStage(mem_barrier->srcAccessMask, src_stage_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800940, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800940, "%s: pImageMemBarriers[%d].srcAccessMask (0x%X) is not supported by srcStageMask (0x%X).", funcName, i, mem_barrier->srcAccessMask, src_stage_mask); } if (!ValidateAccessMaskPipelineStage(mem_barrier->dstAccessMask, dst_stage_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800942, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800942, "%s: pImageMemBarriers[%d].dstAccessMask (0x%X) is not supported by dstStageMask (0x%X).", funcName, i, mem_barrier->dstAccessMask, dst_stage_mask); } @@ -7733,7 +7731,7 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB if (mem_barrier->newLayout == VK_IMAGE_LAYOUT_UNDEFINED || mem_barrier->newLayout == VK_IMAGE_LAYOUT_PREINITIALIZED) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_0a00095c, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_0a00095c, "%s: Image Layout cannot be transitioned to UNDEFINED or PREINITIALIZED.", funcName); } @@ -7759,13 +7757,13 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB if (!ValidateAccessMaskPipelineStage(mem_barrier->srcAccessMask, src_stage_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800940, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800940, "%s: pBufferMemBarriers[%d].srcAccessMask (0x%X) is not supported by srcStageMask (0x%X).", funcName, i, mem_barrier->srcAccessMask, src_stage_mask); } if (!ValidateAccessMaskPipelineStage(mem_barrier->dstAccessMask, dst_stage_mask)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800942, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_1b800942, "%s: pBufferMemBarriers[%d].dstAccessMask (0x%X) is not supported by dstStageMask (0x%X).", funcName, i, mem_barrier->dstAccessMask, dst_stage_mask); } @@ -7784,14 +7782,14 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB if (mem_barrier->offset >= buffer_size) { skip |= log_msg( device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_01800946, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_01800946, "%s: Buffer Barrier 0x%" PRIx64 " has offset 0x%" PRIx64 " which is not less than total size 0x%" PRIx64 ".", funcName, HandleToUint64(mem_barrier->buffer), HandleToUint64(mem_barrier->offset), HandleToUint64(buffer_size)); } else if (mem_barrier->size != VK_WHOLE_SIZE && (mem_barrier->offset + mem_barrier->size > buffer_size)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_0180094a, "DS", + HandleToUint64(cb_state->commandBuffer), VALIDATION_ERROR_0180094a, "%s: Buffer Barrier 0x%" PRIx64 " has offset 0x%" PRIx64 " and size 0x%" PRIx64 " whose sum is greater than total size 0x%" PRIx64 ".", funcName, HandleToUint64(mem_barrier->buffer), HandleToUint64(mem_barrier->offset), @@ -7818,7 +7816,7 @@ bool validateEventStageMask(VkQueue queue, GLOBAL_CB_NODE *pCB, uint32_t eventCo auto global_event_data = GetEventNode(dev_data, event); if (!global_event_data) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT, - HandleToUint64(event), DRAWSTATE_INVALID_EVENT, "DS", + HandleToUint64(event), DRAWSTATE_INVALID_EVENT, "Event 0x%" PRIx64 " cannot be waited on if it has never been set.", HandleToUint64(event)); } else { stageMask |= global_event_data->stageMask; @@ -7829,7 +7827,7 @@ bool validateEventStageMask(VkQueue queue, GLOBAL_CB_NODE *pCB, uint32_t eventCo // but set event can be called at any time. if (sourceStageMask != stageMask && sourceStageMask != (stageMask | VK_PIPELINE_STAGE_HOST_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), VALIDATION_ERROR_1e62d401, "DS", + HandleToUint64(pCB->commandBuffer), VALIDATION_ERROR_1e62d401, "Submitting cmdbuffer with call to VkCmdWaitEvents using srcStageMask 0x%X which must be the bitwise OR of " "the stageMask parameters used in calls to vkCmdSetEvent and VK_PIPELINE_STAGE_HOST_BIT if used with " "vkSetEvent but instead is 0x%X.", @@ -7879,7 +7877,7 @@ bool CheckStageMaskQueueCompatibility(layer_data *dev_data, VkCommandBuffer comm if (stage_mask & item) { if ((supported_pipeline_stages_table[item] & queue_flags) == 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), error_code, "DL", + VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), error_code, "%s(): %s flag %s is not compatible with the queue family properties of this command buffer.", function, src_or_dest, string_VkPipelineStageFlagBits(static_cast<VkPipelineStageFlagBits>(item))); } @@ -8117,7 +8115,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPoo if (cb_state) { if (!cb_state->activeQueries.count(query)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1ae00652, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1ae00652, "Ending a query before it was started: queryPool 0x%" PRIx64 ", index %d.", HandleToUint64(queryPool), slot); } @@ -8187,7 +8185,7 @@ static bool validateQuery(VkQueue queue, GLOBAL_CB_NODE *pCB, VkQueryPool queryP for (uint32_t i = 0; i < queryCount; i++) { if (IsQueryInvalid(dev_data, queue_data, queryPool, firstQuery + i)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_QUERY, "DS", + HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_QUERY, "Requesting a copy from query to buffer with invalid query: queryPool 0x%" PRIx64 ", index %d", HandleToUint64(queryPool), firstQuery + i); } @@ -8248,9 +8246,9 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPip } skip |= validatePushConstantRange(dev_data, offset, size, "vkCmdPushConstants()"); if (0 == stageFlags) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1bc2dc03, "DS", - "vkCmdPushConstants() call has no stageFlags set."); + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1bc2dc03, "vkCmdPushConstants() call has no stageFlags set."); } // Check if pipeline_layout VkPushConstantRange(s) overlapping offset, size have stageFlags set for each stage in the command @@ -8265,7 +8263,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPip // VALIDATION_ERROR_1bc00e08 VUID-vkCmdPushConstants-offset-01796 skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), - VALIDATION_ERROR_1bc00e08, "DS", + VALIDATION_ERROR_1bc00e08, "vkCmdPushConstants(): stageFlags (0x%" PRIx32 ", offset (%" PRIu32 "), and size (%" PRIu32 "), " "must contain all stages in overlapping VkPushConstantRange stageFlags (0x%" PRIx32 @@ -8282,7 +8280,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPip // VALIDATION_ERROR_1bc00e06 VUID-vkCmdPushConstants-offset-01795 uint32_t missing_stages = ~found_stages & stageFlags; skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1bc00e06, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1bc00e06, "vkCmdPushConstants(): stageFlags = 0x%" PRIx32 ", VkPushConstantRange in pipeline layout 0x%" PRIx64 " overlapping offset = %d and size = %d, do not contain stageFlags 0x%" PRIx32 ".", (uint32_t)stageFlags, HandleToUint64(layout), offset, size, missing_stages); @@ -8333,7 +8331,7 @@ static bool MatchUsage(layer_data *dev_data, uint32_t count, const VkAttachmentR if (ici != nullptr) { if ((ici->usage & usage_flag) == 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, error_code, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, error_code, "vkCreateFramebuffer: Framebuffer Attachment (%d) conflicts with the image's " "IMAGE_USAGE flags (%s).", attachments[attach].attachment, string_VkImageUsageFlagBits(usage_flag)); @@ -8363,7 +8361,7 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf const VkRenderPassCreateInfo *rpci = rp_state->createInfo.ptr(); if (rpci->attachmentCount != pCreateInfo->attachmentCount) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - HandleToUint64(pCreateInfo->renderPass), VALIDATION_ERROR_094006d8, "DS", + HandleToUint64(pCreateInfo->renderPass), VALIDATION_ERROR_094006d8, "vkCreateFramebuffer(): VkFramebufferCreateInfo attachmentCount of %u does not match attachmentCount " "of %u of renderPass (0x%" PRIx64 ") being used to create Framebuffer.", pCreateInfo->attachmentCount, rpci->attachmentCount, HandleToUint64(pCreateInfo->renderPass)); @@ -8376,7 +8374,7 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf if (ivci.format != rpci->pAttachments[i].format) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - HandleToUint64(pCreateInfo->renderPass), VALIDATION_ERROR_094006e0, "DS", + HandleToUint64(pCreateInfo->renderPass), VALIDATION_ERROR_094006e0, "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has format of %s that does not " "match the format of %s used by the corresponding attachment for renderPass (0x%" PRIx64 ").", i, string_VkFormat(ivci.format), string_VkFormat(rpci->pAttachments[i].format), @@ -8386,7 +8384,7 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf if (ici->samples != rpci->pAttachments[i].samples) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - HandleToUint64(pCreateInfo->renderPass), VALIDATION_ERROR_094006e2, "DS", + HandleToUint64(pCreateInfo->renderPass), VALIDATION_ERROR_094006e2, "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has %s samples that do not match the %s " "samples used by the corresponding attachment for renderPass (0x%" PRIx64 ").", i, string_VkSampleCountFlagBits(ici->samples), string_VkSampleCountFlagBits(rpci->pAttachments[i].samples), @@ -8395,7 +8393,7 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf // Verify that view only has a single mip level if (ivci.subresourceRange.levelCount != 1) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, VALIDATION_ERROR_094006e6, "DS", + 0, VALIDATION_ERROR_094006e6, "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has mip levelCount of %u but " "only a single mip level (levelCount == 1) is allowed when creating a Framebuffer.", i, ivci.subresourceRange.levelCount); @@ -8406,7 +8404,7 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf if ((ivci.subresourceRange.layerCount < pCreateInfo->layers) || (mip_width < pCreateInfo->width) || (mip_height < pCreateInfo->height)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, VALIDATION_ERROR_094006e4, "DS", + 0, VALIDATION_ERROR_094006e4, "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u mip level %u has dimensions " "smaller than the corresponding framebuffer dimensions. Here are the respective dimensions for " "attachment #%u, framebuffer:\n" @@ -8421,7 +8419,7 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf ((ivci.components.b != VK_COMPONENT_SWIZZLE_IDENTITY) && (ivci.components.b != VK_COMPONENT_SWIZZLE_B)) || ((ivci.components.a != VK_COMPONENT_SWIZZLE_IDENTITY) && (ivci.components.a != VK_COMPONENT_SWIZZLE_A))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, VALIDATION_ERROR_094006e8, "DS", + 0, VALIDATION_ERROR_094006e8, "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has non-identy swizzle. All " "framebuffer attachments must have been created with the identity swizzle. Here are the actual " "swizzle values:\n" @@ -8454,21 +8452,21 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf // Verify FB dimensions are within physical device limits if (pCreateInfo->width > dev_data->phys_dev_properties.properties.limits.maxFramebufferWidth) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_094006ec, "DS", + VALIDATION_ERROR_094006ec, "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo width exceeds physical device limits. Requested " "width: %u, device max: %u\n", pCreateInfo->width, dev_data->phys_dev_properties.properties.limits.maxFramebufferWidth); } if (pCreateInfo->height > dev_data->phys_dev_properties.properties.limits.maxFramebufferHeight) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_094006f0, "DS", + VALIDATION_ERROR_094006f0, "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo height exceeds physical device limits. Requested " "height: %u, device max: %u\n", pCreateInfo->height, dev_data->phys_dev_properties.properties.limits.maxFramebufferHeight); } if (pCreateInfo->layers > dev_data->phys_dev_properties.properties.limits.maxFramebufferLayers) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_094006f4, "DS", + VALIDATION_ERROR_094006f4, "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo layers exceeds physical device limits. Requested " "layers: %u, device max: %u\n", pCreateInfo->layers, dev_data->phys_dev_properties.properties.limits.maxFramebufferLayers); @@ -8476,17 +8474,17 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf // Verify FB dimensions are greater than zero if (pCreateInfo->width <= 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_094006ea, "DS", + VALIDATION_ERROR_094006ea, "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo width must be greater than zero."); } if (pCreateInfo->height <= 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_094006ee, "DS", + VALIDATION_ERROR_094006ee, "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo height must be greater than zero."); } if (pCreateInfo->layers <= 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_094006f2, "DS", + VALIDATION_ERROR_094006f2, "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo layers must be greater than zero."); } return skip; @@ -8575,7 +8573,7 @@ static bool CheckDependencyExists(const layer_data *dev_data, const uint32_t sub if (!(FindDependency(subpass, dependent_subpasses[k], subpass_to_node, processed_nodes) || FindDependency(dependent_subpasses[k], subpass, subpass_to_node, processed_nodes))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_RENDERPASS, "DS", + DRAWSTATE_INVALID_RENDERPASS, "A dependency between subpasses %d and %d must exist but one is not specified.", subpass, dependent_subpasses[k]); result = false; @@ -8615,7 +8613,7 @@ static bool CheckPreserved(const layer_data *dev_data, const VkRenderPassCreateI } if (!has_preserved) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_RENDERPASS, "DS", + DRAWSTATE_INVALID_RENDERPASS, "Attachment %d is used by a later subpass and must be preserved in subpass %d.", attachment, index); } } @@ -8682,13 +8680,13 @@ static bool ValidateDependencies(const layer_data *dev_data, FRAMEBUFFER_STATE c for (auto other_attachment : overlapping_attachments[i]) { if (!(pCreateInfo->pAttachments[attachment].flags & VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, - HandleToUint64(framebuffer->framebuffer), VALIDATION_ERROR_12200682, "DS", + HandleToUint64(framebuffer->framebuffer), VALIDATION_ERROR_12200682, "Attachment %d aliases attachment %d but doesn't set VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT.", attachment, other_attachment); } if (!(pCreateInfo->pAttachments[other_attachment].flags & VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, - HandleToUint64(framebuffer->framebuffer), VALIDATION_ERROR_12200682, "DS", + HandleToUint64(framebuffer->framebuffer), VALIDATION_ERROR_12200682, "Attachment %d aliases attachment %d but doesn't set VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT.", other_attachment, attachment); } @@ -8726,7 +8724,7 @@ static bool ValidateDependencies(const layer_data *dev_data, FRAMEBUFFER_STATE c if (attachmentIndices.count(attachment)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_RENDERPASS, "DS", + DRAWSTATE_INVALID_RENDERPASS, "Cannot use same attachment (%u) as both color and depth output in same subpass (%u).", attachment, i); } } @@ -8778,11 +8776,11 @@ static bool CreatePassDAG(const layer_data *dev_data, const VkRenderPassCreateIn if (dependency.srcSubpass == VK_SUBPASS_EXTERNAL || dependency.dstSubpass == VK_SUBPASS_EXTERNAL) { if (dependency.srcSubpass == dependency.dstSubpass) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_RENDERPASS, "DS", "The src and dest subpasses cannot both be external."); + DRAWSTATE_INVALID_RENDERPASS, "The src and dest subpasses cannot both be external."); } } else if (dependency.srcSubpass > dependency.dstSubpass) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_RENDERPASS, "DS", + DRAWSTATE_INVALID_RENDERPASS, "Dependency graph must be specified such that an earlier pass cannot depend on a later pass."); } else if (dependency.srcSubpass == dependency.dstSubpass) { has_self_dependency[dependency.srcSubpass] = true; @@ -8816,7 +8814,7 @@ static bool ValidateAttachmentIndex(layer_data *dev_data, uint32_t attachment, u bool skip = false; if (attachment >= attachment_count && attachment != VK_ATTACHMENT_UNUSED) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_12200684, "DS", + VALIDATION_ERROR_12200684, "CreateRenderPass: %s attachment %d must be less than the total number of attachments %d.", type, attachment, attachment_count); } @@ -8831,7 +8829,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend const VkSubpassDescription &subpass = pCreateInfo->pSubpasses[i]; if (subpass.pipelineBindPoint != VK_PIPELINE_BIND_POINT_GRAPHICS) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_14000698, "DS", + VALIDATION_ERROR_14000698, "CreateRenderPass: Pipeline bind point for subpass %d must be VK_PIPELINE_BIND_POINT_GRAPHICS.", i); } @@ -8839,7 +8837,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend uint32_t attachment = subpass.pPreserveAttachments[j]; if (attachment == VK_ATTACHMENT_UNUSED) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_140006aa, "DS", + VALIDATION_ERROR_140006aa, "CreateRenderPass: Preserve attachment (%d) must not be VK_ATTACHMENT_UNUSED.", j); } else { skip |= ValidateAttachmentIndex(dev_data, attachment, pCreateInfo->attachmentCount, "Preserve"); @@ -8855,7 +8853,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend if (found) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_140006ac, "DS", + VALIDATION_ERROR_140006ac, "CreateRenderPass: subpass %u pPreserveAttachments[%u] (%u) must not be used elsewhere in the subpass.", i, j, attachment); } @@ -8878,7 +8876,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend if (!skip && attachment != VK_ATTACHMENT_UNUSED && pCreateInfo->pAttachments[attachment].samples != VK_SAMPLE_COUNT_1_BIT) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, VALIDATION_ERROR_140006a2, "DS", + 0, VALIDATION_ERROR_140006a2, "CreateRenderPass: Subpass %u requests multisample resolve into attachment %u, which must " "have VK_SAMPLE_COUNT_1_BIT but has %s.", i, attachment, string_VkSampleCountFlagBits(pCreateInfo->pAttachments[attachment].samples)); @@ -8887,7 +8885,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend if (!skip && subpass.pResolveAttachments[j].attachment != VK_ATTACHMENT_UNUSED && subpass.pColorAttachments[j].attachment == VK_ATTACHMENT_UNUSED) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, VALIDATION_ERROR_1400069e, "DS", + 0, VALIDATION_ERROR_1400069e, "CreateRenderPass: Subpass %u requests multisample resolve from attachment %u which has " "attachment=VK_ATTACHMENT_UNUSED.", i, attachment); @@ -8901,7 +8899,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend if (subpass_performs_resolve && pCreateInfo->pAttachments[attachment].samples == VK_SAMPLE_COUNT_1_BIT) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, VALIDATION_ERROR_140006a0, "DS", + 0, VALIDATION_ERROR_140006a0, "CreateRenderPass: Subpass %u requests multisample resolve from attachment %u which has " "VK_SAMPLE_COUNT_1_BIT.", i, attachment); @@ -8912,7 +8910,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend const auto &resolve_desc = pCreateInfo->pAttachments[subpass.pResolveAttachments[j].attachment]; if (color_desc.format != resolve_desc.format) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_140006a4, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_140006a4, "CreateRenderPass: Subpass %u pColorAttachments[%u] resolves to an attachment with a " "different format. color format: %u, resolve format: %u.", i, j, color_desc.format, resolve_desc.format); @@ -8925,7 +8923,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend pCreateInfo->pAttachments[subpass.pDepthStencilAttachment->attachment].samples; if (pCreateInfo->pAttachments[attachment].samples > depth_stencil_sample_count) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_14000bc4, "DS", + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_14000bc4, "CreateRenderPass: Subpass %u pColorAttachments[%u] has %s which is larger than " "depth/stencil attachment %s.", i, j, string_VkSampleCountFlagBits(pCreateInfo->pAttachments[attachment].samples), @@ -8951,7 +8949,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend if (!dev_data->extensions.vk_amd_mixed_attachment_samples && sample_count && !IsPowerOfTwo(sample_count)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0082b401, "DS", + VALIDATION_ERROR_0082b401, "CreateRenderPass: Subpass %u attempts to render to attachments with inconsistent sample counts.", i); } } @@ -9032,8 +9030,8 @@ static bool validatePrimaryCommandBuffer(const layer_data *dev_data, const GLOBA bool skip = false; if (pCB->createInfo.level != VK_COMMAND_BUFFER_LEVEL_PRIMARY) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), error_code, "DS", - "Cannot execute command %s on a secondary command buffer.", cmd_name); + HandleToUint64(pCB->commandBuffer), error_code, "Cannot execute command %s on a secondary command buffer.", + cmd_name); } return skip; } @@ -9048,7 +9046,7 @@ static bool VerifyRenderAreaBounds(const layer_data *dev_data, const VkRenderPas (pRenderPassBegin->renderArea.offset.y + pRenderPassBegin->renderArea.extent.height) > pFramebufferInfo->height) { skip |= static_cast<bool>(log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_INVALID_RENDER_AREA, "CORE", + DRAWSTATE_INVALID_RENDER_AREA, "Cannot execute a render pass with renderArea not within the bound of the framebuffer. RenderArea: x %d, y %d, width " "%d, height %d. Framebuffer: width %d, height %d.", pRenderPassBegin->renderArea.offset.x, pRenderPassBegin->renderArea.offset.y, pRenderPassBegin->renderArea.extent.width, @@ -9119,7 +9117,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, con } if (clear_op_size > pRenderPassBegin->clearValueCount) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - HandleToUint64(render_pass_state->renderPass), VALIDATION_ERROR_1200070c, "DS", + HandleToUint64(render_pass_state->renderPass), VALIDATION_ERROR_1200070c, "In vkCmdBeginRenderPass() the VkRenderPassBeginInfo struct has a clearValueCount of %u but there " "must be at least %u entries in pClearValues array to account for the highest index attachment in " "renderPass 0x%" PRIx64 @@ -9178,7 +9176,7 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpa auto subpassCount = pCB->activeRenderPass->createInfo.subpassCount; if (pCB->activeSubpass == subpassCount - 1) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1b60071a, "DS", + HandleToUint64(commandBuffer), VALIDATION_ERROR_1b60071a, "vkCmdNextSubpass(): Attempted to advance beyond final subpass."); } } @@ -9210,7 +9208,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass(VkCommandBuffer commandBuffer) { if (pCB->activeSubpass != rp_state->createInfo.subpassCount - 1) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), - VALIDATION_ERROR_1b00071c, "DS", "vkCmdEndRenderPass(): Called before reaching final subpass."); + VALIDATION_ERROR_1b00071c, "vkCmdEndRenderPass(): Called before reaching final subpass."); } for (size_t i = 0; i < rp_state->createInfo.attachmentCount; ++i) { @@ -9264,7 +9262,7 @@ static bool validateFramebuffer(layer_data *dev_data, VkCommandBuffer primaryBuf if (secondary_fb != VK_NULL_HANDLE) { if (primary_fb != secondary_fb) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(primaryBuffer), VALIDATION_ERROR_1b2000c6, "DS", + HandleToUint64(primaryBuffer), VALIDATION_ERROR_1b2000c6, "vkCmdExecuteCommands() called w/ invalid secondary command buffer 0x%" PRIx64 " which has a framebuffer 0x%" PRIx64 " that is not the same as the primary command buffer's current active framebuffer 0x%" PRIx64 ".", @@ -9273,7 +9271,7 @@ static bool validateFramebuffer(layer_data *dev_data, VkCommandBuffer primaryBuf auto fb = GetFramebufferState(dev_data, secondary_fb); if (!fb) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(primaryBuffer), DRAWSTATE_INVALID_SECONDARY_COMMAND_BUFFER, "DS", + HandleToUint64(primaryBuffer), DRAWSTATE_INVALID_SECONDARY_COMMAND_BUFFER, "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%" PRIx64 " which has invalid framebuffer 0x%" PRIx64 ".", HandleToUint64(secondaryBuffer), HandleToUint64(secondary_fb)); @@ -9295,7 +9293,7 @@ static bool validateSecondaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_ if ((cmdBufStatistics & queryPoolData->second.createInfo.pipelineStatistics) != cmdBufStatistics) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), VALIDATION_ERROR_1b2000d0, "DS", + HandleToUint64(pCB->commandBuffer), VALIDATION_ERROR_1b2000d0, "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%" PRIx64 " which has invalid active query pool 0x%" PRIx64 ". Pipeline statistics is being queried so the command buffer must have all bits set on the queryPool.", @@ -9309,7 +9307,7 @@ static bool validateSecondaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_ auto queryPoolData = dev_data->queryPoolMap.find(queryObject.pool); if (queryPoolData != dev_data->queryPoolMap.end() && activeTypes.count(queryPoolData->second.createInfo.queryType)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_SECONDARY_COMMAND_BUFFER, "DS", + HandleToUint64(pCB->commandBuffer), DRAWSTATE_INVALID_SECONDARY_COMMAND_BUFFER, "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%" PRIx64 " which has invalid active query pool 0x%" PRIx64 " of type %d but a query of that type has been started on secondary Cmd Buffer 0x%" PRIx64 ".", @@ -9322,7 +9320,7 @@ static bool validateSecondaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_ auto secondary_pool = GetCommandPoolNode(dev_data, pSubCB->createInfo.commandPool); if (primary_pool && secondary_pool && (primary_pool->queueFamilyIndex != secondary_pool->queueFamilyIndex)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pSubCB->commandBuffer), DRAWSTATE_INVALID_QUEUE_FAMILY, "DS", + HandleToUint64(pSubCB->commandBuffer), DRAWSTATE_INVALID_QUEUE_FAMILY, "vkCmdExecuteCommands(): Primary command buffer 0x%" PRIx64 " created in queue family %d has secondary command buffer 0x%" PRIx64 " created in queue family %d.", HandleToUint64(pCB->commandBuffer), primary_pool->queueFamilyIndex, HandleToUint64(pSubCB->commandBuffer), @@ -9346,7 +9344,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin if (VK_COMMAND_BUFFER_LEVEL_PRIMARY == pSubCB->createInfo.level) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCommandBuffers[i]), VALIDATION_ERROR_1b2000b0, "DS", + HandleToUint64(pCommandBuffers[i]), VALIDATION_ERROR_1b2000b0, "vkCmdExecuteCommands() called w/ Primary Cmd Buffer 0x%" PRIx64 " in element %u of pCommandBuffers array. All cmd buffers in pCommandBuffers array must be secondary.", HandleToUint64(pCommandBuffers[i]), i); @@ -9356,7 +9354,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin if (!(pSubCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCommandBuffers[i]), - VALIDATION_ERROR_1b2000c0, "DS", + VALIDATION_ERROR_1b2000c0, "vkCmdExecuteCommands(): Secondary Command Buffer (0x%" PRIx64 ") executed within render pass (0x%" PRIx64 ") must have had vkBeginCommandBuffer() called w/ " @@ -9388,7 +9386,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin if (pSubCB->in_use.load() || pCB->linkedCommandBuffers.count(pSubCB)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), - VALIDATION_ERROR_1b2000b4, "DS", + VALIDATION_ERROR_1b2000b4, "Attempt to simultaneously execute command buffer 0x%" PRIx64 " without VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set!", HandleToUint64(pCB->commandBuffer)); @@ -9397,7 +9395,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin // Warn that non-simultaneous secondary cmd buffer renders primary non-simultaneous skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCommandBuffers[i]), - DRAWSTATE_INVALID_CB_SIMULTANEOUS_USE, "DS", + DRAWSTATE_INVALID_CB_SIMULTANEOUS_USE, "vkCmdExecuteCommands(): Secondary Command Buffer (0x%" PRIx64 ") does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set and will cause primary " "command buffer (0x%" PRIx64 @@ -9410,7 +9408,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin if (!pCB->activeQueries.empty() && !dev_data->enabled_features.inheritedQueries) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCommandBuffers[i]), VALIDATION_ERROR_1b2000ca, "DS", + HandleToUint64(pCommandBuffers[i]), VALIDATION_ERROR_1b2000ca, "vkCmdExecuteCommands(): Secondary Command Buffer (0x%" PRIx64 ") cannot be submitted with a query in flight and inherited queries not supported on this device.", HandleToUint64(pCommandBuffers[i])); @@ -9468,7 +9466,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory(VkDevice device, VkDeviceMemory mem, Vk if ((dev_data->phys_dev_mem_props.memoryTypes[mem_info->alloc_info.memoryTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0) { skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), VALIDATION_ERROR_31200554, "MEM", + HandleToUint64(mem), VALIDATION_ERROR_31200554, "Mapping Memory without VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set: mem obj 0x%" PRIx64 ".", HandleToUint64(mem)); } @@ -9511,7 +9509,7 @@ static bool validateMemoryIsMapped(layer_data *dev_data, const char *funcName, u if (mem_info->mem_range.offset > pMemRanges[i].offset) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(pMemRanges[i].memory), VALIDATION_ERROR_0c20055c, "MEM", + HandleToUint64(pMemRanges[i].memory), VALIDATION_ERROR_0c20055c, "%s: Flush/Invalidate offset (" PRINTF_SIZE_T_SPECIFIER ") is less than Memory Object's offset (" PRINTF_SIZE_T_SPECIFIER ").", funcName, static_cast<size_t>(pMemRanges[i].offset), static_cast<size_t>(mem_info->mem_range.offset)); @@ -9524,7 +9522,7 @@ static bool validateMemoryIsMapped(layer_data *dev_data, const char *funcName, u (data_end < (pMemRanges[i].offset + pMemRanges[i].size))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(pMemRanges[i].memory), VALIDATION_ERROR_0c20055a, "MEM", + HandleToUint64(pMemRanges[i].memory), VALIDATION_ERROR_0c20055a, "%s: Flush/Invalidate size or offset (" PRINTF_SIZE_T_SPECIFIER ", " PRINTF_SIZE_T_SPECIFIER ") exceed the Memory Object's upper-bound (" PRINTF_SIZE_T_SPECIFIER ").", funcName, static_cast<size_t>(pMemRanges[i].offset + pMemRanges[i].size), @@ -9551,7 +9549,7 @@ static bool ValidateAndCopyNoncoherentMemoryToDriver(layer_data *dev_data, uint3 if (data[j] != NoncoherentMemoryFillValue) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem_ranges[i].memory), - MEMTRACK_INVALID_MAP, "MEM", "Memory underflow was detected on mem obj 0x%" PRIx64, + MEMTRACK_INVALID_MAP, "Memory underflow was detected on mem obj 0x%" PRIx64, HandleToUint64(mem_ranges[i].memory)); } } @@ -9559,7 +9557,7 @@ static bool ValidateAndCopyNoncoherentMemoryToDriver(layer_data *dev_data, uint3 if (data[j] != NoncoherentMemoryFillValue) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem_ranges[i].memory), - MEMTRACK_INVALID_MAP, "MEM", "Memory overflow was detected on mem obj 0x%" PRIx64, + MEMTRACK_INVALID_MAP, "Memory overflow was detected on mem obj 0x%" PRIx64, HandleToUint64(mem_ranges[i].memory)); } } @@ -9590,14 +9588,14 @@ static bool ValidateMappedMemoryRangeDeviceLimits(layer_data *dev_data, const ch uint64_t atom_size = dev_data->phys_dev_properties.properties.limits.nonCoherentAtomSize; if (SafeModulo(mem_ranges[i].offset, atom_size) != 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem_ranges->memory), VALIDATION_ERROR_0c20055e, "MEM", + HandleToUint64(mem_ranges->memory), VALIDATION_ERROR_0c20055e, "%s: Offset in pMemRanges[%d] is 0x%" PRIxLEAST64 ", which is not a multiple of VkPhysicalDeviceLimits::nonCoherentAtomSize (0x%" PRIxLEAST64 ").", func_name, i, mem_ranges[i].offset, atom_size); } if ((mem_ranges[i].size != VK_WHOLE_SIZE) && (SafeModulo(mem_ranges[i].size, atom_size) != 0)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem_ranges->memory), VALIDATION_ERROR_0c200adc, "MEM", + HandleToUint64(mem_ranges->memory), VALIDATION_ERROR_0c200adc, "%s: Size in pMemRanges[%d] is 0x%" PRIxLEAST64 ", which is not a multiple of VkPhysicalDeviceLimits::nonCoherentAtomSize (0x%" PRIxLEAST64 ").", func_name, i, mem_ranges[i].size, atom_size); @@ -9668,7 +9666,7 @@ static bool PreCallValidateBindImageMemory(layer_data *dev_data, VkImage image, // BindImageMemory but it's implied in that memory being bound must conform with VkMemoryRequirements from // vkGetImageMemoryRequirements() skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - image_handle, DRAWSTATE_INVALID_IMAGE, "DS", + image_handle, DRAWSTATE_INVALID_IMAGE, "%s: Binding memory to image 0x%" PRIx64 " but vkGetImageMemoryRequirements() has not been called on that image.", api_name, HandleToUint64(image_handle)); @@ -9690,7 +9688,7 @@ static bool PreCallValidateBindImageMemory(layer_data *dev_data, VkImage image, // Validate memory requirements alignment if (SafeModulo(memoryOffset, image_state->requirements.alignment) != 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - image_handle, VALIDATION_ERROR_17400830, "DS", + image_handle, VALIDATION_ERROR_17400830, "%s: memoryOffset is 0x%" PRIxLEAST64 " but must be an integer multiple of the VkMemoryRequirements::alignment value 0x%" PRIxLEAST64 ", returned from a call to vkGetImageMemoryRequirements with image.", @@ -9701,7 +9699,7 @@ static bool PreCallValidateBindImageMemory(layer_data *dev_data, VkImage image, // Validate memory requirements size if (image_state->requirements.size > mem_info->alloc_info.allocationSize - memoryOffset) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - image_handle, VALIDATION_ERROR_17400832, "DS", + image_handle, VALIDATION_ERROR_17400832, "%s: memory size minus memoryOffset is 0x%" PRIxLEAST64 " but must be at least as large as VkMemoryRequirements::size value 0x%" PRIxLEAST64 ", returned from a call to vkGetImageMemoryRequirements with image.", @@ -9717,7 +9715,7 @@ static bool PreCallValidateBindImageMemory(layer_data *dev_data, VkImage image, } skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - image_handle, validation_error, "DS", + image_handle, validation_error, "%s: for dedicated memory allocation 0x%" PRIxLEAST64 ", VkMemoryDedicatedAllocateInfoKHR::image 0x%" PRIXLEAST64 " must be equal to image 0x%" PRIxLEAST64 " and memoryOffset 0x%" PRIxLEAST64 " must be zero.", @@ -9828,7 +9826,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetEvent(VkDevice device, VkEvent event) { event_state->stageMask = VK_PIPELINE_STAGE_HOST_BIT; if (event_state->write_in_use) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT, - HandleToUint64(event), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + HandleToUint64(event), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "Cannot call vkSetEvent() on event 0x%" PRIx64 " that is already in use by a command buffer.", HandleToUint64(event)); } @@ -9870,7 +9868,7 @@ static bool PreCallValidateQueueBindSparse(layer_data *dev_data, VkQueue queue, if (unsignaled_semaphores.count(semaphore) || (!(signaled_semaphores.count(semaphore)) && !(pSemaphore->signaled))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, - HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "Queue 0x%" PRIx64 " is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.", HandleToUint64(queue), HandleToUint64(semaphore)); } else { @@ -9888,7 +9886,7 @@ static bool PreCallValidateQueueBindSparse(layer_data *dev_data, VkQueue queue, if (pSemaphore && pSemaphore->scope == kSyncScopeInternal) { if (signaled_semaphores.count(semaphore) || (!(unsignaled_semaphores.count(semaphore)) && pSemaphore->signaled)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, - HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "Queue 0x%" PRIx64 " is signaling semaphore 0x%" PRIx64 " that has already been signaled but not waited on by queue 0x%" PRIx64 ".", HandleToUint64(queue), HandleToUint64(semaphore), HandleToUint64(pSemaphore->signaler.first)); @@ -9908,7 +9906,7 @@ static bool PreCallValidateQueueBindSparse(layer_data *dev_data, VkQueue queue, if (!image_state->get_sparse_reqs_called || image_state->sparse_requirements.empty()) { // For now just warning if sparse image binding occurs without calling to get reqs first return log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), MEMTRACK_INVALID_STATE, "CV", + HandleToUint64(image_state->image), MEMTRACK_INVALID_STATE, "vkQueueBindSparse(): Binding sparse memory to image 0x%" PRIx64 " without first calling vkGetImageSparseMemoryRequirements[2KHR]() to retrieve requirements.", HandleToUint64(image_state->image)); @@ -9925,7 +9923,7 @@ static bool PreCallValidateQueueBindSparse(layer_data *dev_data, VkQueue queue, if (!image_state->get_sparse_reqs_called || image_state->sparse_requirements.empty()) { // For now just warning if sparse image binding occurs without calling to get reqs first return log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), MEMTRACK_INVALID_STATE, "CV", + HandleToUint64(image_state->image), MEMTRACK_INVALID_STATE, "vkQueueBindSparse(): Binding opaque sparse memory to image 0x%" PRIx64 " without first calling vkGetImageSparseMemoryRequirements[2KHR]() to retrieve requirements.", HandleToUint64(image_state->image)); @@ -9935,7 +9933,7 @@ static bool PreCallValidateQueueBindSparse(layer_data *dev_data, VkQueue queue, if (sparse_image_state->sparse_metadata_required && !sparse_image_state->sparse_metadata_bound) { // Warn if sparse image binding metadata required for image with sparse binding, but metadata not bound return log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(sparse_image_state->image), MEMTRACK_INVALID_STATE, "CV", + HandleToUint64(sparse_image_state->image), MEMTRACK_INVALID_STATE, "vkQueueBindSparse(): Binding sparse memory to image 0x%" PRIx64 " which requires a metadata aspect but no binding with VK_IMAGE_ASPECT_METADATA_BIT set was made.", HandleToUint64(sparse_image_state->image)); @@ -9965,7 +9963,7 @@ static void PostCallRecordQueueBindSparse(layer_data *dev_data, VkQueue queue, u if (!dev_data->external_sync_warning) { dev_data->external_sync_warning = true; log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - HandleToUint64(fence), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + HandleToUint64(fence), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "vkQueueBindSparse(): Signaling external fence 0x%" PRIx64 " on queue 0x%" PRIx64 " will disable validation of preceding command buffer lifecycle states and the in-use status of associated " "objects.", @@ -10040,7 +10038,7 @@ static void PostCallRecordQueueBindSparse(layer_data *dev_data, VkQueue queue, u if (!dev_data->external_sync_warning) { dev_data->external_sync_warning = true; log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, - HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + HandleToUint64(semaphore), DRAWSTATE_QUEUE_FORWARD_PROGRESS, "vkQueueBindSparse(): Signaling external semaphore 0x%" PRIx64 " on queue 0x%" PRIx64 " will disable validation of preceding command buffer lifecycle states and the in-use status of " "associated objects.", @@ -10188,7 +10186,7 @@ static bool PreCallValidateImportFence(layer_data *dev_data, VkFence fence, cons bool skip = false; if (fence_node && fence_node->scope == kSyncScopeInternal && fence_node->state == FENCE_INFLIGHT) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - HandleToUint64(fence), VALIDATION_ERROR_UNDEFINED, "DS", + HandleToUint64(fence), VALIDATION_ERROR_UNDEFINED, "Cannot call %s on fence 0x%" PRIx64 " that is currently in use.", caller_name, HandleToUint64(fence)); } return skip; @@ -10310,7 +10308,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * if (!is_supported) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_146009ec, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_146009ec, "%s: pCreateInfo->surface is not known at this time to be supported for presentation by this device. The " "vkGetPhysicalDeviceSurfaceSupportKHR() must be called beforehand, and it must return VK_TRUE support with " "this surface for at least one queue family of this device.", @@ -10321,20 +10319,20 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * if (most_recent_swapchain != old_swapchain_state || (surface_state->old_swapchain && surface_state->swapchain)) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), DRAWSTATE_SWAPCHAIN_ALREADY_EXISTS, "DS", + HandleToUint64(dev_data->device), DRAWSTATE_SWAPCHAIN_ALREADY_EXISTS, "%s: surface has an existing swapchain other than oldSwapchain", func_name)) return true; } if (old_swapchain_state && old_swapchain_state->createInfo.surface != pCreateInfo->surface) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pCreateInfo->oldSwapchain), DRAWSTATE_SWAPCHAIN_WRONG_SURFACE, "DS", + HandleToUint64(pCreateInfo->oldSwapchain), DRAWSTATE_SWAPCHAIN_WRONG_SURFACE, "%s: pCreateInfo->oldSwapchain's surface is not pCreateInfo->surface", func_name)) return true; } if ((pCreateInfo->imageExtent.width == 0) || (pCreateInfo->imageExtent.height == 0)) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_14600d32, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_14600d32, "%s: pCreateInfo->imageExtent = (%d, %d) which is illegal.", func_name, pCreateInfo->imageExtent.width, pCreateInfo->imageExtent.height)) return true; @@ -10343,7 +10341,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * auto physical_device_state = GetPhysicalDeviceState(dev_data->instance_data, dev_data->physical_device); if (physical_device_state->vkGetPhysicalDeviceSurfaceCapabilitiesKHRState == UNCALLED) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - HandleToUint64(dev_data->physical_device), DRAWSTATE_SWAPCHAIN_CREATE_BEFORE_QUERY, "DS", + HandleToUint64(dev_data->physical_device), DRAWSTATE_SWAPCHAIN_CREATE_BEFORE_QUERY, "%s: surface capabilities not retrieved for this physical device", func_name)) return true; } else { // have valid capabilities @@ -10351,7 +10349,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * // Validate pCreateInfo->minImageCount against VkSurfaceCapabilitiesKHR::{min|max}ImageCount: if (pCreateInfo->minImageCount < capabilities.minImageCount) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_146009ee, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_146009ee, "%s called with minImageCount = %d, which is outside the bounds returned by " "vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = %d, maxImageCount = %d).", func_name, pCreateInfo->minImageCount, capabilities.minImageCount, capabilities.maxImageCount)) @@ -10360,7 +10358,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * if ((capabilities.maxImageCount > 0) && (pCreateInfo->minImageCount > capabilities.maxImageCount)) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f0, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f0, "%s called with minImageCount = %d, which is outside the bounds returned by " "vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = %d, maxImageCount = %d).", func_name, pCreateInfo->minImageCount, capabilities.minImageCount, capabilities.maxImageCount)) @@ -10373,7 +10371,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * (pCreateInfo->imageExtent.height < capabilities.minImageExtent.height) || (pCreateInfo->imageExtent.height > capabilities.maxImageExtent.height)) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f4, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f4, "%s called with imageExtent = (%d,%d), which is outside the bounds returned by " "vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (%d,%d), minImageExtent = (%d,%d), " "maxImageExtent = (%d,%d).", @@ -10404,7 +10402,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * } // Log the message that we've built up: if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_146009fe, "DS", "%s.", errorString.c_str())) + HandleToUint64(dev_data->device), VALIDATION_ERROR_146009fe, "%s.", errorString.c_str())) return true; } @@ -10430,13 +10428,13 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * } // Log the message that we've built up: if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_14600a00, "DS", "%s.", errorString.c_str())) + HandleToUint64(dev_data->device), VALIDATION_ERROR_14600a00, "%s.", errorString.c_str())) return true; } // Validate pCreateInfo->imageArrayLayers against VkSurfaceCapabilitiesKHR::maxImageArrayLayers: if (pCreateInfo->imageArrayLayers > capabilities.maxImageArrayLayers) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f6, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f6, "%s called with a non-supported imageArrayLayers (i.e. %d). Maximum value is %d.", func_name, pCreateInfo->imageArrayLayers, capabilities.maxImageArrayLayers)) return true; @@ -10444,7 +10442,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * // Validate pCreateInfo->imageUsage against VkSurfaceCapabilitiesKHR::supportedUsageFlags: if (pCreateInfo->imageUsage != (pCreateInfo->imageUsage & capabilities.supportedUsageFlags)) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f8, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f8, "%s called with a non-supported pCreateInfo->imageUsage (i.e. 0x%08x). Supported flag bits are 0x%08x.", func_name, pCreateInfo->imageUsage, capabilities.supportedUsageFlags)) return true; @@ -10454,7 +10452,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * // Validate pCreateInfo values with the results of vkGetPhysicalDeviceSurfaceFormatsKHR(): if (physical_device_state->vkGetPhysicalDeviceSurfaceFormatsKHRState != QUERY_DETAILS) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), DRAWSTATE_SWAPCHAIN_CREATE_BEFORE_QUERY, "DS", + HandleToUint64(dev_data->device), DRAWSTATE_SWAPCHAIN_CREATE_BEFORE_QUERY, "%s called before calling vkGetPhysicalDeviceSurfaceFormatsKHR().", func_name)) return true; } else { @@ -10479,14 +10477,14 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * if (!foundMatch) { if (!foundFormat) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f2, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f2, "%s called with a non-supported pCreateInfo->imageFormat (i.e. %d).", func_name, pCreateInfo->imageFormat)) return true; } if (!foundColorSpace) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f2, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_146009f2, "%s called with a non-supported pCreateInfo->imageColorSpace (i.e. %d).", func_name, pCreateInfo->imageColorSpace)) return true; @@ -10499,7 +10497,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * // FIFO is required to always be supported if (pCreateInfo->presentMode != VK_PRESENT_MODE_FIFO_KHR) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), DRAWSTATE_SWAPCHAIN_CREATE_BEFORE_QUERY, "DS", + HandleToUint64(dev_data->device), DRAWSTATE_SWAPCHAIN_CREATE_BEFORE_QUERY, "%s called before calling vkGetPhysicalDeviceSurfacePresentModesKHR().", func_name)) return true; } @@ -10509,7 +10507,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * pCreateInfo->presentMode) != physical_device_state->present_modes.end(); if (!foundMatch) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_14600a02, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_14600a02, "%s called with a non-supported presentMode (i.e. %s).", func_name, string_VkPresentModeKHR(pCreateInfo->presentMode))) return true; @@ -10520,14 +10518,14 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR == pCreateInfo->presentMode) { if (!dev_data->extensions.vk_khr_shared_presentable_image) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), DRAWSTATE_EXTENSION_NOT_ENABLED, "DS", + HandleToUint64(dev_data->device), DRAWSTATE_EXTENSION_NOT_ENABLED, "%s called with presentMode %s which requires the VK_KHR_shared_presentable_image extension, which has not " "been enabled.", func_name, string_VkPresentModeKHR(pCreateInfo->presentMode))) return true; } else if (pCreateInfo->minImageCount != 1) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(dev_data->device), VALIDATION_ERROR_14600ace, "DS", + HandleToUint64(dev_data->device), VALIDATION_ERROR_14600ace, "%s called with presentMode %s, but minImageCount value is %d. For shared presentable image, minImageCount " "must be 1.", func_name, string_VkPresentModeKHR(pCreateInfo->presentMode), pCreateInfo->minImageCount)) @@ -10622,13 +10620,13 @@ static bool PreCallValidateGetSwapchainImagesKHR(layer_data *device_data, SWAPCH // Compare the preliminary value of *pSwapchainImageCount with the value this time: if (swapchain_state->vkGetSwapchainImagesKHRState == UNCALLED) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(device), SWAPCHAIN_PRIOR_COUNT, "DS", + HandleToUint64(device), SWAPCHAIN_PRIOR_COUNT, "vkGetSwapchainImagesKHR() called with non-NULL pSwapchainImageCount; but no prior positive value has " "been seen for pSwapchainImages."); } else if (*pSwapchainImageCount > swapchain_state->get_swapchain_image_count) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(device), SWAPCHAIN_INVALID_COUNT, "DS", + HandleToUint64(device), SWAPCHAIN_INVALID_COUNT, "vkGetSwapchainImagesKHR() called with non-NULL pSwapchainImageCount, and with pSwapchainImages set to a " "value (%d) that is greater than the value (%d) that was returned when pSwapchainImageCount was NULL.", *pSwapchainImageCount, swapchain_state->get_swapchain_image_count); @@ -10715,7 +10713,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf auto pSemaphore = GetSemaphoreNode(dev_data, pPresentInfo->pWaitSemaphores[i]); if (pSemaphore && !pSemaphore->signaled) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, - DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + DRAWSTATE_QUEUE_FORWARD_PROGRESS, "Queue 0x%" PRIx64 " is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.", HandleToUint64(queue), HandleToUint64(pPresentInfo->pWaitSemaphores[i])); } @@ -10727,7 +10725,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf if (pPresentInfo->pImageIndices[i] >= swapchain_data->images.size()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pPresentInfo->pSwapchains[i]), DRAWSTATE_SWAPCHAIN_INVALID_IMAGE, "DS", + HandleToUint64(pPresentInfo->pSwapchains[i]), DRAWSTATE_SWAPCHAIN_INVALID_IMAGE, "vkQueuePresentKHR: Swapchain image index too large (%u). There are only %u images in this swapchain.", pPresentInfo->pImageIndices[i], (uint32_t)swapchain_data->images.size()); } else { @@ -10743,7 +10741,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf if (!image_state->acquired) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pPresentInfo->pSwapchains[i]), DRAWSTATE_SWAPCHAIN_IMAGE_NOT_ACQUIRED, "DS", + HandleToUint64(pPresentInfo->pSwapchains[i]), DRAWSTATE_SWAPCHAIN_IMAGE_NOT_ACQUIRED, "vkQueuePresentKHR: Swapchain image index %u has not been acquired.", pPresentInfo->pImageIndices[i]); } @@ -10752,12 +10750,11 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf for (auto layout : layouts) { if ((layout != VK_IMAGE_LAYOUT_PRESENT_SRC_KHR) && (!dev_data->extensions.vk_khr_shared_presentable_image || (layout != VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR))) { - skip |= - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, - HandleToUint64(queue), VALIDATION_ERROR_11200a20, "DS", - "Images passed to present must be in layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or " - "VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR but is in %s.", - string_VkImageLayout(layout)); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, HandleToUint64(queue), VALIDATION_ERROR_11200a20, + "Images passed to present must be in layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or " + "VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR but is in %s.", + string_VkImageLayout(layout)); } } } @@ -10773,12 +10770,12 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf if (support_it == surface_state->gpu_queue_support.end()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pPresentInfo->pSwapchains[i]), DRAWSTATE_SWAPCHAIN_UNSUPPORTED_QUEUE, "DS", + HandleToUint64(pPresentInfo->pSwapchains[i]), DRAWSTATE_SWAPCHAIN_UNSUPPORTED_QUEUE, "vkQueuePresentKHR: Presenting image without calling vkGetPhysicalDeviceSurfaceSupportKHR"); } else if (!support_it->second) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pPresentInfo->pSwapchains[i]), VALIDATION_ERROR_31800a18, "DS", + HandleToUint64(pPresentInfo->pSwapchains[i]), VALIDATION_ERROR_31800a18, "vkQueuePresentKHR: Presenting image on queue that cannot present to this surface."); } } @@ -10797,7 +10794,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf if ((rect.offset.x + rect.extent.width) > swapchain_data->createInfo.imageExtent.width) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(pPresentInfo->pSwapchains[i]), - VALIDATION_ERROR_11e009da, "DS", + VALIDATION_ERROR_11e009da, "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, " "pRegion[%i].pRectangles[%i], the sum of offset.x (%i) and extent.width (%i) is greater " "than the corresponding swapchain's imageExtent.width (%i).", @@ -10806,7 +10803,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf if ((rect.offset.y + rect.extent.height) > swapchain_data->createInfo.imageExtent.height) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(pPresentInfo->pSwapchains[i]), - VALIDATION_ERROR_11e009da, "DS", + VALIDATION_ERROR_11e009da, "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, " "pRegion[%i].pRectangles[%i], the sum of offset.y (%i) and extent.height (%i) is greater " "than the corresponding swapchain's imageExtent.height (%i).", @@ -10815,7 +10812,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf if (rect.layer > swapchain_data->createInfo.imageArrayLayers) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pPresentInfo->pSwapchains[i]), VALIDATION_ERROR_11e009dc, "DS", + HandleToUint64(pPresentInfo->pSwapchains[i]), VALIDATION_ERROR_11e009dc, "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, pRegion[%i].pRectangles[%i], the layer " "(%i) is greater than the corresponding swapchain's imageArrayLayers (%i).", i, j, rect.layer, swapchain_data->createInfo.imageArrayLayers); @@ -10831,7 +10828,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(pPresentInfo->pSwapchains[0]), - VALIDATION_ERROR_118009be, "DS", + VALIDATION_ERROR_118009be, "vkQueuePresentKHR(): VkPresentTimesInfoGOOGLE.swapchainCount is %i but pPresentInfo->swapchainCount " "is %i. For VkPresentTimesInfoGOOGLE down pNext chain of VkPresentInfoKHR, " "VkPresentTimesInfoGOOGLE.swapchainCount must equal VkPresentInfoKHR.swapchainCount.", @@ -10955,7 +10952,7 @@ static bool PreCallValidateAcquireNextImageKHR(layer_data *dev_data, VkDevice de bool skip = false; if (fence == VK_NULL_HANDLE && semaphore == VK_NULL_HANDLE) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(device), DRAWSTATE_SWAPCHAIN_NO_SYNC_FOR_ACQUIRE, "DS", + HandleToUint64(device), DRAWSTATE_SWAPCHAIN_NO_SYNC_FOR_ACQUIRE, "vkAcquireNextImageKHR: Semaphore and fence cannot both be VK_NULL_HANDLE. There would be no way to " "determine the completion of this operation."); } @@ -10963,7 +10960,7 @@ static bool PreCallValidateAcquireNextImageKHR(layer_data *dev_data, VkDevice de auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); if (pSemaphore && pSemaphore->scope == kSyncScopeInternal && pSemaphore->signaled) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, - HandleToUint64(semaphore), VALIDATION_ERROR_16400a0c, "DS", + HandleToUint64(semaphore), VALIDATION_ERROR_16400a0c, "vkAcquireNextImageKHR: Semaphore must not be currently signaled or in a wait state."); } @@ -10975,7 +10972,7 @@ static bool PreCallValidateAcquireNextImageKHR(layer_data *dev_data, VkDevice de auto swapchain_data = GetSwapchainNode(dev_data, swapchain); if (swapchain_data->replaced) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(swapchain), DRAWSTATE_SWAPCHAIN_REPLACED, "DS", + HandleToUint64(swapchain), DRAWSTATE_SWAPCHAIN_REPLACED, "vkAcquireNextImageKHR: This swapchain has been replaced. The application can still present any images it " "has acquired, but cannot acquire any more."); } @@ -10987,7 +10984,7 @@ static bool PreCallValidateAcquireNextImageKHR(layer_data *dev_data, VkDevice de if (acquired_images > swapchain_data->images.size() - physical_device_state->surfaceCapabilities.minImageCount) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(swapchain), DRAWSTATE_SWAPCHAIN_TOO_MANY_IMAGES, "DS", + HandleToUint64(swapchain), DRAWSTATE_SWAPCHAIN_TOO_MANY_IMAGES, "vkAcquireNextImageKHR: Application has already acquired the maximum number of images (0x%" PRIxLEAST64 ")", acquired_images); } @@ -10995,7 +10992,7 @@ static bool PreCallValidateAcquireNextImageKHR(layer_data *dev_data, VkDevice de if (swapchain_data->images.size() == 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(swapchain), DRAWSTATE_SWAPCHAIN_IMAGES_NOT_FOUND, "DS", + HandleToUint64(swapchain), DRAWSTATE_SWAPCHAIN_IMAGES_NOT_FOUND, "vkAcquireNextImageKHR: No images found to acquire from. Application probably did not call " "vkGetSwapchainImagesKHR after swapchain creation."); } @@ -11063,14 +11060,14 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uin // Flag warning here. You can call this without having queried the count, but it may not be // robust on platforms with multiple physical devices. skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, - 0, DEVLIMITS_MISSING_QUERY_COUNT, "DL", + 0, DEVLIMITS_MISSING_QUERY_COUNT, "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 (instance_data->physical_devices_count != *pPhysicalDeviceCount) { // Having actual count match count from app is not a requirement, so this can be a warning skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, DEVLIMITS_COUNT_MISMATCH, "DL", + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, DEVLIMITS_COUNT_MISMATCH, "Call to vkEnumeratePhysicalDevices() w/ pPhysicalDeviceCount value %u, but actual count supported by " "this instance is %u.", *pPhysicalDeviceCount, instance_data->physical_devices_count); @@ -11105,7 +11102,7 @@ static bool ValidateCommonGetPhysicalDeviceQueueFamilyProperties(instance_layer_ if (UNCALLED == pd_state->vkGetPhysicalDeviceQueueFamilyPropertiesState) { skip |= log_msg( instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - HandleToUint64(pd_state->phys_device), DEVLIMITS_MISSING_QUERY_COUNT, "DL", + HandleToUint64(pd_state->phys_device), DEVLIMITS_MISSING_QUERY_COUNT, "%s is called with non-NULL pQueueFamilyProperties before obtaining pQueueFamilyPropertyCount. It is recommended " "to first call %s with NULL pQueueFamilyProperties in order to obtain the maximal pQueueFamilyPropertyCount.", caller_name, caller_name); @@ -11113,7 +11110,7 @@ static bool ValidateCommonGetPhysicalDeviceQueueFamilyProperties(instance_layer_ } else if (pd_state->queue_family_count != requested_queue_family_property_count) { skip |= log_msg( instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - HandleToUint64(pd_state->phys_device), DEVLIMITS_COUNT_MISMATCH, "DL", + HandleToUint64(pd_state->phys_device), DEVLIMITS_COUNT_MISMATCH, "%s is called with non-NULL pQueueFamilyProperties and pQueueFamilyPropertyCount value %" PRIu32 ", but the largest previously returned pQueueFamilyPropertyCount for this physicalDevice is %" PRIu32 ". It is recommended to instead receive all the properties by calling %s with pQueueFamilyPropertyCount that was " @@ -11268,7 +11265,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR s if ((surface_state) && (surface_state->swapchain)) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, - HandleToUint64(instance), VALIDATION_ERROR_26c009e4, "DS", + HandleToUint64(instance), VALIDATION_ERROR_26c009e4, "vkDestroySurfaceKHR() called before its associated VkSwapchainKHR was destroyed."); } instance_data->surface_map.erase(surface); @@ -11569,7 +11566,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica case UNCALLED: skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), - DEVLIMITS_MUST_QUERY_COUNT, "DL", + DEVLIMITS_MUST_QUERY_COUNT, "vkGetPhysicalDeviceSurfacePresentModesKHR() called with non-NULL pPresentModeCount; but no prior " "positive value has been seen for pPresentModeCount."); break; @@ -11578,7 +11575,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica if (*pPresentModeCount != prev_mode_count) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), - DEVLIMITS_COUNT_MISMATCH, "DL", + DEVLIMITS_COUNT_MISMATCH, "vkGetPhysicalDeviceSurfacePresentModesKHR() called with *pPresentModeCount (%u) that differs " "from the value (%u) that was returned when pPresentModes was NULL.", *pPresentModeCount, prev_mode_count); @@ -11631,7 +11628,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevi // previously call this function with a NULL value of pSurfaceFormats: skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), - DEVLIMITS_MUST_QUERY_COUNT, "DL", + DEVLIMITS_MUST_QUERY_COUNT, "vkGetPhysicalDeviceSurfaceFormatsKHR() called with non-NULL pSurfaceFormatCount; but no prior " "positive value has been seen for pSurfaceFormats."); break; @@ -11639,7 +11636,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevi if (prev_format_count != *pSurfaceFormatCount) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), - DEVLIMITS_COUNT_MISMATCH, "DL", + DEVLIMITS_COUNT_MISMATCH, "vkGetPhysicalDeviceSurfaceFormatsKHR() called with non-NULL pSurfaceFormatCount, and with " "pSurfaceFormats set to a value (%u) that is greater than the value (%u) that was returned " "when pSurfaceFormatCount was NULL.", @@ -11877,7 +11874,7 @@ static bool PreCallValidateEnumeratePhysicalDeviceGroups(VkInstance instance, ui // Flag warning here. You can call this without having queried the count, but it may not be // robust on platforms with multiple physical devices. skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, 0, DEVLIMITS_MISSING_QUERY_COUNT, "DL", + VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, 0, DEVLIMITS_MISSING_QUERY_COUNT, "Call sequence has vkEnumeratePhysicalDeviceGroups() w/ non-NULL " "pPhysicalDeviceGroupProperties. You should first call vkEnumeratePhysicalDeviceGroups() w/ " "NULL pPhysicalDeviceGroupProperties to query pPhysicalDeviceGroupCount."); @@ -11885,7 +11882,7 @@ static bool PreCallValidateEnumeratePhysicalDeviceGroups(VkInstance instance, ui else if (instance_data->physical_device_groups_count != *pPhysicalDeviceGroupCount) { // Having actual count match count from app is not a requirement, so this can be a warning skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, DEVLIMITS_COUNT_MISMATCH, "DL", + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, DEVLIMITS_COUNT_MISMATCH, "Call to vkEnumeratePhysicalDeviceGroups() w/ pPhysicalDeviceGroupCount value %u, but actual count " "supported by this instance is %u.", *pPhysicalDeviceGroupCount, instance_data->physical_device_groups_count); @@ -11893,7 +11890,7 @@ static bool PreCallValidateEnumeratePhysicalDeviceGroups(VkInstance instance, ui } } else { log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, 0, - DEVLIMITS_INVALID_INSTANCE, "DL", "Invalid instance (0x%" PRIx64 ") passed into vkEnumeratePhysicalDeviceGroups().", + DEVLIMITS_INVALID_INSTANCE, "Invalid instance (0x%" PRIx64 ") passed into vkEnumeratePhysicalDeviceGroups().", HandleToUint64(instance)); } @@ -12115,13 +12112,13 @@ static bool ValidateGetPhysicalDeviceDisplayPlanePropertiesKHRQuery(instance_lay if (physical_device_state->vkGetPhysicalDeviceDisplayPlanePropertiesKHRState == UNCALLED) { skip |= log_msg( instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - HandleToUint64(physicalDevice), SWAPCHAIN_GET_SUPPORTED_DISPLAYS_WITHOUT_QUERY, "DL", + HandleToUint64(physicalDevice), SWAPCHAIN_GET_SUPPORTED_DISPLAYS_WITHOUT_QUERY, "Potential problem with calling %s() without first querying vkGetPhysicalDeviceDisplayPlanePropertiesKHR.", api_name); } else { if (planeIndex >= physical_device_state->display_plane_property_count) { skip |= log_msg( instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - HandleToUint64(physicalDevice), VALIDATION_ERROR_29c009c2, "DL", + HandleToUint64(physicalDevice), VALIDATION_ERROR_29c009c2, "%s(): planeIndex must be in the range [0, %d] that was returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR. " "Do you have the plane index hardcoded?", api_name, physical_device_state->display_plane_property_count - 1); diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index 64befda5..d0a56b83 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -338,7 +338,7 @@ bool cvdescriptorset::DescriptorSetLayout::ValidateCreateInfo(const debug_report const bool push_descriptor_set = create_info->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; if (push_descriptor_set && !push_descriptor_ext) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DRAWSTATE_EXTENSION_NOT_ENABLED, "DS", + DRAWSTATE_EXTENSION_NOT_ENABLED, "Attemped to use %s in %s but its required extension %s has not been enabled.\n", "VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR", "VkDescriptorSetLayoutCreateInfo::flags", VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); @@ -353,11 +353,11 @@ bool cvdescriptorset::DescriptorSetLayout::ValidateCreateInfo(const debug_report const auto &binding_info = create_info->pBindings[i]; if (!bindings.insert(binding_info.binding).second) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0500022e, "DS", "duplicated binding number in VkDescriptorSetLayoutBinding."); + VALIDATION_ERROR_0500022e, "duplicated binding number in VkDescriptorSetLayoutBinding."); } if (!valid_type(binding_info.descriptorType)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_05000230, "DS", + VALIDATION_ERROR_05000230, "invalid type %s ,for push descriptors in VkDescriptorSetLayoutBinding entry %" PRIu32 ".", string_VkDescriptorType(binding_info.descriptorType), i); } @@ -367,7 +367,7 @@ bool cvdescriptorset::DescriptorSetLayout::ValidateCreateInfo(const debug_report if ((push_descriptor_set) && (total_descriptors > max_push_descriptors)) { const char *undefined = push_descriptor_ext ? "" : " -- undefined"; skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_05000232, "DS", + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_05000232, "for push descriptor, total descriptor count in layout (%" PRIu64 ") must not be greater than VkPhysicalDevicePushDescriptorPropertiesKHR::maxPushDescriptors (%" PRIu32 "%s).", total_descriptors, max_push_descriptors, undefined); @@ -1284,7 +1284,7 @@ bool cvdescriptorset::ValidateUpdateDescriptorSets(const debug_report_data *repo if (!set_node) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(dest_set), DRAWSTATE_INVALID_DESCRIPTOR_SET, "DS", + HandleToUint64(dest_set), DRAWSTATE_INVALID_DESCRIPTOR_SET, "Cannot call vkUpdateDescriptorSets() on descriptor set 0x%" PRIxLEAST64 " that has not been allocated.", HandleToUint64(dest_set)); } else { @@ -1292,7 +1292,7 @@ bool cvdescriptorset::ValidateUpdateDescriptorSets(const debug_report_data *repo std::string error_str; if (!set_node->ValidateWriteUpdate(report_data, &p_wds[i], &error_code, &error_str)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(dest_set), error_code, "DS", + HandleToUint64(dest_set), error_code, "vkUpdateDescriptorSets() failed write update validation for Descriptor Set 0x%" PRIx64 " with error: %s.", HandleToUint64(dest_set), error_str.c_str()); @@ -1312,7 +1312,7 @@ bool cvdescriptorset::ValidateUpdateDescriptorSets(const debug_report_data *repo std::string error_str; if (!dst_node->ValidateCopyUpdate(report_data, &p_cds[i], src_node, &error_code, &error_str)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(dst_set), error_code, "DS", + HandleToUint64(dst_set), error_code, "vkUpdateDescriptorSets() failed copy update from Descriptor Set 0x%" PRIx64 " to Descriptor Set 0x%" PRIx64 " with error: %s.", HandleToUint64(src_set), HandleToUint64(dst_set), error_str.c_str()); @@ -1871,7 +1871,7 @@ bool cvdescriptorset::ValidateAllocateDescriptorSets(const core_validation::laye if (layout) { // nullptr layout indicates no valid layout handle for this device, validated/logged in object_tracker if (layout->GetCreateFlags() & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT, - HandleToUint64(p_alloc_info->pSetLayouts[i]), VALIDATION_ERROR_04c00268, "DS", + HandleToUint64(p_alloc_info->pSetLayouts[i]), VALIDATION_ERROR_04c00268, "Layout 0x%" PRIxLEAST64 " specified at pSetLayouts[%" PRIu32 "] in vkAllocateDescriptorSets() was created with invalid flag %s set.", HandleToUint64(p_alloc_info->pSetLayouts[i]), i, @@ -1884,7 +1884,7 @@ bool cvdescriptorset::ValidateAllocateDescriptorSets(const core_validation::laye // Track number of descriptorSets allowable in this pool if (pool_state->availableSets < p_alloc_info->descriptorSetCount) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, - HandleToUint64(pool_state->pool), VALIDATION_ERROR_04c00264, "DS", + HandleToUint64(pool_state->pool), VALIDATION_ERROR_04c00264, "Unable to allocate %u descriptorSets from pool 0x%" PRIxLEAST64 ". This pool only has %d descriptorSets remaining.", p_alloc_info->descriptorSetCount, HandleToUint64(pool_state->pool), pool_state->availableSets); @@ -1893,7 +1893,7 @@ bool cvdescriptorset::ValidateAllocateDescriptorSets(const core_validation::laye for (uint32_t i = 0; i < VK_DESCRIPTOR_TYPE_RANGE_SIZE; i++) { if (ds_data->required_descriptors_by_type[i] > pool_state->availableDescriptorTypeCount[i]) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, - HandleToUint64(pool_state->pool), VALIDATION_ERROR_04c00266, "DS", + HandleToUint64(pool_state->pool), VALIDATION_ERROR_04c00266, "Unable to allocate %u descriptors of type %s from pool 0x%" PRIxLEAST64 ". This pool only has %d descriptors of this type remaining.", ds_data->required_descriptors_by_type[i], string_VkDescriptorType(VkDescriptorType(i)), diff --git a/layers/object_tracker.h b/layers/object_tracker.h index 290bc82f..c7f79619 100644 --- a/layers/object_tracker.h +++ b/layers/object_tracker.h @@ -81,9 +81,6 @@ struct ObjTrackQueueInfo { VkQueue queue; }; -// Layer name string to be logged with validation messages. -const char LayerName[] = "ObjectTracker"; - typedef std::unordered_map<uint64_t, ObjTrackState *> object_map_type; struct layer_data { @@ -184,7 +181,7 @@ bool ValidateObject(T1 dispatchable_object, T2 object, VulkanObjectType object_t // Object found on other device, report an error if object has a device parent error code if ((wrong_device_code != VALIDATION_ERROR_UNDEFINED) && (object_type != kVulkanObjectTypeSurfaceKHR)) { return log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, debug_object_type, - object_handle, wrong_device_code, LayerName, + object_handle, wrong_device_code, "Object 0x%" PRIxLEAST64 " was not created, allocated or retrieved from the correct device.", object_handle); @@ -196,8 +193,7 @@ bool ValidateObject(T1 dispatchable_object, T2 object, VulkanObjectType object_t } // Report an error if object was not found anywhere return log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, debug_object_type, object_handle, - invalid_handle_code, LayerName, "Invalid %s Object 0x%" PRIxLEAST64 ".", object_string[object_type], - object_handle); + invalid_handle_code, "Invalid %s Object 0x%" PRIxLEAST64 ".", object_string[object_type], object_handle); } } return false; @@ -213,8 +209,8 @@ void CreateObject(T1 dispatchable_object, T2 object, VulkanObjectType object_typ if (!instance_data->object_map[object_type].count(object_handle)) { VkDebugReportObjectTypeEXT debug_object_type = get_debug_report_enum[object_type]; log_msg(instance_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, debug_object_type, object_handle, OBJTRACK_NONE, - LayerName, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, object_track_index++, - object_string[object_type], object_handle); + "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, object_track_index++, object_string[object_type], + object_handle); ObjTrackState *pNewObjNode = new ObjTrackState; pNewObjNode->object_type = object_type; @@ -247,7 +243,7 @@ void DestroyObject(T1 dispatchable_object, T2 object, VulkanObjectType object_ty device_data->num_objects[pNode->object_type]--; log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, debug_object_type, object_handle, OBJTRACK_NONE, - LayerName, "OBJ_STAT Destroy %s obj 0x%" PRIxLEAST64 " (%" PRIu64 " total objs remain & %" PRIu64 " %s objs).", + "OBJ_STAT Destroy %s obj 0x%" PRIxLEAST64 " (%" PRIu64 " total objs remain & %" PRIu64 " %s objs).", object_string[object_type], HandleToUint64(object), device_data->num_total_objects, device_data->num_objects[pNode->object_type], object_string[object_type]); @@ -256,13 +252,13 @@ void DestroyObject(T1 dispatchable_object, T2 object, VulkanObjectType object_ty // This check only verifies that custom allocation callbacks were provided to both Create and Destroy calls, // it cannot verify that these allocation callbacks are compatible with each other. log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, debug_object_type, object_handle, - expected_custom_allocator_code, LayerName, + expected_custom_allocator_code, "Custom allocator not specified while destroying %s obj 0x%" PRIxLEAST64 " but specified at creation.", object_string[object_type], object_handle); } else if (!allocated_with_custom && custom_allocator && expected_default_allocator_code != VALIDATION_ERROR_UNDEFINED) { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, debug_object_type, object_handle, - expected_default_allocator_code, LayerName, + expected_default_allocator_code, "Custom allocator specified while destroying %s obj 0x%" PRIxLEAST64 " but not specified at creation.", object_string[object_type], object_handle); } @@ -271,7 +267,7 @@ void DestroyObject(T1 dispatchable_object, T2 object, VulkanObjectType object_ty device_data->object_map[object_type].erase(item); } else { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, object_handle, - OBJTRACK_UNKNOWN_OBJECT, LayerName, + OBJTRACK_UNKNOWN_OBJECT, "Unable to remove %s obj 0x%" PRIxLEAST64 ". Was it created? Has it already been destroyed?", object_string[object_type], object_handle); } diff --git a/layers/object_tracker_utils.cpp b/layers/object_tracker_utils.cpp index ec1e2149..00aa3e64 100644 --- a/layers/object_tracker_utils.cpp +++ b/layers/object_tracker_utils.cpp @@ -49,7 +49,7 @@ void AddQueueInfo(VkDevice device, uint32_t queue_node_index, VkQueue queue) { device_data->queue_info_map[queue] = p_queue_info; } else { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, - HandleToUint64(queue), OBJTRACK_INTERNAL_ERROR, LayerName, + HandleToUint64(queue), OBJTRACK_INTERNAL_ERROR, "ERROR: VK_ERROR_OUT_OF_HOST_MEMORY -- could not allocate memory for Queue Information"); } } @@ -73,7 +73,7 @@ void DestroyQueueDataStructures(VkDevice device) { assert(device_data->num_objects[obj_index] > 0); device_data->num_objects[obj_index]--; log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, - queue->second->handle, OBJTRACK_NONE, LayerName, + queue->second->handle, OBJTRACK_NONE, "OBJ_STAT Destroy Queue obj 0x%" PRIxLEAST64 " (%" PRIu64 " total objs remain & %" PRIu64 " Queue objs).", queue->second->handle, device_data->num_total_objects, device_data->num_objects[obj_index]); delete queue->second; @@ -92,7 +92,7 @@ void ValidateQueueFlags(VkQueue queue, const char *function) { if ((instance_data->queue_family_properties[pQueueInfo->queue_node_index].queueFlags & VK_QUEUE_SPARSE_BINDING_BIT) == 0) { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, - HandleToUint64(queue), VALIDATION_ERROR_31600011, LayerName, + HandleToUint64(queue), VALIDATION_ERROR_31600011, "Attempting %s on a non-memory-management capable queue -- VK_QUEUE_SPARSE_BINDING_BIT not set.", function); } } @@ -115,7 +115,7 @@ bool ValidateDeviceObject(uint64_t device_handle, enum UNIQUE_VALIDATION_ERROR_C layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(last_instance), layer_data_map); return log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, device_handle, - invalid_handle_code, LayerName, "Invalid Device Object 0x%" PRIxLEAST64 ".", device_handle); + invalid_handle_code, "Invalid Device Object 0x%" PRIxLEAST64 ".", device_handle); } void AllocateCommandBuffer(VkDevice device, const VkCommandPool command_pool, const VkCommandBuffer command_buffer, @@ -123,7 +123,7 @@ void AllocateCommandBuffer(VkDevice device, const VkCommandPool command_pool, co layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(command_buffer), OBJTRACK_NONE, LayerName, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, + HandleToUint64(command_buffer), OBJTRACK_NONE, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, object_track_index++, "VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT", HandleToUint64(command_buffer)); ObjTrackState *pNewObjNode = new ObjTrackState; @@ -150,14 +150,14 @@ bool ValidateCommandBuffer(VkDevice device, VkCommandPool command_pool, VkComman if (pNode->parent_object != HandleToUint64(command_pool)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - object_handle, VALIDATION_ERROR_28411407, LayerName, + object_handle, VALIDATION_ERROR_28411407, "FreeCommandBuffers is attempting to free Command Buffer 0x%" PRIxLEAST64 " belonging to Command Pool 0x%" PRIxLEAST64 " from pool 0x%" PRIxLEAST64 ").", HandleToUint64(command_buffer), pNode->parent_object, HandleToUint64(command_pool)); } } else { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - object_handle, VALIDATION_ERROR_28400060, LayerName, "Invalid %s Object 0x%" PRIxLEAST64 ".", + object_handle, VALIDATION_ERROR_28400060, "Invalid %s Object 0x%" PRIxLEAST64 ".", object_string[kVulkanObjectTypeCommandBuffer], object_handle); } return skip; @@ -167,7 +167,7 @@ void AllocateDescriptorSet(VkDevice device, VkDescriptorPool descriptor_pool, Vk layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - HandleToUint64(descriptor_set), OBJTRACK_NONE, LayerName, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, + HandleToUint64(descriptor_set), OBJTRACK_NONE, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, object_track_index++, "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT", HandleToUint64(descriptor_set)); ObjTrackState *pNewObjNode = new ObjTrackState; @@ -190,14 +190,14 @@ bool ValidateDescriptorSet(VkDevice device, VkDescriptorPool descriptor_pool, Vk if (pNode->parent_object != HandleToUint64(descriptor_pool)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - object_handle, VALIDATION_ERROR_28613007, LayerName, + object_handle, VALIDATION_ERROR_28613007, "FreeDescriptorSets is attempting to free descriptorSet 0x%" PRIxLEAST64 " belonging to Descriptor Pool 0x%" PRIxLEAST64 " from pool 0x%" PRIxLEAST64 ").", HandleToUint64(descriptor_set), pNode->parent_object, HandleToUint64(descriptor_pool)); } } else { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - object_handle, VALIDATION_ERROR_2860026c, LayerName, "Invalid %s Object 0x%" PRIxLEAST64 ".", + object_handle, VALIDATION_ERROR_2860026c, "Invalid %s Object 0x%" PRIxLEAST64 ".", object_string[kVulkanObjectTypeDescriptorSet], object_handle); } return skip; @@ -269,7 +269,7 @@ void CreateQueue(VkDevice device, VkQueue vkObj) { layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, - HandleToUint64(vkObj), OBJTRACK_NONE, LayerName, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, + HandleToUint64(vkObj), OBJTRACK_NONE, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, object_track_index++, "VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT", HandleToUint64(vkObj)); ObjTrackState *p_obj_node = NULL; @@ -290,7 +290,7 @@ void CreateQueue(VkDevice device, VkQueue vkObj) { void CreateSwapchainImageObject(VkDevice dispatchable_object, VkImage swapchain_image, VkSwapchainKHR swapchain) { layer_data *device_data = GetLayerDataPtr(get_dispatch_key(dispatchable_object), layer_data_map); log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(swapchain_image), OBJTRACK_NONE, LayerName, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, + HandleToUint64(swapchain_image), OBJTRACK_NONE, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, object_track_index++, "SwapchainImage", HandleToUint64(swapchain_image)); ObjTrackState *pNewObjNode = new ObjTrackState; @@ -306,8 +306,7 @@ void DeviceReportUndestroyedObjects(VkDevice device, VulkanObjectType object_typ for (auto item = device_data->object_map[object_type].begin(); item != device_data->object_map[object_type].end();) { ObjTrackState *object_info = item->second; log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[object_type], object_info->handle, - error_code, LayerName, - "OBJ ERROR : For device 0x%" PRIxLEAST64 ", %s object 0x%" PRIxLEAST64 " has not been destroyed.", + error_code, "OBJ ERROR : For device 0x%" PRIxLEAST64 ", %s object 0x%" PRIxLEAST64 " has not been destroyed.", HandleToUint64(device), object_string[object_type], object_info->handle); item = device_data->object_map[object_type].erase(item); } @@ -352,7 +351,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati VkDebugReportObjectTypeEXT debug_object_type = get_debug_report_enum[pNode->object_type]; log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, debug_object_type, pNode->handle, OBJTRACK_OBJECT_LEAK, - LayerName, "OBJ ERROR : %s object 0x%" PRIxLEAST64 " has not been destroyed.", + "OBJ ERROR : %s object 0x%" PRIxLEAST64 " has not been destroyed.", string_VkDebugReportObjectTypeEXT(debug_object_type), pNode->handle); // Report any remaining objects in LL diff --git a/layers/parameter_validation.h b/layers/parameter_validation.h index d7e52591..675d2245 100644 --- a/layers/parameter_validation.h +++ b/layers/parameter_validation.h @@ -132,9 +132,6 @@ struct GenericHeader { const void *pNext; }; -// Layer name string to be logged with validation messages. -const char LayerName[] = "ParameterValidation"; - // String returned by string_VkStructureType for an unrecognized type. const std::string UnsupportedStructureTypeString = "Unhandled VkStructureType"; @@ -154,7 +151,6 @@ struct LogMiscParams { const debug_report_data *debug_data; VkDebugReportObjectTypeEXT objectType; uint64_t srcObject; - const char *pLayerPrefix; const char *api_name; }; @@ -177,9 +173,10 @@ bool ValidateGreaterThan(const T value, const T lower_bound, const ParameterName if (value <= lower_bound) { std::ostringstream ss; - ss << misc.api_name << ": parameter " << parameter_name.get_name() << " (= " << value << ") is greater than " << lower_bound; - skip_call |= log_msg(misc.debug_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, misc.objectType, misc.srcObject, vuid, - misc.pLayerPrefix, "%s", ss.str().c_str()); + ss << misc.api_name << ": parameter " << parameter_name.get_name() << " (= " << value << ") is greater than " + << lower_bound; + skip_call |= + log_msg(misc.debug_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, misc.objectType, misc.srcObject, vuid, "%s", ss.str().c_str()); } return skip_call; @@ -207,7 +204,7 @@ static bool validate_required_pointer(debug_report_data *report_data, const char if (value == NULL) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, - LayerName, "%s: required parameter %s specified as NULL.", apiName, parameterName.get_name().c_str()); + "%s: required parameter %s specified as NULL.", apiName, parameterName.get_name().c_str()); } return skip_call; @@ -238,16 +235,16 @@ bool validate_array(debug_report_data *report_data, const char *apiName, const P // Count parameters not tagged as optional cannot be 0 if (countRequired && (count == 0)) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - count_required_vuid, LayerName, "%s: parameter %s must be greater than 0.", apiName, - countName.get_name().c_str()); + skip_call |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, count_required_vuid, + "%s: parameter %s must be greater than 0.", apiName, countName.get_name().c_str()); } // Array parameters not tagged as optional cannot be NULL, unless the count is 0 if ((array == NULL) && arrayRequired && (count != 0)) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - array_required_vuid, LayerName, "%s: required parameter %s specified as NULL.", apiName, - arrayName.get_name().c_str()); + skip_call |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, array_required_vuid, + "%s: required parameter %s specified as NULL.", apiName, arrayName.get_name().c_str()); } return skip_call; @@ -282,9 +279,9 @@ bool validate_array(debug_report_data *report_data, const char *apiName, const P if (count == NULL) { if (countPtrRequired) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, "%s: required parameter %s specified as NULL", apiName, - countName.get_name().c_str()); + skip_call |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, REQUIRED_PARAMETER, + "%s: required parameter %s specified as NULL", apiName, countName.get_name().c_str()); } } else { skip_call |= validate_array(report_data, apiName, countName, arrayName, array ? (*count) : 0, array, countValueRequired, @@ -318,14 +315,13 @@ bool validate_struct_type(debug_report_data *report_data, const char *apiName, c if (value == NULL) { if (required) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, "%s: required parameter %s specified as NULL", apiName, - parameterName.get_name().c_str()); + skip_call |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, REQUIRED_PARAMETER, + "%s: required parameter %s specified as NULL", apiName, parameterName.get_name().c_str()); } } else if (value->sType != sType) { - skip_call |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, - LayerName, "%s: parameter %s->sType must be %s.", apiName, parameterName.get_name().c_str(), sTypeName); + skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, + "%s: parameter %s->sType must be %s.", apiName, parameterName.get_name().c_str(), sTypeName); } return skip_call; @@ -364,7 +360,7 @@ bool validate_struct_type_array(debug_report_data *report_data, const char *apiN for (uint32_t i = 0; i < count; ++i) { if (array[i].sType != sType) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_STRUCT_STYPE, LayerName, "%s: parameter %s[%d].sType must be %s", apiName, + INVALID_STRUCT_STYPE, "%s: parameter %s[%d].sType must be %s", apiName, arrayName.get_name().c_str(), i, sTypeName); } } @@ -403,9 +399,9 @@ bool validate_struct_type_array(debug_report_data *report_data, const char *apiN if (count == NULL) { if (countPtrRequired) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, "%s: required parameter %s specified as NULL", apiName, - countName.get_name().c_str()); + skip_call |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, REQUIRED_PARAMETER, + "%s: required parameter %s specified as NULL", apiName, countName.get_name().c_str()); } } else { skip_call |= validate_struct_type_array(report_data, apiName, countName, arrayName, sTypeName, (*count), array, sType, @@ -431,9 +427,9 @@ bool validate_required_handle(debug_report_data *report_data, const char *api_na bool skip_call = false; if (value == VK_NULL_HANDLE) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, "%s: required parameter %s specified as VK_NULL_HANDLE", api_name, - parameter_name.get_name().c_str()); + skip_call |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, REQUIRED_PARAMETER, + "%s: required parameter %s specified as VK_NULL_HANDLE", api_name, parameter_name.get_name().c_str()); } return skip_call; @@ -474,10 +470,9 @@ bool validate_handle_array(debug_report_data *report_data, const char *api_name, // Verify that no handles in the array are VK_NULL_HANDLE for (uint32_t i = 0; i < count; ++i) { if (array[i] == VK_NULL_HANDLE) { - skip_call |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, "%s: required parameter %s[%d] specified as VK_NULL_HANDLE", api_name, - array_name.get_name().c_str(), i); + skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + REQUIRED_PARAMETER, "%s: required parameter %s[%d] specified as VK_NULL_HANDLE", api_name, + array_name.get_name().c_str(), i); } } } @@ -517,8 +512,8 @@ static bool validate_string_array(debug_report_data *report_data, const char *ap for (uint32_t i = 0; i < count; ++i) { if (array[i] == NULL) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, "%s: required parameter %s[%d] specified as NULL", - apiName, arrayName.get_name().c_str(), i); + REQUIRED_PARAMETER, "%s: required parameter %s[%d] specified as NULL", apiName, + arrayName.get_name().c_str(), i); } } } @@ -562,8 +557,8 @@ static bool validate_struct_pnext(debug_report_data *report_data, const char *ap if (allowed_type_count == 0) { std::string message = "%s: value of %s must be NULL. "; message += disclaimer; - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - vuid, LayerName, message.c_str(), api_name, parameter_name.get_name().c_str(), header_version, + skip_call |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, + message.c_str(), api_name, parameter_name.get_name().c_str(), header_version, parameter_name.get_name().c_str()); } else { const VkStructureType *start = allowed_types; @@ -576,8 +571,8 @@ static bool validate_struct_pnext(debug_report_data *report_data, const char *ap if (cycle_check.find(current->pNext) != cycle_check.end()) { std::string message = "%s: %s chain contains a cycle -- pNext pointer " PRIx64 " is repeated."; skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_STRUCT_PNEXT, LayerName, message.c_str(), api_name, - parameter_name.get_name().c_str(), reinterpret_cast<uint64_t>(next)); + INVALID_STRUCT_PNEXT, message.c_str(), api_name, parameter_name.get_name().c_str(), + reinterpret_cast<uint64_t>(next)); break; } else { cycle_check.insert(current->pNext); @@ -587,8 +582,8 @@ static bool validate_struct_pnext(debug_report_data *report_data, const char *ap if (unique_stype_check.find(current->sType) != unique_stype_check.end()) { std::string message = "%s: %s chain contains duplicate structure types: %s appears multiple times."; skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_STRUCT_PNEXT, LayerName, message.c_str(), api_name, - parameter_name.get_name().c_str(), type_name.c_str()); + INVALID_STRUCT_PNEXT, message.c_str(), api_name, parameter_name.get_name().c_str(), + type_name.c_str()); } else { unique_stype_check.insert(current->sType); } @@ -598,18 +593,17 @@ static bool validate_struct_pnext(debug_report_data *report_data, const char *ap std::string message = "%s: %s chain includes a structure with unknown VkStructureType (%d); Allowed structures are [%s]. "; message += disclaimer; - skip_call |= - log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - vuid, LayerName, message.c_str(), api_name, parameter_name.get_name().c_str(), - current->sType, allowed_struct_names, header_version, parameter_name.get_name().c_str()); + skip_call |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, + 0, vuid, message.c_str(), api_name, parameter_name.get_name().c_str(), current->sType, + allowed_struct_names, header_version, parameter_name.get_name().c_str()); } else { std::string message = "%s: %s chain includes a structure with unexpected VkStructureType %s; Allowed structures are [%s]. "; message += disclaimer; skip_call |= - log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - vuid, LayerName, message.c_str(), api_name, parameter_name.get_name().c_str(), - type_name.c_str(), allowed_struct_names, header_version, parameter_name.get_name().c_str()); + log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, + message.c_str(), api_name, parameter_name.get_name().c_str(), type_name.c_str(), + allowed_struct_names, header_version, parameter_name.get_name().c_str()); } } current = reinterpret_cast<const GenericHeader *>(current->pNext); @@ -636,9 +630,9 @@ static bool validate_bool32(debug_report_data *report_data, const char *apiName, bool skip_call = false; if ((value != VK_TRUE) && (value != VK_FALSE)) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - UNRECOGNIZED_VALUE, LayerName, "%s: value of %s (%d) is neither VK_TRUE nor VK_FALSE", apiName, - parameterName.get_name().c_str(), value); + skip_call |= + log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, UNRECOGNIZED_VALUE, + "%s: value of %s (%d) is neither VK_TRUE nor VK_FALSE", apiName, parameterName.get_name().c_str(), value); } return skip_call; @@ -669,7 +663,6 @@ bool validate_ranged_enum(debug_report_data *report_data, const char *apiName, c if (std::find(valid_values.begin(), valid_values.end(), value) == valid_values.end()) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, - LayerName, "%s: value of %s (%d) does not fall within the begin..end range of the core %s enumeration tokens and is " "not an extension added token.", apiName, parameterName.get_name().c_str(), value, enumName); @@ -713,7 +706,7 @@ static bool validate_ranged_enum_array(debug_report_data *report_data, const cha for (uint32_t i = 0; i < count; ++i) { if (std::find(valid_values.begin(), valid_values.end(), array[i]) == valid_values.end()) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - UNRECOGNIZED_VALUE, LayerName, + UNRECOGNIZED_VALUE, "%s: value of %s[%d] (%d) does not fall within the begin..end range of the core %s " "enumeration tokens and is not an extension added token", apiName, arrayName.get_name().c_str(), i, array[i], enumName); @@ -742,7 +735,7 @@ static bool validate_reserved_flags(debug_report_data *report_data, const char * if (value != 0) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, - LayerName, "%s: parameter %s must be 0.", api_name, parameter_name.get_name().c_str()); + "%s: parameter %s must be 0.", api_name, parameter_name.get_name().c_str()); } return skip_call; @@ -771,19 +764,18 @@ static bool validate_flags(debug_report_data *report_data, const char *api_name, if (value == 0) { if (flags_required) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - vuid, LayerName, "%s: value of %s must not be 0.", api_name, parameter_name.get_name().c_str()); + skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, vuid, + "%s: value of %s must not be 0.", api_name, parameter_name.get_name().c_str()); } } else if ((value & (~all_flags)) != 0) { - skip_call |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - UNRECOGNIZED_VALUE, LayerName, "%s: value of %s contains flag bits that are not recognized members of %s", - api_name, parameter_name.get_name().c_str(), flag_bits_name); - } else if (singleFlag && (std::bitset<sizeof(VkFlags) * 8>(value).count() > 1)) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - UNRECOGNIZED_VALUE, LayerName, - "%s: value of %s contains multiple members of %s when only a single value is allowed", api_name, - parameter_name.get_name().c_str(), flag_bits_name); + UNRECOGNIZED_VALUE, "%s: value of %s contains flag bits that are not recognized members of %s", + api_name, parameter_name.get_name().c_str(), flag_bits_name); + } else if (singleFlag && (std::bitset<sizeof(VkFlags) * 8>(value).count() > 1)) { + skip_call |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, UNRECOGNIZED_VALUE, + "%s: value of %s contains multiple members of %s when only a single value is allowed", api_name, + parameter_name.get_name().c_str(), flag_bits_name); } return skip_call; @@ -823,14 +815,14 @@ static bool validate_flags_array(debug_report_data *report_data, const char *api // elements in the array are allowed be 0 if (array_required) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, "%s: value of %s[%d] must not be 0", api_name, + REQUIRED_PARAMETER, "%s: value of %s[%d] must not be 0", api_name, array_name.get_name().c_str(), i); } } else if ((array[i] & (~all_flags)) != 0) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - UNRECOGNIZED_VALUE, LayerName, - "%s: value of %s[%d] contains flag bits that are not recognized members of %s", api_name, - array_name.get_name().c_str(), i, flag_bits_name); + skip_call |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + UNRECOGNIZED_VALUE, "%s: value of %s[%d] contains flag bits that are not recognized members of %s", + api_name, array_name.get_name().c_str(), i, flag_bits_name); } } } @@ -904,13 +896,12 @@ static void validate_result(debug_report_data *report_data, const char *apiName, std::string resultName = string_VkResult(result); if (resultName == UnsupportedResultString) { // Unrecognized result code - log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - FAILURE_RETURN_CODE, LayerName, "%s: returned a result code indicating that an error has occurred", apiName); + log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, FAILURE_RETURN_CODE, + "%s: returned a result code indicating that an error has occurred", apiName); } else { std::string resultDesc = get_result_description(result); - log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - FAILURE_RETURN_CODE, LayerName, "%s: returned %s, indicating that %s", apiName, resultName.c_str(), - resultDesc.c_str()); + log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, FAILURE_RETURN_CODE, + "%s: returned %s, indicating that %s", apiName, resultName.c_str(), resultDesc.c_str()); } } } diff --git a/layers/parameter_validation_utils.cpp b/layers/parameter_validation_utils.cpp index e2a48d79..3644096e 100644 --- a/layers/parameter_validation_utils.cpp +++ b/layers/parameter_validation_utils.cpp @@ -51,7 +51,7 @@ #if defined __ANDROID__ #include <android/log.h> -#define LOGCONSOLE(...) ((void)__android_log_print(ANDROID_LOG_INFO, "DS", __VA_ARGS__)) +#define LOGCONSOLE(...) ((void)__android_log_print(ANDROID_LOG_INFO, "PARAMETER_VALIDATION", __VA_ARGS__)) #else #define LOGCONSOLE(...) \ { \ @@ -137,13 +137,11 @@ static bool validate_string(debug_report_data *report_data, const char *apiName, if (result == VK_STRING_ERROR_NONE) { return skip; } else if (result & VK_STRING_ERROR_LENGTH) { - skip = log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_USAGE, LayerName, "%s: string %s exceeds max length %d", apiName, stringName.get_name().c_str(), - MaxParamCheckerStringLength); + skip = log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, INVALID_USAGE, + "%s: string %s exceeds max length %d", apiName, stringName.get_name().c_str(), MaxParamCheckerStringLength); } else if (result & VK_STRING_ERROR_BAD_DATA) { - skip = log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_USAGE, LayerName, "%s: string %s contains invalid characters or is badly formed", apiName, - stringName.get_name().c_str()); + skip = log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, INVALID_USAGE, + "%s: string %s contains invalid characters or is badly formed", apiName, stringName.get_name().c_str()); } return skip; } @@ -154,13 +152,13 @@ static bool ValidateDeviceQueueFamily(layer_data *device_data, uint32_t queue_fa 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), error_code, LayerName, + HandleToUint64(device_data->device), error_code, "%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), error_code, LayerName, + HandleToUint64(device_data->device), error_code, "%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); @@ -180,7 +178,7 @@ 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), VALIDATION_ERROR_056002e8, LayerName, + HandleToUint64(device_data->device), VALIDATION_ERROR_056002e8, "%s: %s (=%" PRIu32 ") is not unique within %s array.", cmd_name, parameter_name.c_str(), queue_families[i], array_parameter_name); } else { @@ -448,7 +446,7 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi if (maint1 && negative_viewport) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_056002ec, LayerName, + VALIDATION_ERROR_056002ec, "VkDeviceCreateInfo->ppEnabledExtensionNames must not simultaneously include VK_KHR_maintenance1 and " "VK_AMD_negative_viewport_height."); } @@ -459,7 +457,7 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi if (features2) { // Cannot include VkPhysicalDeviceFeatures2KHR and have non-null pEnabledFeatures skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_USAGE, LayerName, + INVALID_USAGE, "VkDeviceCreateInfo->pNext includes a VkPhysicalDeviceFeatures2KHR struct when " "pCreateInfo->pEnabledFeatures is non-NULL."); } @@ -474,7 +472,7 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi if (requested_queue_family == VK_QUEUE_FAMILY_IGNORED) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), - VALIDATION_ERROR_06c002fa, LayerName, + VALIDATION_ERROR_06c002fa, "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, but it is required to provide a valid queue family " "index value.", @@ -482,7 +480,7 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi } 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), - VALIDATION_ERROR_056002e8, LayerName, + VALIDATION_ERROR_056002e8, "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueFamilyIndex (=%" PRIu32 ") is not unique within pCreateInfo->pQueueCreateInfos array.", i, requested_queue_family); @@ -496,7 +494,7 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi if (!(queue_priority >= 0.f) || !(queue_priority <= 1.f)) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), - VALIDATION_ERROR_06c002fe, LayerName, + VALIDATION_ERROR_06c002fe, "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].pQueuePriorities[%" PRIu32 "] (=%f) is not between 0 and 1 (inclusive).", i, j, queue_priority); @@ -624,7 +622,7 @@ bool pv_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t qu const auto &queue_data = device_data->queueFamilyIndexMap.find(queueFamilyIndex); if (queue_data != device_data->queueFamilyIndexMap.end() && queue_data->second <= queueIndex) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(device), VALIDATION_ERROR_29600302, LayerName, + HandleToUint64(device), VALIDATION_ERROR_29600302, "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 ").", @@ -667,7 +665,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryP if ((pCreateInfo->queryType == VK_QUERY_TYPE_PIPELINE_STATISTICS) && (pCreateInfo->pipelineStatistics != 0) && ((pCreateInfo->pipelineStatistics & (~AllVkQueryPipelineStatisticFlagBits)) != 0)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_11c00630, LayerName, + VALIDATION_ERROR_11c00630, "vkCreateQueryPool(): if pCreateInfo->queryType is VK_QUERY_TYPE_PIPELINE_STATISTICS, " "pCreateInfo->pipelineStatistics must be a valid combination of VkQueryPipelineStatisticFlagBits " "values."); @@ -757,7 +755,7 @@ bool pv_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, c layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); debug_report_data *report_data = device_data->report_data; - const LogMiscParams log_misc{report_data, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, VK_NULL_HANDLE, LayerName, "vkCreateBuffer"}; + const LogMiscParams log_misc{report_data, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, VK_NULL_HANDLE, "vkCreateBuffer"}; if (pCreateInfo != nullptr) { skip |= ValidateGreaterThanZero(pCreateInfo->size, "pCreateInfo->size", VALIDATION_ERROR_01400720, log_misc); @@ -767,7 +765,7 @@ bool pv_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, c // If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1 if (pCreateInfo->queueFamilyIndexCount <= 1) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_01400724, LayerName, + VALIDATION_ERROR_01400724, "vkCreateBuffer: if pCreateInfo->sharingMode is VK_SHARING_MODE_CONCURRENT, " "pCreateInfo->queueFamilyIndexCount must be greater than 1."); } @@ -776,7 +774,7 @@ bool pv_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, c // queueFamilyIndexCount uint32_t values if (pCreateInfo->pQueueFamilyIndices == nullptr) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_01400722, LayerName, + VALIDATION_ERROR_01400722, "vkCreateBuffer: if pCreateInfo->sharingMode is VK_SHARING_MODE_CONCURRENT, " "pCreateInfo->pQueueFamilyIndices must be a pointer to an array of " "pCreateInfo->queueFamilyIndexCount uint32_t values."); @@ -792,7 +790,7 @@ bool pv_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, c if (((pCreateInfo->flags & (VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT)) != 0) && ((pCreateInfo->flags & VK_BUFFER_CREATE_SPARSE_BINDING_BIT) != VK_BUFFER_CREATE_SPARSE_BINDING_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_0140072c, LayerName, + VALIDATION_ERROR_0140072c, "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."); } @@ -807,13 +805,12 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); debug_report_data *report_data = device_data->report_data; - const LogMiscParams log_misc{report_data, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, VK_NULL_HANDLE, LayerName, "vkCreateImage"}; + const LogMiscParams log_misc{report_data, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, VK_NULL_HANDLE, "vkCreateImage"}; if (pCreateInfo != nullptr) { if ((device_data->physical_device_features.textureCompressionETC2 == false) && FormatIsCompressed_ETC2_EAC(pCreateInfo->format)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DEVICE_FEATURE, LayerName, + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DEVICE_FEATURE, "vkCreateImage(): Attempting to create VkImage with format %s. The textureCompressionETC2 feature is " "not enabled: neither ETC2 nor EAC formats can be used to create images.", string_VkFormat(pCreateInfo->format)); @@ -821,16 +818,14 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if ((device_data->physical_device_features.textureCompressionASTC_LDR == false) && FormatIsCompressed_ASTC_LDR(pCreateInfo->format)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DEVICE_FEATURE, LayerName, + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DEVICE_FEATURE, "vkCreateImage(): Attempting to create VkImage with format %s. The textureCompressionASTC_LDR feature " "is not enabled: ASTC formats cannot be used to create images.", string_VkFormat(pCreateInfo->format)); } if ((device_data->physical_device_features.textureCompressionBC == false) && FormatIsCompressed_BC(pCreateInfo->format)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DEVICE_FEATURE, LayerName, + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DEVICE_FEATURE, "vkCreateImage(): Attempting to create VkImage with format %s. The textureCompressionBC feature is not " "enabled: BC compressed formats cannot be used to create images.", string_VkFormat(pCreateInfo->format)); @@ -841,7 +836,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con // If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1 if (pCreateInfo->queueFamilyIndexCount <= 1) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e0075c, LayerName, + VALIDATION_ERROR_09e0075c, "vkCreateImage(): if pCreateInfo->sharingMode is VK_SHARING_MODE_CONCURRENT, " "pCreateInfo->queueFamilyIndexCount must be greater than 1."); } @@ -850,14 +845,14 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con // queueFamilyIndexCount uint32_t values if (pCreateInfo->pQueueFamilyIndices == nullptr) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e0075a, LayerName, + VALIDATION_ERROR_09e0075a, "vkCreateImage(): if pCreateInfo->sharingMode is VK_SHARING_MODE_CONCURRENT, " "pCreateInfo->pQueueFamilyIndices must be a pointer to an array of " "pCreateInfo->queueFamilyIndexCount uint32_t values."); } else { - skip |= ValidateQueueFamilies(device_data, pCreateInfo->queueFamilyIndexCount, pCreateInfo->pQueueFamilyIndices, - "vkCreateImage", "pCreateInfo->pQueueFamilyIndices", INVALID_USAGE, INVALID_USAGE, - false); + skip |= + ValidateQueueFamilies(device_data, pCreateInfo->queueFamilyIndexCount, pCreateInfo->pQueueFamilyIndices, + "vkCreateImage", "pCreateInfo->pQueueFamilyIndices", INVALID_USAGE, INVALID_USAGE, false); } } @@ -875,8 +870,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if ((pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_UNDEFINED) && (pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_PREINITIALIZED)) { skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e007c2, LayerName, + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_09e007c2, "vkCreateImage(): initialLayout is %s, must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED.", string_VkImageLayout(pCreateInfo->initialLayout)); } @@ -885,7 +879,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if ((pCreateInfo->imageType == VK_IMAGE_TYPE_1D) && ((pCreateInfo->extent.height != 1) || (pCreateInfo->extent.depth != 1))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e00778, LayerName, + VALIDATION_ERROR_09e00778, "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_1D, both pCreateInfo->extent.height and " "pCreateInfo->extent.depth must be 1."); } @@ -894,7 +888,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con 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, VALIDATION_ERROR_09e00774, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_09e00774, "vkCreateImage(): pCreateInfo->flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, but " "pCreateInfo->extent.width (=%" PRIu32 ") and pCreateInfo->extent.height (=%" PRIu32 ") are not equal.", @@ -903,7 +897,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con 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, VALIDATION_ERROR_09e00774, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_09e00774, "vkCreateImage(): pCreateInfo->flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, but " "pCreateInfo->arrayLayers (=%" PRIu32 ") is not greater than or equal to 6.", pCreateInfo->arrayLayers); @@ -911,19 +905,18 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con } if (pCreateInfo->extent.depth != 1) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e0077a, LayerName, - "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_2D, pCreateInfo->extent.depth must be 1."); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + VALIDATION_ERROR_09e0077a, + "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_2D, pCreateInfo->extent.depth must be 1."); } } // 3D image may have only 1 layer if ((pCreateInfo->imageType == VK_IMAGE_TYPE_3D) && (pCreateInfo->arrayLayers != 1)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e00782, LayerName, - "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_3D, pCreateInfo->arrayLayers must be 1."); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + 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. @@ -931,7 +924,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con ((pCreateInfo->imageType != VK_IMAGE_TYPE_2D) || (pCreateInfo->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) || (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, - VALIDATION_ERROR_09e00784, LayerName, + VALIDATION_ERROR_09e00784, "vkCreateImage(): Multi-sample image with incompatible type, usage, tiling, or mips."); } @@ -941,14 +934,14 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con // At least one of the legal attachment bits must be set 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, - VALIDATION_ERROR_09e0078c, LayerName, + 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, - VALIDATION_ERROR_09e00786, LayerName, + VALIDATION_ERROR_09e00786, "vkCreateImage(): Transient attachment image with incompatible usage flags set."); } } @@ -956,16 +949,15 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con // mipLevels must be less than or equal to floor(log2(max(extent.width,extent.height,extent.depth)))+1 uint32_t maxDim = std::max(std::max(pCreateInfo->extent.width, pCreateInfo->extent.height), pCreateInfo->extent.depth); if (maxDim > 0 && pCreateInfo->mipLevels > (floor(log2(maxDim)) + 1)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - 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."); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_09e0077c, + "vkCreateImage(): pCreateInfo->mipLevels must be less than or equal to " + "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, - VALIDATION_ERROR_09e00792, LayerName, + VALIDATION_ERROR_09e00792, "vkCreateImage(): pCreateInfo->flags contains VK_IMAGE_CREATE_SPARSE_BINDING_BIT, but the " "VkPhysicalDeviceFeatures::sparseBinding feature is disabled."); } @@ -975,7 +967,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if (((pCreateInfo->flags & (VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT | VK_IMAGE_CREATE_SPARSE_ALIASED_BIT)) != 0) && ((pCreateInfo->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) != VK_IMAGE_CREATE_SPARSE_BINDING_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e007b6, LayerName, + VALIDATION_ERROR_09e007b6, "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."); } @@ -984,16 +976,16 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if ((pCreateInfo->flags & VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT) != 0) { // Linear tiling is unsupported if (VK_IMAGE_TILING_LINEAR == pCreateInfo->tiling) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_USAGE, LayerName, - "vkCreateImage: if pCreateInfo->flags contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT then image " - "tiling of VK_IMAGE_TILING_LINEAR is not supported"); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, INVALID_USAGE, + "vkCreateImage: if pCreateInfo->flags contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT then image " + "tiling of VK_IMAGE_TILING_LINEAR is not supported"); } // Sparse 1D image isn't valid 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, - VALIDATION_ERROR_09e00794, LayerName, + VALIDATION_ERROR_09e00794, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 1D image."); } @@ -1001,7 +993,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if ((VK_FALSE == device_data->physical_device_features.sparseResidencyImage2D) && (VK_IMAGE_TYPE_2D == pCreateInfo->imageType)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e00796, LayerName, + VALIDATION_ERROR_09e00796, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 2D image if corresponding " "feature is not enabled on the device."); } @@ -1010,7 +1002,7 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if ((VK_FALSE == device_data->physical_device_features.sparseResidencyImage3D) && (VK_IMAGE_TYPE_3D == pCreateInfo->imageType)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e00798, LayerName, + VALIDATION_ERROR_09e00798, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 3D image if corresponding " "feature is not enabled on the device."); } @@ -1020,25 +1012,25 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if ((VK_FALSE == device_data->physical_device_features.sparseResidency2Samples) && (VK_SAMPLE_COUNT_2_BIT == pCreateInfo->samples)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_09e0079a, LayerName, + VALIDATION_ERROR_09e0079a, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 2-sample image if " "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, - VALIDATION_ERROR_09e0079c, LayerName, + VALIDATION_ERROR_09e0079c, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 4-sample image if " "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, - VALIDATION_ERROR_09e0079e, LayerName, + VALIDATION_ERROR_09e0079e, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 8-sample image if " "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, - VALIDATION_ERROR_09e007a0, LayerName, + VALIDATION_ERROR_09e007a0, "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 16-sample image if " "corresponding feature is not enabled on the device."); } @@ -1059,7 +1051,7 @@ bool pv_vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateI if ((pCreateInfo->subresourceRange.layerCount != 1) && (pCreateInfo->subresourceRange.layerCount != VK_REMAINING_ARRAY_LAYERS)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, 1, - LayerName, + "vkCreateImageView: if pCreateInfo->viewType is VK_IMAGE_TYPE_%dD, " "pCreateInfo->subresourceRange.layerCount must be 1", ((pCreateInfo->viewType == VK_IMAGE_VIEW_TYPE_1D) ? 1 : 2)); @@ -1069,7 +1061,7 @@ bool pv_vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateI if ((pCreateInfo->subresourceRange.layerCount < 1) && (pCreateInfo->subresourceRange.layerCount != VK_REMAINING_ARRAY_LAYERS)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, 1, - LayerName, + "vkCreateImageView: if pCreateInfo->viewType is VK_IMAGE_TYPE_%dD_ARRAY, " "pCreateInfo->subresourceRange.layerCount must be >= 1", ((pCreateInfo->viewType == VK_IMAGE_VIEW_TYPE_1D_ARRAY) ? 1 : 2)); @@ -1078,7 +1070,7 @@ bool pv_vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateI if ((pCreateInfo->subresourceRange.layerCount != 6) && (pCreateInfo->subresourceRange.layerCount != VK_REMAINING_ARRAY_LAYERS)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, 1, - LayerName, + "vkCreateImageView: if pCreateInfo->viewType is VK_IMAGE_TYPE_CUBE, " "pCreateInfo->subresourceRange.layerCount must be 6"); } @@ -1086,18 +1078,18 @@ bool pv_vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateI if (((pCreateInfo->subresourceRange.layerCount == 0) || ((pCreateInfo->subresourceRange.layerCount % 6) != 0)) && (pCreateInfo->subresourceRange.layerCount != VK_REMAINING_ARRAY_LAYERS)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, 1, - LayerName, + "vkCreateImageView: if pCreateInfo->viewType is VK_IMAGE_TYPE_CUBE_ARRAY, " "pCreateInfo->subresourceRange.layerCount must be a multiple of 6"); } if (!device_data->physical_device_features.imageCubeArray) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, 1, - LayerName, "vkCreateImageView: Device feature imageCubeArray not enabled."); + "vkCreateImageView: Device feature imageCubeArray not enabled."); } } else if (pCreateInfo->viewType == VK_IMAGE_VIEW_TYPE_3D) { if (pCreateInfo->subresourceRange.baseArrayLayer != 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, 1, - LayerName, + "vkCreateImageView: if pCreateInfo->viewType is VK_IMAGE_TYPE_3D, " "pCreateInfo->subresourceRange.baseArrayLayer must be 0"); } @@ -1105,7 +1097,7 @@ bool pv_vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateI if ((pCreateInfo->subresourceRange.layerCount != 1) && (pCreateInfo->subresourceRange.layerCount != VK_REMAINING_ARRAY_LAYERS)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, 1, - LayerName, + "vkCreateImageView: if pCreateInfo->viewType is VK_IMAGE_TYPE_3D, " "pCreateInfo->subresourceRange.layerCount must be 1"); } @@ -1155,14 +1147,14 @@ 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, VALIDATION_ERROR_15000dd4, - LayerName, "%s: %s.width (=%f) is not greater than 0.0.", fn_name, param_name, viewport.width); + "%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, VALIDATION_ERROR_15000dd6, - LayerName, "%s: %s.width (=%f) exceeds VkPhysicalDeviceLimits::maxViewportDimensions[0] (=%" PRIu32 ").", - fn_name, param_name, viewport.width, max_w); + "%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, NONE, LayerName, + skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, object_type, object, NONE, "%s: %s.width (=%f) technically exceeds VkPhysicalDeviceLimits::maxViewportDimensions[0] (=%" PRIu32 "), but it is within the static_cast<float>(maxViewportDimensions[0]) limit.", fn_name, param_name, viewport.width, max_w); @@ -1178,19 +1170,19 @@ 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, VALIDATION_ERROR_15000dd8, - LayerName, "%s: %s.height (=%f) is not greater 0.0.", fn_name, param_name, viewport.height); + "%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, VALIDATION_ERROR_15000dda, LayerName, - "%s: Absolute value of %s.height (=%f) exceeds VkPhysicalDeviceLimits::maxViewportDimensions[1] (=%" PRIu32 ").", - fn_name, param_name, viewport.height, max_h); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, 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, NONE, LayerName, + report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, object_type, object, NONE, "%s: Absolute value of %s.height (=%f) technically exceeds VkPhysicalDeviceLimits::maxViewportDimensions[1] (=%" PRIu32 "), but it is within the static_cast<float>(maxViewportDimensions[1]) limit.", fn_name, param_name, viewport.height, max_h); @@ -1201,19 +1193,19 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co 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, 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]); + "%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 if (x_healthy && width_healthy) { const float right_bound = viewport.x + viewport.width; if (!(right_bound <= device_data->device_limits.viewportBoundsRange[1])) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, VALIDATION_ERROR_150009a0, LayerName, - "%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]); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, VALIDATION_ERROR_150009a0, + "%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]); } } @@ -1222,13 +1214,13 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co 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, 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]); + "%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, 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]); + "%s: %s.y (=%f) exceeds VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f).", fn_name, param_name, + viewport.y, device_data->device_limits.viewportBoundsRange[1]); } // y + height @@ -1236,13 +1228,13 @@ 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, 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]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, VALIDATION_ERROR_150009a2, + "%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, VALIDATION_ERROR_15000de2, LayerName, + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, 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]); } @@ -1252,7 +1244,7 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co // minDepth if (!(viewport.minDepth >= 0.0) || !(viewport.minDepth <= 1.0)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, 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.", fn_name, param_name, viewport.minDepth); @@ -1261,7 +1253,7 @@ bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, co // maxDepth if (!(viewport.maxDepth >= 0.0) || !(viewport.maxDepth <= 1.0)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, 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.", fn_name, param_name, viewport.maxDepth); @@ -1306,7 +1298,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache auto const &vertex_bind_desc = vertex_input_state->pVertexBindingDescriptions[d]; if (vertex_bind_desc.binding >= device_data->device_limits.maxVertexInputBindings) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_14c004d4, LayerName, + VALIDATION_ERROR_14c004d4, "vkCreateGraphicsPipelines: parameter " "pCreateInfos[%u].pVertexInputState->pVertexBindingDescriptions[%u].binding (%u) is " "greater than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings (%u).", @@ -1315,7 +1307,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (vertex_bind_desc.stride > device_data->device_limits.maxVertexInputBindingStride) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_14c004d6, LayerName, + VALIDATION_ERROR_14c004d6, "vkCreateGraphicsPipelines: parameter " "pCreateInfos[%u].pVertexInputState->pVertexBindingDescriptions[%u].stride (%u) is greater " "than VkPhysicalDeviceLimits::maxVertexInputBindingStride (%u).", @@ -1327,7 +1319,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache auto const &vertex_attrib_desc = vertex_input_state->pVertexAttributeDescriptions[d]; if (vertex_attrib_desc.location >= device_data->device_limits.maxVertexInputAttributes) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_14a004d8, LayerName, + VALIDATION_ERROR_14a004d8, "vkCreateGraphicsPipelines: parameter " "pCreateInfos[%u].pVertexInputState->pVertexAttributeDescriptions[%u].location (%u) is " "greater than or equal to VkPhysicalDeviceLimits::maxVertexInputAttributes (%u).", @@ -1336,7 +1328,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (vertex_attrib_desc.binding >= device_data->device_limits.maxVertexInputBindings) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_14a004da, LayerName, + VALIDATION_ERROR_14a004da, "vkCreateGraphicsPipelines: parameter " "pCreateInfos[%u].pVertexInputState->pVertexAttributeDescriptions[%u].binding (%u) is " "greater than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings (%u).", @@ -1344,13 +1336,12 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache } 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, - 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); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + VALIDATION_ERROR_14a004dc, + "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); } } } @@ -1371,7 +1362,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (has_control && has_eval) { if (pCreateInfos[i].pTessellationState == nullptr) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_096005b6, LayerName, + VALIDATION_ERROR_096005b6, "vkCreateGraphicsPipelines: if pCreateInfos[%d].pStages includes a tessellation control " "shader stage and a tessellation evaluation shader stage, " "pCreateInfos[%d].pTessellationState must not be NULL.", @@ -1390,7 +1381,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (pCreateInfos[i].pTessellationState->sType != VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1082b00b, LayerName, + VALIDATION_ERROR_1082b00b, "vkCreateGraphicsPipelines: parameter pCreateInfos[%d].pTessellationState->sType must " "be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO.", i); @@ -1400,7 +1391,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache pCreateInfos[i].pTessellationState->patchControlPoints > device_data->device_limits.maxTessellationPatchSize) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1080097c, LayerName, + VALIDATION_ERROR_1080097c, "vkCreateGraphicsPipelines: invalid parameter " "pCreateInfos[%d].pTessellationState->patchControlPoints value %u. patchControlPoints " "should be >0 and <=%u.", @@ -1416,7 +1407,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache (pCreateInfos[i].pRasterizationState->rasterizerDiscardEnable == VK_FALSE)) { if (pCreateInfos[i].pViewportState == nullptr) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, VALIDATION_ERROR_096005dc, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_096005dc, "vkCreateGraphicsPipelines: Rasterization is enabled (pCreateInfos[%" PRIu32 "].pRasterizationState->rasterizerDiscardEnable is VK_FALSE), but pCreateInfos[%" PRIu32 "].pViewportState (=NULL) is not a valid pointer.", @@ -1426,7 +1417,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (viewport_state.sType != VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, VALIDATION_ERROR_10c2b00b, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_10c2b00b, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pViewportState->sType is not VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO.", i); @@ -1450,7 +1441,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (!device_data->physical_device_features.multiViewport) { if (viewport_state.viewportCount != 1) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, VALIDATION_ERROR_10c00980, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_10c00980, "vkCreateGraphicsPipelines: The VkPhysicalDeviceFeatures::multiViewport feature is " "disabled, but pCreateInfos[%" PRIu32 "].pViewportState->viewportCount (=%" PRIu32 ") is not 1.", @@ -1459,7 +1450,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (viewport_state.scissorCount != 1) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, VALIDATION_ERROR_10c00982, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_10c00982, "vkCreateGraphicsPipelines: The VkPhysicalDeviceFeatures::multiViewport feature is " "disabled, but pCreateInfos[%" PRIu32 "].pViewportState->scissorCount (=%" PRIu32 ") is not 1.", @@ -1469,11 +1460,11 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache 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, VALIDATION_ERROR_10c30a1b, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_10c30a1b, "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, VALIDATION_ERROR_10c00984, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_10c00984, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pViewportState->viewportCount (=%" PRIu32 ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 ").", @@ -1483,11 +1474,11 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache 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, VALIDATION_ERROR_10c2b61b, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_10c2b61b, "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, VALIDATION_ERROR_10c00986, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_10c00986, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pViewportState->scissorCount (=%" PRIu32 ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 ").", @@ -1498,7 +1489,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache 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, VALIDATION_ERROR_10c00988, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_10c00988, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pViewportState->scissorCount (=%" PRIu32 ") is not identical to pCreateInfos[%" PRIu32 "].pViewportState->viewportCount (=%" PRIu32 ").", i, viewport_state.scissorCount, i, viewport_state.viewportCount); @@ -1507,7 +1498,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (!has_dynamic_viewport && viewport_state.viewportCount > 0 && viewport_state.pViewports == nullptr) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, VK_NULL_HANDLE, - VALIDATION_ERROR_096005d6, LayerName, + VALIDATION_ERROR_096005d6, "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.", @@ -1517,7 +1508,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (!has_dynamic_scissor && viewport_state.scissorCount > 0 && viewport_state.pScissors == nullptr) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, VK_NULL_HANDLE, - VALIDATION_ERROR_096005d8, LayerName, + VALIDATION_ERROR_096005d8, "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.", @@ -1538,7 +1529,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (has_dynamic_viewport_w_scaling_nv && !device_data->extensions.vk_nv_clip_space_w_scaling) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, EXTENSION_NOT_ENABLED, LayerName, + VK_NULL_HANDLE, EXTENSION_NOT_ENABLED, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pDynamicState->pDynamicStates contains VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, but " "VK_NV_clip_space_w_scaling extension is not enabled.", @@ -1547,7 +1538,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (has_dynamic_discard_rectangle_ext && !device_data->extensions.vk_ext_discard_rectangles) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, EXTENSION_NOT_ENABLED, LayerName, + VK_NULL_HANDLE, EXTENSION_NOT_ENABLED, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pDynamicState->pDynamicStates contains VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, but " "VK_EXT_discard_rectangles extension is not enabled.", @@ -1556,7 +1547,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (has_dynamic_sample_locations_ext && !device_data->extensions.vk_ext_sample_locations) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - VK_NULL_HANDLE, EXTENSION_NOT_ENABLED, LayerName, + VK_NULL_HANDLE, EXTENSION_NOT_ENABLED, "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 "].pDynamicState->pDynamicStates contains VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, but " "VK_EXT_sample_locations extension is not enabled.", @@ -1566,7 +1557,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (pCreateInfos[i].pMultisampleState == nullptr) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_096005de, LayerName, + VALIDATION_ERROR_096005de, "vkCreateGraphicsPipelines: if pCreateInfos[%d].pRasterizationState->rasterizerDiscardEnable " "is VK_FALSE, pCreateInfos[%d].pMultisampleState must not be NULL.", i, i); @@ -1612,7 +1603,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (pCreateInfos[i].pMultisampleState->sType != VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_STRUCT_STYPE, LayerName, + INVALID_STRUCT_STYPE, "vkCreateGraphicsPipelines: parameter pCreateInfos[%d].pMultisampleState->sType must be " "VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO", i); @@ -1620,7 +1611,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (pCreateInfos[i].pMultisampleState->sampleShadingEnable == VK_TRUE) { if (!device_data->physical_device_features.sampleRateShading) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_10000620, LayerName, + VALIDATION_ERROR_10000620, "vkCreateGraphicsPipelines(): parameter " "pCreateInfos[%d].pMultisampleState->sampleShadingEnable.", i); @@ -1630,9 +1621,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (!in_inclusive_range(pCreateInfos[i].pMultisampleState->minSampleShading, 0.F, 1.0F)) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_10000624, LayerName, - "vkCreateGraphicsPipelines(): parameter pCreateInfos[%d].pMultisampleState->minSampleShading.", - i); + VALIDATION_ERROR_10000624, + "vkCreateGraphicsPipelines(): parameter pCreateInfos[%d].pMultisampleState->minSampleShading.", i); } } } @@ -1737,7 +1727,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (pCreateInfos[i].pDepthStencilState->sType != VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_STRUCT_STYPE, LayerName, + INVALID_STRUCT_STYPE, "vkCreateGraphicsPipelines: parameter pCreateInfos[%d].pDepthStencilState->sType must be " "VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO", i); @@ -1835,7 +1825,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (pCreateInfos[i].pColorBlendState->sType != VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_STRUCT_STYPE, LayerName, + INVALID_STRUCT_STYPE, "vkCreateGraphicsPipelines: parameter pCreateInfos[%d].pColorBlendState->sType must be " "VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO", i); @@ -1855,7 +1845,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (pCreateInfos[i].basePipelineIndex != -1) { if (pCreateInfos[i].basePipelineHandle != VK_NULL_HANDLE) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_096005a8, LayerName, + VALIDATION_ERROR_096005a8, "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."); @@ -1865,7 +1855,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (pCreateInfos[i].basePipelineHandle != VK_NULL_HANDLE) { if (pCreateInfos[i].basePipelineIndex != -1) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_096005aa, LayerName, + VALIDATION_ERROR_096005aa, "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."); @@ -1877,7 +1867,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if ((pCreateInfos[i].pRasterizationState->polygonMode != VK_POLYGON_MODE_FILL) && (device_data->physical_device_features.fillModeNonSolid == false)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DEVICE_FEATURE, LayerName, + DEVICE_FEATURE, "vkCreateGraphicsPipelines parameter, VkPolygonMode " "pCreateInfos->pRasterizationState->polygonMode cannot be VK_POLYGON_MODE_POINT or " "VK_POLYGON_MODE_LINE if VkPhysicalDeviceFeatures->fillModeNonSolid is false."); @@ -1886,7 +1876,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (!has_dynamic_line_width && !device_data->physical_device_features.wideLines && (pCreateInfos[i].pRasterizationState->lineWidth != 1.0f)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, 0, VALIDATION_ERROR_096005da, LayerName, + VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, 0, VALIDATION_ERROR_096005da, "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 @@ -1933,7 +1923,7 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, if (pCreateInfo->anisotropyEnable == VK_TRUE) { 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, - VALIDATION_ERROR_1260085e, LayerName, + VALIDATION_ERROR_1260085e, "vkCreateSampler(): value of %s must be in range [1.0, %f] %s, but %f found.", "pCreateInfo->maxAnisotropy", limits.maxSamplerAnisotropy, "VkPhysicalDeviceLimits::maxSamplerAnistropy", pCreateInfo->maxAnisotropy); @@ -1942,7 +1932,7 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, // 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, - VALIDATION_ERROR_1260085c, LayerName, + VALIDATION_ERROR_1260085c, "vkCreateSampler(): Anisotropic sampling feature is not enabled, %s must be VK_FALSE.", "pCreateInfo->anisotropyEnable"); } @@ -1950,7 +1940,7 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, // Anistropy and unnormalized coordinates cannot be enabled simultaneously if (pCreateInfo->unnormalizedCoordinates == VK_TRUE) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_12600868, LayerName, + VALIDATION_ERROR_12600868, "vkCreateSampler(): pCreateInfo->anisotropyEnable and pCreateInfo->unnormalizedCoordinates must " "not both be VK_TRUE."); } @@ -1977,11 +1967,10 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, ((pCreateInfo->addressModeU == VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE) || (pCreateInfo->addressModeV == VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE) || (pCreateInfo->addressModeW == VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE))) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - 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."); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_1260086e, + "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."); } // Checks for the IMG cubic filtering extension @@ -1989,7 +1978,7 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, if ((pCreateInfo->anisotropyEnable == VK_TRUE) && ((pCreateInfo->minFilter == VK_FILTER_CUBIC_IMG) || (pCreateInfo->magFilter == VK_FILTER_CUBIC_IMG))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_12600872, LayerName, + VALIDATION_ERROR_12600872, "vkCreateSampler(): Anisotropic sampling must not be VK_TRUE when either minFilter or magFilter " "are VK_FILTER_CUBIC_IMG."); } @@ -2019,7 +2008,7 @@ bool pv_vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayout ++descriptor_index) { if (pCreateInfo->pBindings[i].pImmutableSamplers[descriptor_index] == VK_NULL_HANDLE) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, + REQUIRED_PARAMETER, "vkCreateDescriptorSetLayout: required parameter " "pCreateInfo->pBindings[%d].pImmutableSamplers[%d] specified as VK_NULL_HANDLE", i, descriptor_index); @@ -2031,7 +2020,7 @@ bool pv_vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayout if ((pCreateInfo->pBindings[i].stageFlags != 0) && ((pCreateInfo->pBindings[i].stageFlags & (~AllVkShaderStageFlagBits)) != 0)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_04e00236, LayerName, + VALIDATION_ERROR_04e00236, "vkCreateDescriptorSetLayout(): if pCreateInfo->pBindings[%d].descriptorCount is not 0, " "pCreateInfo->pBindings[%d].stageFlags must be a valid combination of VkShaderStageFlagBits " "values.", @@ -2071,7 +2060,7 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c if (pDescriptorWrites[i].descriptorCount == 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_15c0441b, LayerName, + VALIDATION_ERROR_15c0441b, "vkUpdateDescriptorSets(): parameter pDescriptorWrites[%d].descriptorCount must be greater than 0.", i); } @@ -2090,7 +2079,7 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c // pImageInfo must be a pointer to an array of descriptorCount valid VkDescriptorImageInfo structures if (pDescriptorWrites[i].pImageInfo == nullptr) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_15c00284, LayerName, + VALIDATION_ERROR_15c00284, "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 " @@ -2123,7 +2112,7 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c // pointer to an array of descriptorCount valid VkDescriptorBufferInfo structures if (pDescriptorWrites[i].pBufferInfo == nullptr) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_15c00288, LayerName, + VALIDATION_ERROR_15c00288, "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, " @@ -2143,7 +2132,7 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c // pTexelBufferView must be a pointer to an array of descriptorCount valid VkBufferView handles if (pDescriptorWrites[i].pTexelBufferView == nullptr) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_15c00286, LayerName, + VALIDATION_ERROR_15c00286, "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.", @@ -2165,12 +2154,12 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c for (uint32_t j = 0; j < pDescriptorWrites[i].descriptorCount; j++) { if (pDescriptorWrites[i].pBufferInfo != NULL) { if (SafeModulo(pDescriptorWrites[i].pBufferInfo[j].offset, uniformAlignment) != 0) { - skip |= log_msg( - device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, VALIDATION_ERROR_15c0028e, LayerName, - "vkUpdateDescriptorSets(): pDescriptorWrites[%d].pBufferInfo[%d].offset (0x%" PRIxLEAST64 - ") must be a multiple of device limit minUniformBufferOffsetAlignment 0x%" PRIxLEAST64 ".", - i, j, pDescriptorWrites[i].pBufferInfo[j].offset, uniformAlignment); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, VALIDATION_ERROR_15c0028e, + "vkUpdateDescriptorSets(): pDescriptorWrites[%d].pBufferInfo[%d].offset (0x%" PRIxLEAST64 + ") must be a multiple of device limit minUniformBufferOffsetAlignment 0x%" PRIxLEAST64 ".", + i, j, pDescriptorWrites[i].pBufferInfo[j].offset, uniformAlignment); } } } @@ -2180,12 +2169,12 @@ bool pv_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, c for (uint32_t j = 0; j < pDescriptorWrites[i].descriptorCount; j++) { if (pDescriptorWrites[i].pBufferInfo != NULL) { if (SafeModulo(pDescriptorWrites[i].pBufferInfo[j].offset, storageAlignment) != 0) { - skip |= log_msg( - device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, VALIDATION_ERROR_15c00290, LayerName, - "vkUpdateDescriptorSets(): pDescriptorWrites[%d].pBufferInfo[%d].offset (0x%" PRIxLEAST64 - ") must be a multiple of device limit minStorageBufferOffsetAlignment 0x%" PRIxLEAST64 ".", - i, j, pDescriptorWrites[i].pBufferInfo[j].offset, storageAlignment); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, VALIDATION_ERROR_15c00290, + "vkUpdateDescriptorSets(): pDescriptorWrites[%d].pBufferInfo[%d].offset (0x%" PRIxLEAST64 + ") must be a multiple of device limit minStorageBufferOffsetAlignment 0x%" PRIxLEAST64 ".", + i, j, pDescriptorWrites[i].pBufferInfo[j].offset, storageAlignment); } } } @@ -2206,12 +2195,12 @@ bool pv_vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreat std::stringstream ss; 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, - VALIDATION_ERROR_00809201, "IMAGE", "%s", ss.str().c_str()); + VALIDATION_ERROR_00809201, "%s", ss.str().c_str()); } if (pCreateInfo->pAttachments[i].finalLayout == VK_IMAGE_LAYOUT_UNDEFINED || pCreateInfo->pAttachments[i].finalLayout == VK_IMAGE_LAYOUT_PREINITIALIZED) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_00800696, "DL", + VALIDATION_ERROR_00800696, "pCreateInfo->pAttachments[%d].finalLayout must not be VK_IMAGE_LAYOUT_UNDEFINED or " "VK_IMAGE_LAYOUT_PREINITIALIZED.", i); @@ -2221,8 +2210,7 @@ bool pv_vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreat for (uint32_t i = 0; i < pCreateInfo->subpassCount; ++i) { 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, - VALIDATION_ERROR_1400069a, "DL", - "Cannot create a render pass with %d color attachments. Max is %d.", + VALIDATION_ERROR_1400069a, "Cannot create a render pass with %d color attachments. Max is %d.", pCreateInfo->pSubpasses[i].colorAttachmentCount, max_color_attachments); } } @@ -2276,7 +2264,7 @@ bool pv_vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBuffe if (pInfo != NULL) { if ((device_data->physical_device_features.inheritedQueries == VK_FALSE) && (pInfo->occlusionQueryEnable != VK_FALSE)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_02a00070, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_02a00070, "Cannot set inherited occlusionQueryEnable in vkBeginCommandBuffer() when device does not support " "inheritedQueries."); } @@ -2298,13 +2286,13 @@ 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), VALIDATION_ERROR_1e000990, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1e000990, "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), VALIDATION_ERROR_1e000992, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1e000992, "vkCmdSetViewport: The multiViewport feature is disabled, but viewportCount (=%" PRIu32 ") is not 1.", viewportCount); } @@ -2312,7 +2300,7 @@ bool pv_vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, const uint64_t sum = static_cast<uint64_t>(firstViewport) + static_cast<uint64_t>(viewportCount); if (sum > device_data->device_limits.maxViewports) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1e00098e, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1e00098e, "vkCmdSetViewport: firstViewport + viewportCount (=%" PRIu32 " + %" PRIu32 " = %" PRIu64 ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 ").", firstViewport, viewportCount, sum, device_data->device_limits.maxViewports); @@ -2340,13 +2328,13 @@ bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, ui if (!device_data->physical_device_features.multiViewport) { if (firstScissor != 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1d8004a2, LayerName, + HandleToUint64(commandBuffer), 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), VALIDATION_ERROR_1d8004a4, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1d8004a4, "vkCmdSetScissor: The multiViewport feature is disabled, but scissorCount (=%" PRIu32 ") is not 1.", scissorCount); } @@ -2354,7 +2342,7 @@ bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, ui const uint64_t sum = static_cast<uint64_t>(firstScissor) + static_cast<uint64_t>(scissorCount); if (sum > device_data->device_limits.maxViewports) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1d8004a0, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1d8004a0, "vkCmdSetScissor: firstScissor + scissorCount (=%" PRIu32 " + %" PRIu32 " = %" PRIu64 ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 ").", firstScissor, scissorCount, sum, device_data->device_limits.maxViewports); @@ -2367,14 +2355,14 @@ 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), VALIDATION_ERROR_1d8004a6, LayerName, + HandleToUint64(commandBuffer), 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), VALIDATION_ERROR_1d8004a6, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1d8004a6, "vkCmdSetScissor: pScissors[%" PRIu32 "].offset.y (=%" PRIi32 ") is negative.", scissor_i, scissor.offset.y); } @@ -2382,7 +2370,7 @@ bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, ui const int64_t x_sum = static_cast<int64_t>(scissor.offset.x) + static_cast<int64_t>(scissor.extent.width); if (x_sum > INT32_MAX) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1d8004a8, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1d8004a8, "vkCmdSetScissor: offset.x + extent.width (=%" PRIi32 " + %" PRIu32 " = %" PRIi64 ") of pScissors[%" PRIu32 "] will overflow int32_t.", scissor.offset.x, scissor.extent.width, x_sum, scissor_i); @@ -2391,7 +2379,7 @@ bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, ui const int64_t y_sum = static_cast<int64_t>(scissor.offset.y) + static_cast<int64_t>(scissor.extent.height); if (y_sum > INT32_MAX) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_1d8004aa, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1d8004aa, "vkCmdSetScissor: offset.y + extent.height (=%" PRIi32 " + %" PRIu32 " = %" PRIi64 ") of pScissors[%" PRIu32 "] will overflow int32_t.", scissor.offset.y, scissor.extent.height, y_sum, scissor_i); @@ -2409,7 +2397,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), VALIDATION_ERROR_1d600628, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_1d600628, "VkPhysicalDeviceFeatures::wideLines is disabled, but lineWidth (=%f) is not 1.0.", lineWidth); } @@ -2424,14 +2412,14 @@ bool pv_vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t // TODO: Verify against Valid Usage section. I don't see a non-zero vertexCount listed, may need to add that and make // this an error or leave as is. skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, "vkCmdDraw parameter, uint32_t vertexCount, is 0"); + REQUIRED_PARAMETER, "vkCmdDraw parameter, uint32_t vertexCount, is 0"); } if (instanceCount == 0) { // TODO: Verify against Valid Usage section. I don't see a non-zero instanceCount listed, may need to add that and make // this an error or leave as is. skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - REQUIRED_PARAMETER, LayerName, "vkCmdDraw parameter, uint32_t instanceCount, is 0"); + REQUIRED_PARAMETER, "vkCmdDraw parameter, uint32_t instanceCount, is 0"); } return skip; } @@ -2442,7 +2430,7 @@ bool pv_vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDevi if (!device_data->physical_device_features.multiDrawIndirect && ((count > 1))) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DEVICE_FEATURE, LayerName, + DEVICE_FEATURE, "CmdDrawIndirect(): Device feature multiDrawIndirect disabled: count must be 0 or 1 but is %d", count); } return skip; @@ -2453,10 +2441,9 @@ bool pv_vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, bool skip = false; layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (!device_data->physical_device_features.multiDrawIndirect && ((count > 1))) { - skip |= - log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DEVICE_FEATURE, LayerName, - "CmdDrawIndexedIndirect(): Device feature multiDrawIndirect disabled: count must be 0 or 1 but is %d", count); + skip |= log_msg( + device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DEVICE_FEATURE, + "CmdDrawIndexedIndirect(): Device feature multiDrawIndirect disabled: count must be 0 or 1 but is %d", count); } return skip; } @@ -2476,13 +2463,13 @@ bool pv_vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageL if ((pRegions->srcSubresource.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, - VALIDATION_ERROR_0a600c01, LayerName, + 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, - VALIDATION_ERROR_0a600c01, LayerName, + VALIDATION_ERROR_0a600c01, "vkCmdCopyImage() parameter, VkImageAspect pRegions->dstSubresource.aspectMask, is an unrecognized enumerator."); } } @@ -2504,13 +2491,13 @@ bool pv_vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageL if ((pRegions->srcSubresource.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, - UNRECOGNIZED_VALUE, LayerName, + UNRECOGNIZED_VALUE, "vkCmdBlitImage() 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, - UNRECOGNIZED_VALUE, LayerName, + UNRECOGNIZED_VALUE, "vkCmdBlitImage() parameter, VkImageAspect pRegions->dstSubresource.aspectMask, is an unrecognized enumerator"); } } @@ -2531,7 +2518,7 @@ bool pv_vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer if (pRegions != nullptr) { if ((pRegions->imageSubresource.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, - UNRECOGNIZED_VALUE, LayerName, + UNRECOGNIZED_VALUE, "vkCmdCopyBufferToImage() parameter, VkImageAspect pRegions->imageSubresource.aspectMask, is an " "unrecognized enumerator"); } @@ -2553,7 +2540,7 @@ bool pv_vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, if (pRegions != nullptr) { if ((pRegions->imageSubresource.aspectMask & legal_aspect_flags) == 0) { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - UNRECOGNIZED_VALUE, LayerName, + UNRECOGNIZED_VALUE, "vkCmdCopyImageToBuffer parameter, VkImageAspect pRegions->imageSubresource.aspectMask, is an unrecognized " "enumerator"); } @@ -2568,21 +2555,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, - VALIDATION_ERROR_1e400048, LayerName, + 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, - VALIDATION_ERROR_1e40004a, LayerName, + VALIDATION_ERROR_1e40004a, "vkCmdUpdateBuffer() parameter, VkDeviceSize dataSize (0x%" PRIxLEAST64 "), 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, - VALIDATION_ERROR_1e40004c, LayerName, + VALIDATION_ERROR_1e40004c, "vkCmdUpdateBuffer() parameter, VkDeviceSize dataSize (0x%" PRIxLEAST64 "), is not a multiple of 4.", dataSize); } return skip; @@ -2596,7 +2583,7 @@ bool pv_vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDev if (dstOffset & 3) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1b400032, LayerName, + VALIDATION_ERROR_1b400032, "vkCmdFillBuffer() parameter, VkDeviceSize dstOffset (0x%" PRIxLEAST64 "), is not a multiple of 4.", dstOffset); } @@ -2604,11 +2591,11 @@ bool pv_vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDev if (size <= 0) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_1b400034, LayerName, + VALIDATION_ERROR_1b400034, "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, - VALIDATION_ERROR_1b400038, LayerName, + VALIDATION_ERROR_1b400038, "vkCmdFillBuffer() parameter, VkDeviceSize size (0x%" PRIxLEAST64 "), is not a multiple of 4.", size); } } @@ -2650,9 +2637,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDe static bool require_device_extension(layer_data *device_data, bool flag, char const *function_name, char const *extension_name) { if (!flag) { return log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - EXTENSION_NOT_ENABLED, LayerName, - "%s() called even though the %s extension was not enabled for this VkDevice.", function_name, - extension_name); + EXTENSION_NOT_ENABLED, "%s() called even though the %s extension was not enabled for this VkDevice.", + function_name, extension_name); } return false; @@ -2664,15 +2650,14 @@ bool pv_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pC layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); debug_report_data *report_data = device_data->report_data; - const LogMiscParams log_misc{report_data, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, VK_NULL_HANDLE, LayerName, + const LogMiscParams log_misc{report_data, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, VK_NULL_HANDLE, "vkCreateSwapchainKHR"}; if (pCreateInfo != nullptr) { if ((device_data->physical_device_features.textureCompressionETC2 == false) && FormatIsCompressed_ETC2_EAC(pCreateInfo->imageFormat)) { skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DEVICE_FEATURE, LayerName, + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DEVICE_FEATURE, "vkCreateSwapchainKHR(): Attempting to create swapchain VkImage with format %s. The textureCompressionETC2 " "feature is not enabled: neither ETC2 nor EAC formats can be used to create images.", string_VkFormat(pCreateInfo->imageFormat)); @@ -2680,8 +2665,7 @@ bool pv_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pC if ((device_data->physical_device_features.textureCompressionASTC_LDR == false) && FormatIsCompressed_ASTC_LDR(pCreateInfo->imageFormat)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DEVICE_FEATURE, LayerName, + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DEVICE_FEATURE, "vkCreateSwapchainKHR(): Attempting to create swapchain VkImage with format %s. The " "textureCompressionASTC_LDR feature is not enabled: ASTC formats cannot be used to create images.", string_VkFormat(pCreateInfo->imageFormat)); @@ -2689,8 +2673,7 @@ bool pv_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pC if ((device_data->physical_device_features.textureCompressionBC == false) && FormatIsCompressed_BC(pCreateInfo->imageFormat)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - DEVICE_FEATURE, LayerName, + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, DEVICE_FEATURE, "vkCreateSwapchainKHR(): Attempting to create swapchain VkImage with format %s. The " "textureCompressionBC feature is not enabled: BC compressed formats cannot be used to create images.", string_VkFormat(pCreateInfo->imageFormat)); @@ -2701,7 +2684,7 @@ bool pv_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pC // If imageSharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1 if (pCreateInfo->queueFamilyIndexCount <= 1) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_146009fc, LayerName, + VALIDATION_ERROR_146009fc, "vkCreateSwapchainKHR(): if pCreateInfo->imageSharingMode is VK_SHARING_MODE_CONCURRENT, " "pCreateInfo->queueFamilyIndexCount must be greater than 1."); } @@ -2710,7 +2693,7 @@ bool pv_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pC // queueFamilyIndexCount uint32_t values if (pCreateInfo->pQueueFamilyIndices == nullptr) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_146009fa, LayerName, + VALIDATION_ERROR_146009fa, "vkCreateSwapchainKHR(): if pCreateInfo->imageSharingMode is VK_SHARING_MODE_CONCURRENT, " "pCreateInfo->pQueueFamilyIndices must be a pointer to an array of " "pCreateInfo->queueFamilyIndexCount uint32_t values."); @@ -2740,7 +2723,7 @@ bool pv_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) { VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME); if (present_regions->swapchainCount != pPresentInfo->swapchainCount) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - INVALID_USAGE, LayerName, + INVALID_USAGE, "QueuePresentKHR(): pPresentInfo->swapchainCount has a value of %i but VkPresentRegionsKHR " "extension swapchainCount is %i. These values must be equal.", pPresentInfo->swapchainCount, present_regions->swapchainCount); @@ -2770,8 +2753,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, - VALIDATION_ERROR_15a00a38, LayerName, - "vkCreateWin32SurfaceKHR(): hwnd must be a valid Win32 HWND but hwnd is NULL."); + VALIDATION_ERROR_15a00a38, "vkCreateWin32SurfaceKHR(): hwnd must be a valid Win32 HWND but hwnd is NULL."); } return skip; @@ -2798,7 +2780,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, VALIDATION_ERROR_0480025a, - LayerName, "vkCreateDescriptorPool(): pCreateInfo->maxSets is not greater than 0."); + "vkCreateDescriptorPool(): pCreateInfo->maxSets is not greater than 0."); } if (pCreateInfo->pPoolSizes) { @@ -2806,7 +2788,7 @@ bool pv_vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo if (pCreateInfo->pPoolSizes[i].descriptorCount <= 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, VALIDATION_ERROR_04a0025c, LayerName, + VK_NULL_HANDLE, VALIDATION_ERROR_04a0025c, "vkCreateDescriptorPool(): pCreateInfo->pPoolSizes[%" PRIu32 "].descriptorCount is not greater than 0.", i); } } @@ -2823,7 +2805,7 @@ bool pv_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint3 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), VALIDATION_ERROR_19c00304, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_19c00304, "vkCmdDispatch(): groupCountX (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 ").", groupCountX, device_data->device_limits.maxComputeWorkGroupCount[0]); } @@ -2831,7 +2813,7 @@ bool pv_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint3 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), VALIDATION_ERROR_19c00306, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_19c00306, "vkCmdDispatch(): groupCountY (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 ").", groupCountY, device_data->device_limits.maxComputeWorkGroupCount[1]); } @@ -2839,7 +2821,7 @@ bool pv_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint3 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), VALIDATION_ERROR_19c00308, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_19c00308, "vkCmdDispatch(): groupCountZ (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 ").", groupCountZ, device_data->device_limits.maxComputeWorkGroupCount[2]); } @@ -2856,13 +2838,13 @@ bool pv_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t limit = device_data->device_limits.maxComputeWorkGroupCount[0]; if (baseGroupX >= limit) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_19e0034a, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_19e0034a, "vkCmdDispatch(): baseGroupX (%" PRIu32 ") 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), VALIDATION_ERROR_19e00350, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_19e00350, "vkCmdDispatchBaseKHR(): baseGroupX (%" PRIu32 ") + groupCountX (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 ").", baseGroupX, groupCountX, limit); @@ -2871,13 +2853,13 @@ bool pv_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, limit = device_data->device_limits.maxComputeWorkGroupCount[1]; if (baseGroupY >= limit) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_19e0034c, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_19e0034c, "vkCmdDispatch(): baseGroupY (%" PRIu32 ") 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), VALIDATION_ERROR_19e00352, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_19e00352, "vkCmdDispatchBaseKHR(): baseGroupY (%" PRIu32 ") + groupCountY (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 ").", baseGroupY, groupCountY, limit); @@ -2886,13 +2868,13 @@ bool pv_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, limit = device_data->device_limits.maxComputeWorkGroupCount[2]; if (baseGroupZ >= limit) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), VALIDATION_ERROR_19e0034e, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_19e0034e, "vkCmdDispatch(): baseGroupZ (%" PRIu32 ") 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), VALIDATION_ERROR_19e00354, LayerName, + HandleToUint64(commandBuffer), VALIDATION_ERROR_19e00354, "vkCmdDispatchBaseKHR(): baseGroupZ (%" PRIu32 ") + groupCountZ (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 ").", baseGroupZ, groupCountZ, limit); diff --git a/layers/shader_validation.cpp b/layers/shader_validation.cpp index e028aa88..368c3d28 100644 --- a/layers/shader_validation.cpp +++ b/layers/shader_validation.cpp @@ -741,7 +741,7 @@ static bool validate_vi_consistency(debug_report_data const *report_data, VkPipe if (binding) { // TODO: VALIDATION_ERROR_096005cc perhaps? skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_INCONSISTENT_VI, "SC", "Duplicate vertex input binding descriptions for binding %d", + SHADER_CHECKER_INCONSISTENT_VI, "Duplicate vertex input binding descriptions for binding %d", desc->binding); } else { binding = desc; @@ -779,16 +779,16 @@ static bool validate_vi_against_vs_inputs(debug_report_data const *report_data, auto b_first = b_at_end ? 0 : it_b->first.first; if (!a_at_end && (b_at_end || a_first < b_first)) { if (!used && log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, SHADER_CHECKER_OUTPUT_NOT_CONSUMED, "SC", + 0, SHADER_CHECKER_OUTPUT_NOT_CONSUMED, "Vertex attribute at location %d not consumed by vertex shader", a_first)) { skip = true; } used = false; it_a++; } else if (!b_at_end && (a_at_end || b_first < a_first)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, 0, - SHADER_CHECKER_INPUT_NOT_PRODUCED, "SC", "Vertex shader consumes input at location %d but not provided", - b_first); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, 0, + SHADER_CHECKER_INPUT_NOT_PRODUCED, "Vertex shader consumes input at location %d but not provided", b_first); it_b++; } else { unsigned attrib_type = get_format_type(it_a->second->format); @@ -797,7 +797,7 @@ static bool validate_vi_against_vs_inputs(debug_report_data const *report_data, // Type checking if (!(attrib_type & input_type)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "SC", + SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "Attribute type of `%s` at location %d does not match vertex shader input type of `%s`", string_VkFormat(it_a->second->format), a_first, describe_type(vs, it_b->second.type_id).c_str()); } @@ -843,16 +843,15 @@ static bool validate_fs_outputs_against_render_pass(debug_report_data const *rep if (!a_at_end && (b_at_end || it_a->first.first < it_b->first)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_OUTPUT_NOT_CONSUMED, "SC", + SHADER_CHECKER_OUTPUT_NOT_CONSUMED, "fragment shader writes to output location %d with no matching attachment", it_a->first.first); it_a++; } else if (!b_at_end && (a_at_end || it_a->first.first > it_b->first)) { // Only complain if there are unmasked channels for this attachment. If the writemask is 0, it's acceptable for the // shader to not produce a matching output. if (pipeline->attachments[it_b->first].colorWriteMask != 0) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_INPUT_NOT_PRODUCED, "SC", "Attachment %d not written by fragment shader", it_b->first); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + SHADER_CHECKER_INPUT_NOT_PRODUCED, "Attachment %d not written by fragment shader", it_b->first); } it_b++; } else { @@ -862,7 +861,7 @@ static bool validate_fs_outputs_against_render_pass(debug_report_data const *rep // Type checking if (!(output_type & att_type)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "SC", + SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "Attachment %d of type `%s` does not match fragment shader output type of `%s`", it_b->first, string_VkFormat(it_b->second), describe_type(fs, it_a->second.type_id).c_str()); } @@ -1020,7 +1019,7 @@ static bool validate_push_constant_block_against_pipeline(debug_report_data cons if ((range.stageFlags & stage) == 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_PUSH_CONSTANT_NOT_ACCESSIBLE_FROM_STAGE, "SC", + SHADER_CHECKER_PUSH_CONSTANT_NOT_ACCESSIBLE_FROM_STAGE, "Push constant range covering variable starting at offset %u not accessible from stage %s", offset, string_VkShaderStageFlagBits(stage)); } @@ -1031,7 +1030,7 @@ static bool validate_push_constant_block_against_pipeline(debug_report_data cons if (!found_range) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_PUSH_CONSTANT_OUT_OF_RANGE, "SC", + SHADER_CHECKER_PUSH_CONSTANT_OUT_OF_RANGE, "Push constant range covering variable starting at offset %u not declared in layout", offset); } } @@ -1068,7 +1067,7 @@ static bool validate_specialization_offsets(debug_report_data const *report_data // TODO: This is a good place for VALIDATION_ERROR_1360060a. if (spec->pMapEntries[i].offset + spec->pMapEntries[i].size > spec->dataSize) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, 0, - VALIDATION_ERROR_1360060c, "SC", + VALIDATION_ERROR_1360060c, "Specialization entry %u (for constant id %u) references memory outside provided specialization " "data (bytes %u.." PRINTF_SIZE_T_SPECIFIER "; " PRINTF_SIZE_T_SPECIFIER " bytes provided)..", i, spec->pMapEntries[i].constantID, spec->pMapEntries[i].offset, @@ -1167,7 +1166,7 @@ static bool descriptor_type_match(shader_module const *module, uint32_t type_id, static bool require_feature(debug_report_data const *report_data, VkBool32 feature, char const *feature_name) { if (!feature) { if (log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_FEATURE_NOT_ENABLED, "SC", + SHADER_CHECKER_FEATURE_NOT_ENABLED, "Shader requires VkPhysicalDeviceFeatures::%s but is not enabled on the device", feature_name)) { return true; } @@ -1179,7 +1178,7 @@ static bool require_feature(debug_report_data const *report_data, VkBool32 featu static bool require_extension(debug_report_data const *report_data, bool extension, char const *extension_name) { if (!extension) { if (log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_FEATURE_NOT_ENABLED, "SC", "Shader requires extension %s but is not enabled on the device", + SHADER_CHECKER_FEATURE_NOT_ENABLED, "Shader requires extension %s but is not enabled on the device", extension_name)) { return true; } @@ -1418,7 +1417,7 @@ static bool validate_pipeline_shader_stage(layer_data *dev_data, VkPipelineShade auto entrypoint = *out_entrypoint = find_entrypoint(module, pStage->pName, pStage->stage); if (entrypoint == module->end()) { if (log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_10600586, "SC", "No entrypoint found named `%s` for stage %s..", pStage->pName, + VALIDATION_ERROR_10600586, "No entrypoint found named `%s` for stage %s..", pStage->pName, string_VkShaderStageFlagBits(pStage->stage))) { return true; // no point continuing beyond here, any analysis is just going to be garbage. } @@ -1451,24 +1450,24 @@ static bool validate_pipeline_shader_stage(layer_data *dev_data, VkPipelineShade if (!binding) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_MISSING_DESCRIPTOR, "SC", + SHADER_CHECKER_MISSING_DESCRIPTOR, "Shader uses descriptor slot %u.%u (used as type `%s`) but not declared in pipeline layout", use.first.first, use.first.second, describe_type(module, use.second.type_id).c_str()); } else if (~binding->stageFlags & pStage->stage) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, 0, - SHADER_CHECKER_DESCRIPTOR_NOT_ACCESSIBLE_FROM_STAGE, "SC", + SHADER_CHECKER_DESCRIPTOR_NOT_ACCESSIBLE_FROM_STAGE, "Shader uses descriptor slot %u.%u (used as type `%s`) but descriptor not accessible from stage %s", use.first.first, use.first.second, describe_type(module, use.second.type_id).c_str(), string_VkShaderStageFlagBits(pStage->stage)); } else if (!descriptor_type_match(module, use.second.type_id, binding->descriptorType, required_descriptor_count)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_DESCRIPTOR_TYPE_MISMATCH, "SC", + SHADER_CHECKER_DESCRIPTOR_TYPE_MISMATCH, "Type mismatch on descriptor slot %u.%u (used as type `%s`) but descriptor of type %s", use.first.first, use.first.second, describe_type(module, use.second.type_id).c_str(), string_VkDescriptorType(binding->descriptorType)); } else if (binding->descriptorCount < required_descriptor_count) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_DESCRIPTOR_TYPE_MISMATCH, "SC", + SHADER_CHECKER_DESCRIPTOR_TYPE_MISMATCH, "Shader expects at least %u descriptors for binding %u.%u (used as type `%s`) but only %u provided", required_descriptor_count, use.first.first, use.first.second, describe_type(module, use.second.type_id).c_str(), binding->descriptorCount); @@ -1490,12 +1489,12 @@ static bool validate_pipeline_shader_stage(layer_data *dev_data, VkPipelineShade if (index == VK_ATTACHMENT_UNUSED) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_MISSING_INPUT_ATTACHMENT, "SC", + SHADER_CHECKER_MISSING_INPUT_ATTACHMENT, "Shader consumes input attachment index %d but not provided in subpass", use.first); } else if (!(get_format_type(rpci->pAttachments[index].format) & get_fundamental_type(module, use.second.type_id))) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_INPUT_ATTACHMENT_TYPE_MISMATCH, "SC", + SHADER_CHECKER_INPUT_ATTACHMENT_TYPE_MISMATCH, "Subpass input attachment %u format of %s does not match type used in shader `%s`", use.first, string_VkFormat(rpci->pAttachments[index].format), describe_type(module, use.second.type_id).c_str()); } @@ -1527,14 +1526,13 @@ static bool validate_interface_between_stages(debug_report_data const *report_da auto b_first = b_at_end ? std::make_pair(0u, 0u) : b_it->first; if (b_at_end || ((!a_at_end) && (a_first < b_first))) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_OUTPUT_NOT_CONSUMED, "SC", "%s writes to output location %u.%u which is not consumed by %s", - producer_stage->name, a_first.first, a_first.second, consumer_stage->name); + skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + SHADER_CHECKER_OUTPUT_NOT_CONSUMED, "%s writes to output location %u.%u which is not consumed by %s", + producer_stage->name, a_first.first, a_first.second, consumer_stage->name); a_it++; } else if (a_at_end || a_first > b_first) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_INPUT_NOT_PRODUCED, "SC", "%s consumes input location %u.%u which is not written by %s", + SHADER_CHECKER_INPUT_NOT_PRODUCED, "%s consumes input location %u.%u which is not written by %s", consumer_stage->name, b_first.first, b_first.second, producer_stage->name); b_it++; } else { @@ -1546,20 +1544,20 @@ static bool validate_interface_between_stages(debug_report_data const *report_da producer_stage->arrayed_output && !a_it->second.is_patch && !a_it->second.is_block_member, consumer_stage->arrayed_input && !b_it->second.is_patch && !b_it->second.is_block_member, true)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "SC", "Type mismatch on location %u.%u: '%s' vs '%s'", + SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "Type mismatch on location %u.%u: '%s' vs '%s'", a_first.first, a_first.second, describe_type(producer, a_it->second.type_id).c_str(), describe_type(consumer, b_it->second.type_id).c_str()); } if (a_it->second.is_patch != b_it->second.is_patch) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, 0, - SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "SC", + SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "Decoration mismatch on location %u.%u: is per-%s in %s stage but per-%s in %s stage", a_first.first, a_first.second, a_it->second.is_patch ? "patch" : "vertex", producer_stage->name, b_it->second.is_patch ? "patch" : "vertex", consumer_stage->name); } if (a_it->second.is_relaxed_precision != b_it->second.is_relaxed_precision) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, 0, - SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "SC", + SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "Decoration mismatch on location %u.%u: %s and %s stages differ in precision", a_first.first, a_first.second, producer_stage->name, consumer_stage->name); } @@ -1666,7 +1664,7 @@ bool PreCallValidateCreateShaderModule(layer_data *dev_data, VkShaderModuleCreat if (!have_glsl_shader && (pCreateInfo->codeSize % 4)) { skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_12a00ac0, "SC", + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, VALIDATION_ERROR_12a00ac0, "SPIR-V module not valid: Codesize must be a multiple of 4 but is " PRINTF_SIZE_T_SPECIFIER ".", pCreateInfo->codeSize); } else { auto cache = GetValidationCacheInfo(pCreateInfo); @@ -1686,7 +1684,7 @@ bool PreCallValidateCreateShaderModule(layer_data *dev_data, VkShaderModuleCreat if (!have_glsl_shader || (pCreateInfo->pCode[0] == spv::MagicNumber)) { skip |= log_msg(report_data, spv_valid == SPV_WARNING ? VK_DEBUG_REPORT_WARNING_BIT_EXT : VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, SHADER_CHECKER_INCONSISTENT_SPIRV, "SC", + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, SHADER_CHECKER_INCONSISTENT_SPIRV, "SPIR-V module not valid: %s", diag && diag->error ? diag->error : "(no error text)"); } } else { diff --git a/layers/threading.h b/layers/threading.h index 529ac83c..68f0f5db 100644 --- a/layers/threading.h +++ b/layers/threading.h @@ -104,7 +104,7 @@ class counter { // There are no readers. Two writers just collided. if (use_data->thread != tid) { skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, (uint64_t)(object), - THREADING_CHECKER_MULTIPLE_THREADS, "THREADING", + THREADING_CHECKER_MULTIPLE_THREADS, "THREADING ERROR : object of type %s is simultaneously used in " "thread 0x%" PRIx64 " and thread 0x%" PRIx64, typeName, (uint64_t)use_data->thread, (uint64_t)tid); @@ -132,7 +132,7 @@ class counter { // There are readers. This writer collided with them. if (use_data->thread != tid) { skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, (uint64_t)(object), - THREADING_CHECKER_MULTIPLE_THREADS, "THREADING", + THREADING_CHECKER_MULTIPLE_THREADS, "THREADING ERROR : object of type %s is simultaneously used in " "thread 0x%" PRIx64 " and thread 0x%" PRIx64, typeName, (uint64_t)use_data->thread, (uint64_t)tid); @@ -191,7 +191,7 @@ class counter { } else if (uses[object].writer_count > 0 && uses[object].thread != tid) { // There is a writer of the object. skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, (uint64_t)(object), - THREADING_CHECKER_MULTIPLE_THREADS, "THREADING", + THREADING_CHECKER_MULTIPLE_THREADS, "THREADING ERROR : object of type %s is simultaneously used in " "thread 0x%" PRIx64 " and thread 0x%" PRIx64, typeName, (uint64_t)uses[object].thread, (uint64_t)tid); diff --git a/layers/unique_objects.cpp b/layers/unique_objects.cpp index d132393d..51bf57ce 100644 --- a/layers/unique_objects.cpp +++ b/layers/unique_objects.cpp @@ -72,7 +72,7 @@ static void InstanceExtensionWhitelist(const VkInstanceCreateInfo *pCreateInfo, // Check for recognized instance extensions if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kInstanceExtensionNames)) { log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_UNDEFINED, "UniqueObjects", + VALIDATION_ERROR_UNDEFINED, "Instance Extension %s is not supported by this layer. Using this extension may adversely affect validation " "results and/or produce undefined behavior.", pCreateInfo->ppEnabledExtensionNames[i]); @@ -88,7 +88,7 @@ static void DeviceExtensionWhitelist(const VkDeviceCreateInfo *pCreateInfo, VkDe // Check for recognized device extensions if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kDeviceExtensionNames)) { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - VALIDATION_ERROR_UNDEFINED, "UniqueObjects", + VALIDATION_ERROR_UNDEFINED, "Device Extension %s is not supported by this layer. Using this extension may adversely affect validation " "results and/or produce undefined behavior.", pCreateInfo->ppEnabledExtensionNames[i]); diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h index 3b83827a..2e7e2f9e 100644 --- a/layers/vk_layer_logging.h +++ b/layers/vk_layer_logging.h @@ -815,11 +815,10 @@ static inline int vasprintf(char **strp, char const *fmt, va_list ap) { // is only computed if a message needs to be logged #ifndef WIN32 static inline bool log_msg(const debug_report_data *debug_data, VkFlags msg_flags, VkDebugReportObjectTypeEXT object_type, - uint64_t src_object, int32_t msg_code, const char *layer_prefix, const char *format, ...) - __attribute__((format(printf, 7, 8))); + uint64_t src_object, int32_t msg_code, const char *format, ...) __attribute__((format(printf, 6, 7))); #endif static inline bool log_msg(const debug_report_data *debug_data, VkFlags msg_flags, VkDebugReportObjectTypeEXT object_type, - uint64_t src_object, int32_t msg_code, const char *layer_prefix, const char *format, ...) { + uint64_t src_object, int32_t msg_code, const char *format, ...) { VkFlags local_severity = 0; VkFlags local_type = 0; DebugReportFlagsToAnnotFlags(msg_flags, true, &local_severity, &local_type); @@ -845,7 +844,7 @@ static inline bool log_msg(const debug_report_data *debug_data, VkFlags msg_flag str_plus_spec_text += validation_error_map[msg_code]; } - bool result = debug_log_msg(debug_data, msg_flags, object_type, src_object, 0, msg_code, layer_prefix, + bool result = debug_log_msg(debug_data, msg_flags, object_type, src_object, 0, msg_code, "Validation", str_plus_spec_text.c_str() ? str_plus_spec_text.c_str() : "Allocation failure"); free(str); return result; diff --git a/scripts/parameter_validation_generator.py b/scripts/parameter_validation_generator.py index 5ad171fb..ecb98ffa 100644 --- a/scripts/parameter_validation_generator.py +++ b/scripts/parameter_validation_generator.py @@ -309,7 +309,7 @@ class ParameterValidationOutputGenerator(OutputGenerator): ext_template = 'template <typename T>\n' ext_template += 'bool OutputExtensionError(const T *layer_data, const std::string &api_name, const std::string &extension_name) {\n' ext_template += ' return log_msg(layer_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0,\n' - ext_template += ' EXTENSION_NOT_ENABLED, LayerName, "Attemped to call %s() but its required extension %s has not been enabled\\n",\n' + ext_template += ' EXTENSION_NOT_ENABLED, "Attemped to call %s() but its required extension %s has not been enabled\\n",\n' ext_template += ' api_name.c_str(), extension_name.c_str());\n' ext_template += '}\n' write(ext_template, file=self.outFile) |
