}
bool PreCallValidateCmdResolveImage(core_validation::layer_data *device_data, GLOBAL_CB_NODE *cb_node, IMAGE_STATE *src_image_state,
- IMAGE_STATE *dst_image_state, uint32_t regionCount, const VkImageResolve *pRegions) {
+ IMAGE_STATE *dst_image_state, uint32_t regionCount, const VkImageResolve *pRegions) {
const debug_report_data *report_data = core_validation::GetReportData(device_data);
bool skip = false;
if (cb_node && src_image_state && dst_image_state) {
for (uint32_t i = 0; i < regionCount; i++) {
if (pRegions[i].srcSubresource.layerCount == 0) {
char const str[] = "vkCmdResolveImage: number of layers in source subresource is zero";
- // TODO: Verify against Valid Use section of spec. Generally if something yield an undefined result, it's
- // invalid/error
- skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
+ skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
reinterpret_cast<uint64_t>(cb_node->commandBuffer), __LINE__, DRAWSTATE_MISMATCHED_IMAGE_ASPECT,
"IMAGE", str);
}
-
if (pRegions[i].dstSubresource.layerCount == 0) {
char const str[] = "vkCmdResolveImage: number of layers in destination subresource is zero";
-
- // TODO: Verify against Valid Use section of spec. Generally if something yield an undefined result, it's
- // invalid/error
- skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
+ skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
reinterpret_cast<uint64_t>(cb_node->commandBuffer), __LINE__, DRAWSTATE_MISMATCHED_IMAGE_ASPECT,
"IMAGE", str);
}
-
- // TODO: VALIDATION_ERROR_01339
-
+ 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,
+ reinterpret_cast<uint64_t>(cb_node->commandBuffer), __LINE__, VALIDATION_ERROR_01339, "IMAGE",
+ "vkCmdResolveImage: layerCount in source and destination subresource of pRegions[%d] does not match. %s", i,
+ validation_error_map[VALIDATION_ERROR_01339]);
+ }
if ((pRegions[i].srcSubresource.aspectMask != VK_IMAGE_ASPECT_COLOR_BIT) ||
(pRegions[i].dstSubresource.aspectMask != VK_IMAGE_ASPECT_COLOR_BIT)) {
char const 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_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
+ skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
reinterpret_cast<uint64_t>(cb_node->commandBuffer), __LINE__, DRAWSTATE_MISMATCHED_IMAGE_FORMAT,
"IMAGE", 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_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
+ skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
reinterpret_cast<uint64_t>(cb_node->commandBuffer), __LINE__, DRAWSTATE_MISMATCHED_IMAGE_TYPE, "IMAGE",
str);
}
VALIDATION_ERROR_01336~^~N~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'regionCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdResolveImage)~^~implicit
VALIDATION_ERROR_01337~^~N~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'Each of commandBuffer, dstImage, and srcImage must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdResolveImage)~^~implicit
VALIDATION_ERROR_01338~^~Y~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'The aspectMask member of srcSubresource and dstSubresource must only contain VK_IMAGE_ASPECT_COLOR_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkImageResolve)~^~
-VALIDATION_ERROR_01339~^~N~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'The layerCount member of srcSubresource and dstSubresource must match' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkImageResolve)~^~
+VALIDATION_ERROR_01339~^~Y~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'The layerCount member of srcSubresource and dstSubresource must match' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkImageResolve)~^~
VALIDATION_ERROR_01340~^~N~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'If either of the calling commands srcImage or dstImage parameters are of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of both srcSubresource and dstSubresource must be 0 and 1, respectively' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkImageResolve)~^~
VALIDATION_ERROR_01341~^~N~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'srcSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkImageResolve)~^~implicit
VALIDATION_ERROR_01342~^~N~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'dstSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkImageResolve)~^~implicit