aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-11-28 18:07:18 +1300
committerChris Forbes <chrisforbes@google.com>2016-11-29 08:31:01 +1300
commitd5688524bcdd2f7571d22ddb852d04ea4308284c (patch)
tree336a11160bfa9bea368d9942b2f89437cf1372d4
parent07e63b8d3db7b7d374adaacabe53daa630f343ea (diff)
downloadusermoji-d5688524bcdd2f7571d22ddb852d04ea4308284c.tar.xz
layers: Remove extra 'no depth/stencil attachments exist' error
This is now covered by other fairly clear errors. Signed-off-by: Chris Forbes <chrisforbes@google.com>
-rw-r--r--layers/image.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/layers/image.cpp b/layers/image.cpp
index a07e7b3b..ac5284cb 100644
--- a/layers/image.cpp
+++ b/layers/image.cpp
@@ -405,7 +405,6 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP
const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) {
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
bool skip_call = false;
- bool depth_format_present = false;
for (uint32_t i = 0; i < pCreateInfo->attachmentCount; ++i) {
if (pCreateInfo->pAttachments[i].format == VK_FORMAT_UNDEFINED) {
@@ -439,24 +438,8 @@ 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());
}
-
- // Any depth buffers specified as attachments?
- depth_format_present |= vk_format_is_depth_or_stencil(pCreateInfo->pAttachments[i].format);
}
- if (!depth_format_present) {
- // No depth attachment is present, validate that subpasses set depthStencilAttachment to VK_ATTACHMENT_UNUSED;
- for (uint32_t i = 0; i < pCreateInfo->subpassCount; i++) {
- if (pCreateInfo->pSubpasses[i].pDepthStencilAttachment &&
- pCreateInfo->pSubpasses[i].pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) {
- std::stringstream ss;
- ss << "vkCreateRenderPass has no depth/stencil attachment, yet subpass[" << i
- << "] has VkSubpassDescription::depthStencilAttachment value that is not VK_ATTACHMENT_UNUSED";
- skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0,
- __LINE__, IMAGE_RENDERPASS_INVALID_DS_ATTACHMENT, "IMAGE", "%s", ss.str().c_str());
- }
- }
- }
if (skip_call) {
return VK_ERROR_VALIDATION_FAILED_EXT;
}