summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCort Stratton <cort@google.com>2017-04-27 16:25:03 +0200
committerCort <cdwfs@users.noreply.github.com>2017-04-28 12:07:23 +0200
commit2c911c34092d685a7fa4630028f6fcf4bf80e349 (patch)
tree790999e826588494de893af3cd68b600d3cfff4d
parentc70c914e514d6ee222af18505e6d4ce8387c3fa2 (diff)
tests: Update vkCreateFramebuffer tests
- Add tests for width/height/layers of zero. - Fix one VU check that wasn't using its corresponding error code. - Migrate string-based tests to error-code-based variants. - database update.
-rw-r--r--layers/core_validation.cpp24
-rw-r--r--layers/vk_validation_error_database.txt36
-rw-r--r--tests/layer_validation_tests.cpp68
3 files changed, 66 insertions, 62 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 5644d5b3..3fe1b0df 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -8567,19 +8567,17 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf
uint32_t mip_height = max(1u, ici->extent.height >> mip_level);
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,
- __LINE__, DRAWSTATE_INVALID_FRAMEBUFFER_CREATE_INFO, "DS",
- "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u mip level %u has dimensions smaller "
- "than the corresponding "
- "framebuffer dimensions. Attachment dimensions must be at least as large. Here are the respective "
- "dimensions for "
- "attachment #%u, framebuffer:\n"
- "width: %u, %u\n"
- "height: %u, %u\n"
- "layerCount: %u, %u\n",
- i, ivci.subresourceRange.baseMipLevel, i, mip_width, pCreateInfo->width, mip_height,
- pCreateInfo->height, ivci.subresourceRange.layerCount, pCreateInfo->layers);
+ skip |= log_msg(
+ dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__,
+ VALIDATION_ERROR_00410, "DS",
+ "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"
+ "width: %u, %u\n"
+ "height: %u, %u\n"
+ "layerCount: %u, %u\n%s",
+ i, ivci.subresourceRange.baseMipLevel, i, mip_width, pCreateInfo->width, mip_height, pCreateInfo->height,
+ ivci.subresourceRange.layerCount, pCreateInfo->layers, validation_error_map[VALIDATION_ERROR_00410]);
}
if (((ivci.components.r != VK_COMPONENT_SWIZZLE_IDENTITY) && (ivci.components.r != VK_COMPONENT_SWIZZLE_R)) ||
((ivci.components.g != VK_COMPONENT_SWIZZLE_IDENTITY) && (ivci.components.g != VK_COMPONENT_SWIZZLE_G)) ||
diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt
index fc98723e..9fde6e57 100644
--- a/layers/vk_validation_error_database.txt
+++ b/layers/vk_validation_error_database.txt
@@ -381,24 +381,24 @@ VALIDATION_ERROR_00400~^~Y~^~None~^~vkCreateFramebuffer~^~For more information r
VALIDATION_ERROR_00401~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'pCreateInfo must be a pointer to a valid VkFramebufferCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkCreateFramebuffer)~^~implicit
VALIDATION_ERROR_00402~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkCreateFramebuffer)~^~implicit
VALIDATION_ERROR_00403~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'pFramebuffer must be a pointer to a VkFramebuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkCreateFramebuffer)~^~implicit
-VALIDATION_ERROR_00404~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'attachmentCount must be equal to the attachment count specified in renderPass' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00405~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments that is used as a color attachment or resolve attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00406~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments that is used as a depth/stencil attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00407~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments that is used as an input attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00408~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must have been created with an VkFormat value that matches the VkFormat specified by the corresponding VkAttachmentDescription in renderPass' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00409~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must have been created with a samples value that matches the samples value specified by the corresponding VkAttachmentDescription in renderPass' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00410~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must have dimensions at least as large as the corresponding framebuffer dimension' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00411~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must only specify a single mip level' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00412~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must have been created with the identity swizzle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00413~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'width must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferWidth' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00414~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'height must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferHeight' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_00415~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'layers must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferLayers' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00404~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'attachmentCount must be equal to the attachment count specified in renderPass' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00405~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments that is used as a color attachment or resolve attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00406~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments that is used as a depth/stencil attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00407~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments that is used as an input attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00408~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must have been created with an VkFormat value that matches the VkFormat specified by the corresponding VkAttachmentDescription in renderPass' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00409~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must have been created with a samples value that matches the samples value specified by the corresponding VkAttachmentDescription in renderPass' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00410~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must have dimensions at least as large as the corresponding framebuffer dimension' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00411~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must only specify a single mip level' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00412~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Any given element of pAttachments must have been created with the identity swizzle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00413~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'width must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferWidth' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00414~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'height must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferHeight' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_00415~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'layers must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferLayers' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
VALIDATION_ERROR_00416~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'sType must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~implicit, TBD in parameter validation layer.
VALIDATION_ERROR_00417~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~implicit, TBD in parameter validation layer.
VALIDATION_ERROR_00418~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~implicit, TBD in parameter validation layer.
-VALIDATION_ERROR_00419~^~Y~^~None~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'renderPass must be a valid VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~implicit
-VALIDATION_ERROR_00420~^~Y~^~None~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'If attachmentCount is not 0, pAttachments must be a pointer to an array of attachmentCount valid VkImageView handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~implicit
-VALIDATION_ERROR_00421~^~Y~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Both of renderPass, and the elements of pAttachments that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~implicit
+VALIDATION_ERROR_00419~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'renderPass must be a valid VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~implicit
+VALIDATION_ERROR_00420~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'If attachmentCount is not 0, pAttachments must be a pointer to an array of attachmentCount valid VkImageView handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~implicit
+VALIDATION_ERROR_00421~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'Both of renderPass, and the elements of pAttachments that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~implicit
VALIDATION_ERROR_00422~^~Y~^~FramebufferInUseDestroyedSignaled~^~vkDestroyFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'All submitted commands that refer to framebuffer must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkDestroyFramebuffer)~^~
VALIDATION_ERROR_00423~^~Y~^~Unknown~^~vkDestroyFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'If VkAllocationCallbacks were provided when framebuffer was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkDestroyFramebuffer)~^~
VALIDATION_ERROR_00424~^~Y~^~Unknown~^~vkDestroyFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'If no VkAllocationCallbacks were provided when framebuffer was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkDestroyFramebuffer)~^~
@@ -2626,9 +2626,9 @@ VALIDATION_ERROR_02802~^~N~^~Unknown~^~vkCreateRenderPass~^~For more information
VALIDATION_ERROR_02803~^~N~^~Unknown~^~vkCreateRenderPass~^~For more information refer to Vulkan Spec Section '7.1. Render Pass Creation' which states 'If dependencyFlags includes VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX, then both srcSubpass and dstSubpass must not equal VK_SUBPASS_EXTERNAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkSubpassDependency)~^~
VALIDATION_ERROR_02804~^~N~^~Unknown~^~vkCreateRenderPass~^~For more information refer to Vulkan Spec Section '7.1. Render Pass Creation' which states 'If dependencyFlags includes VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX, then the render pass must have multiview enabled' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkSubpassDependency)~^~
VALIDATION_ERROR_02805~^~N~^~Unknown~^~vkCreateRenderPass~^~For more information refer to Vulkan Spec Section '7.1. Render Pass Creation' which states 'If srcSubpass equals dstSubpass and that subpass has more than one bit set in the view mask, then dependencyFlags must include VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkSubpassDependency)~^~
-VALIDATION_ERROR_02806~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'width must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_02807~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'height must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
-VALIDATION_ERROR_02808~^~N~^~Unknown~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'layers must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_02806~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'width must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_02807~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'height must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
+VALIDATION_ERROR_02808~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~For more information refer to Vulkan Spec Section '7.3. Framebuffers' which states 'layers must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkFramebufferCreateInfo)~^~
VALIDATION_ERROR_02809~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~For more information refer to Vulkan Spec Section '7.4. Render Pass Commands' which states 'pNext must be NULL or a pointer to a valid instance of VkDeviceGroupRenderPassBeginInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkRenderPassBeginInfo)~^~implicit
VALIDATION_ERROR_02810~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~For more information refer to Vulkan Spec Section '7.4. Render Pass Commands' which states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkDeviceGroupRenderPassBeginInfoKHX)~^~
VALIDATION_ERROR_02811~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~For more information refer to Vulkan Spec Section '7.4. Render Pass Commands' which states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkDeviceGroupRenderPassBeginInfoKHX)~^~
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 0dabef9e..41a342db 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -3886,15 +3886,14 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
" 4. Mismatch framebuffer & renderPass attachment #samples\n"
" 5. Framebuffer attachment w/ non-1 mip-levels\n"
" 6. Framebuffer attachment where dimensions don't match\n"
- " 7. Framebuffer attachment w/o identity swizzle\n"
- " 8. framebuffer dimensions exceed physical device limits\n");
+ " 7. Framebuffer attachment where dimensions don't match\n"
+ " 8. Framebuffer attachment w/o identity swizzle\n"
+ " 9. framebuffer dimensions exceed physical device limits\n");
ASSERT_NO_FATAL_FAILURE(Init());
ASSERT_NO_FATAL_FAILURE(InitRenderTarget());
- m_errorMonitor->SetDesiredFailureMsg(
- VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "vkCreateFramebuffer(): VkFramebufferCreateInfo attachmentCount of 2 does not match attachmentCount of 1 of ");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00404);
// Create a renderPass with a single color attachment
VkAttachmentReference attach = {};
@@ -3949,7 +3948,7 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
fb_info.attachmentCount = 1;
fb_info.renderPass = rp_ds;
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " conflicts with the image's IMAGE_USAGE flags ");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00406);
err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
m_errorMonitor->VerifyFound();
@@ -3968,8 +3967,7 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
// Cause error due to mis-matched formats between rp & fb
// rp attachment 0 now has RGBA8 but corresponding fb attach is BGRA8
fb_info.renderPass = rp;
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
- " has format of VK_FORMAT_B8G8R8A8_UNORM that does not match ");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00408);
err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
m_errorMonitor->VerifyFound();
@@ -3986,8 +3984,7 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
// Cause error due to mis-matched sample count between rp & fb
fb_info.renderPass = rp;
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
- " has VK_SAMPLE_COUNT_1_BIT samples that do not match the VK_SAMPLE_COUNT_4_BIT ");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00409);
err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
m_errorMonitor->VerifyFound();
@@ -4025,7 +4022,7 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
fb_info.renderPass = rp;
fb_info.pAttachments = &view;
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " has mip levelCount of 2 but only ");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00411);
err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
m_errorMonitor->VerifyFound();
@@ -4040,7 +4037,7 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
fb_info.height = 1024;
fb_info.width = 1024;
fb_info.layers = 2;
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " Attachment dimensions must be at least as large. ");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00410);
err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
m_errorMonitor->VerifyFound();
@@ -4077,9 +4074,7 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
fb_info.width = 100;
fb_info.layers = 1;
- m_errorMonitor->SetDesiredFailureMsg(
- VK_DEBUG_REPORT_ERROR_BIT_EXT,
- " has non-identy swizzle. All framebuffer attachments must have been created with the identity swizzle. ");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00412);
err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
m_errorMonitor->VerifyFound();
@@ -4097,13 +4092,16 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
fb_info.height = 100;
fb_info.layers = 1;
m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00413);
- m_errorMonitor->SetDesiredFailureMsg(
- VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "has dimensions smaller than the corresponding framebuffer dimensions. Attachment dimensions must be at least as large. "
- "Here are the respective dimensions for attachment");
-
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00410);
+ err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
+ m_errorMonitor->VerifyFound();
+ if (err == VK_SUCCESS) {
+ vkDestroyFramebuffer(m_device->device(), fb, NULL);
+ }
+ // and width=0
+ fb_info.width = 0;
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_02806);
err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
-
m_errorMonitor->VerifyFound();
if (err == VK_SUCCESS) {
vkDestroyFramebuffer(m_device->device(), fb, NULL);
@@ -4114,12 +4112,16 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
fb_info.height = m_device->props.limits.maxFramebufferHeight + 1;
fb_info.layers = 1;
m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00414);
- m_errorMonitor->SetDesiredFailureMsg(
- VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "has dimensions smaller than the corresponding framebuffer dimensions. Attachment dimensions must be at least as large. "
- "Here are the respective dimensions for attachment");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00410);
+ err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
+ m_errorMonitor->VerifyFound();
+ if (err == VK_SUCCESS) {
+ vkDestroyFramebuffer(m_device->device(), fb, NULL);
+ }
+ // and height=0
+ fb_info.height = 0;
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_02807);
err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
-
m_errorMonitor->VerifyFound();
if (err == VK_SUCCESS) {
vkDestroyFramebuffer(m_device->device(), fb, NULL);
@@ -4130,12 +4132,16 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) {
fb_info.height = 100;
fb_info.layers = m_device->props.limits.maxFramebufferLayers + 1;
m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00415);
- m_errorMonitor->SetDesiredFailureMsg(
- VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "has dimensions smaller than the corresponding framebuffer dimensions. Attachment dimensions must be at least as large. "
- "Here are the respective dimensions for attachment");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00410);
+ err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
+ m_errorMonitor->VerifyFound();
+ if (err == VK_SUCCESS) {
+ vkDestroyFramebuffer(m_device->device(), fb, NULL);
+ }
+ // and layers=0
+ fb_info.layers = 0;
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_02808);
err = vkCreateFramebuffer(device(), &fb_info, NULL, &fb);
-
m_errorMonitor->VerifyFound();
if (err == VK_SUCCESS) {
vkDestroyFramebuffer(m_device->device(), fb, NULL);