diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-01-27 14:50:23 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-01-31 09:55:10 -0700 |
| commit | 33dc2b9e2c0b56dd81868eb66a29e959c15caf5b (patch) | |
| tree | 30629aee8fbfc3bdca8d0e3811d4b68161b8a21c /layers/parameter_validation.cpp | |
| parent | c1b9d6d28618ccd48a7fd07501dfe62a610b272f (diff) | |
| download | usermoji-33dc2b9e2c0b56dd81868eb66a29e959c15caf5b.tar.xz | |
layers: Move CreateRenderPass format check to PV
Format validation check was in image layer -- removed the API
completely and moved check to parameter_validation. Also updated
to use the VU ID and noted it in the database.
Change-Id: I339925be7615777cfb1214ffe456a2498c676177
Diffstat (limited to 'layers/parameter_validation.cpp')
| -rw-r--r-- | layers/parameter_validation.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index 6ee96657..8b12c341 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -3754,6 +3754,16 @@ static bool PreCreateRenderPass(layer_data *dev_data, const VkRenderPassCreateIn bool skip = false; uint32_t max_color_attachments = dev_data->device_limits.maxColorAttachments; + for (uint32_t i = 0; i < pCreateInfo->attachmentCount; ++i) { + if (pCreateInfo->pAttachments[i].format == VK_FORMAT_UNDEFINED) { + std::stringstream ss; + ss << "vkCreateRenderPass: pCreateInfo->pAttachments[" << i << "].format is VK_FORMAT_UNDEFINED. " + << validation_error_map[VALIDATION_ERROR_00336]; + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, + VALIDATION_ERROR_00336, "IMAGE", "%s", ss.str().c_str()); + } + } + for (uint32_t i = 0; i < pCreateInfo->subpassCount; ++i) { if (pCreateInfo->pSubpasses[i].colorAttachmentCount > max_color_attachments) { skip |= |
