aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
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
commit4c7d9209f06da42e4977b5c99e7efd8dc7d0f348 (patch)
tree9362f8dc8870c71bf5ff110ff2b12f864b838be0 /layers/core_validation.cpp
parent0201de00f8fa5f80f07c172f488330b72ffa3424 (diff)
downloadusermoji-4c7d9209f06da42e4977b5c99e7efd8dc7d0f348.tar.xz
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.
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp24
1 files changed, 11 insertions, 13 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)) ||