diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-12-15 13:15:12 -0700 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-12-20 09:34:10 -0700 |
| commit | ebae2ff64ac09a3f4f9e4bb296d6733901386244 (patch) | |
| tree | d78e41ad011309b9ed03cb990c7c9066d87b9e87 | |
| parent | afeb3a68bf13f59b9fd4514e25e0bfda8587fae0 (diff) | |
| download | usermoji-ebae2ff64ac09a3f4f9e4bb296d6733901386244.tar.xz | |
layers: Remove redundant CreateRenderpass checks
From the image layer. The check for valid attachment layouts
and load/storeOps already performed in the parameter validation
layer. Also removed now-dead support function and unneeded
header file.
Change-Id: I4f1ad1ba899a712ba21ae32e3b3e2d947b640f4d
| -rw-r--r-- | layers/image.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/layers/image.cpp b/layers/image.cpp index ac5284cb..ebf04ecc 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -40,7 +40,6 @@ #include "vk_loader_platform.h" #include "vk_dispatch_table_helper.h" #include "vk_struct_string_helper_cpp.h" -#include "vk_enum_validate_helper.h" #include "image.h" #include "vk_layer_config.h" #include "vk_layer_extension_utils.h" @@ -217,10 +216,6 @@ static const VkLayerProperties global_layer = { // Start of the Image layer proper -static inline uint32_t validate_VkImageLayoutKHR(VkImageLayout input_value) { - return ((validate_VkImageLayout(input_value) == 1) || (input_value == VK_IMAGE_LAYOUT_PRESENT_SRC_KHR)); -} - VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage) { bool skip_call = false; @@ -413,31 +408,6 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, IMAGE_RENDERPASS_INVALID_ATTACHMENT, "IMAGE", "%s", ss.str().c_str()); } - - if (!validate_VkImageLayoutKHR(pCreateInfo->pAttachments[i].initialLayout) || - !validate_VkImageLayoutKHR(pCreateInfo->pAttachments[i].finalLayout)) { - std::stringstream ss; - ss << "vkCreateRenderPass parameter, VkImageLayout in pCreateInfo->pAttachments[" << i << "], is unrecognized"; - // TODO: Verify against Valid Use section of spec. Generally if something yield an undefined result, it's invalid - skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, - IMAGE_RENDERPASS_INVALID_ATTACHMENT, "IMAGE", "%s", ss.str().c_str()); - } - - if (!validate_VkAttachmentLoadOp(pCreateInfo->pAttachments[i].loadOp)) { - std::stringstream ss; - ss << "vkCreateRenderPass parameter, VkAttachmentLoadOp in pCreateInfo->pAttachments[" << i << "], is unrecognized"; - // TODO: Verify against Valid Use section of spec. Generally if something yield an undefined result, it's invalid - skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, - IMAGE_RENDERPASS_INVALID_ATTACHMENT, "IMAGE", "%s", ss.str().c_str()); - } - - if (!validate_VkAttachmentStoreOp(pCreateInfo->pAttachments[i].storeOp)) { - std::stringstream ss; - ss << "vkCreateRenderPass parameter, VkAttachmentStoreOp in pCreateInfo->pAttachments[" << i << "], is unrecognized"; - // TODO: Verify against Valid Use section of spec. Generally if something yield an undefined result, it's invalid - skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, - IMAGE_RENDERPASS_INVALID_ATTACHMENT, "IMAGE", "%s", ss.str().c_str()); - } } if (skip_call) { |
