From 7bf94579ca98332a4e1dd13db3ecb54c08cdebbf Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Wed, 22 Jun 2016 16:12:58 -0600 Subject: layers: Add INVALID_FRAMEBUFFER_CREATE_INFO error Added new error enum DRAWSTATE_INVALID_FRAMEBUFFER_CREATE_INFO and added initial check with this enum type that flags and error if framebuffer attachment has non-1 mip levelCount. --- layers/core_validation.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 82050326..b8c69161 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -8274,11 +8274,16 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf i, string_VkSampleCountFlagBits(ici->samples), string_VkSampleCountFlagBits(rpci->pAttachments[i].samples), reinterpret_cast(pCreateInfo->renderPass)); } -#if 0 // Enabling 1 new check/test at a time // Verify that view only has a single mip level if (ivci->subresourceRange.levelCount != 1) { - // TODO + skip_call |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, + reinterpret_cast(pCreateInfo->renderPass), __LINE__, DRAWSTATE_INVALID_FRAMEBUFFER_CREATE_INFO, + "DS", "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); } +#if 0 // Enabling 1 new check/test at a time const uint32_t mip_level = ivci->subresourceRange.baseMipLevel; if ((ivci->subresourceRange.layerCount < pCreateInfo->layers) || ((ici->extent.width >> mip_level) < pCreateInfo->width) || -- cgit v1.2.3