layers:Remove redundant check
authorTobin Ehlis <tobine@google.com>
Wed, 4 Jan 2017 15:23:39 +0000 (08:23 -0700)
committerTobin Ehlis <tobine@google.com>
Wed, 4 Jan 2017 22:05:18 +0000 (15:05 -0700)
Core_validation has a shared to check to verify image layout for both
vkCmdClearColorImage() and vkCmdClearDepthStencilImage(). Removing the
same check for color images from image layer.

layers/image.cpp

index 5899dcf..45786f8 100644 (file)
@@ -442,14 +442,6 @@ VKAPI_ATTR void VKAPI_CALL CmdClearColorImage(VkCommandBuffer commandBuffer, VkI
     bool skipCall = false;
     layer_data *device_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map);
 
-    if (imageLayout != VK_IMAGE_LAYOUT_GENERAL && imageLayout != VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
-        char const str[] =
-            "vkCmdClearColorImage parameter, imageLayout, must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL";
-        skipCall |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
-                            (uint64_t)commandBuffer, __LINE__, VALIDATION_ERROR_01086, "IMAGE", "%s. %s", str,
-                            validation_error_map[VALIDATION_ERROR_01086]);
-    }
-
     // For each range, image aspect must be color only
     // TODO: this is a 'must' in the spec, so there should be a VU enum for it
     for (uint32_t i = 0; i < rangeCount; i++) {