From 1cc629e17b4e359b3c43f6ddd409b2bbc1002011 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Fri, 16 Dec 2016 13:08:00 -0700 Subject: [PATCH] layers: Move new check into parameter validation Added an old CreateGraphicsPipelines CV check into PV. Change-Id: I68310859e4ffc926502549b46a2fcc82af0e3538 --- layers/parameter_validation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index ad0ef24..cb7b5ac 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -2888,6 +2888,14 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli i, i, validation_error_map[VALIDATION_ERROR_02113]); } } else { + if (pCreateInfos[i].pViewportState->scissorCount != pCreateInfos[i].pViewportState->viewportCount) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, + VALIDATION_ERROR_01434, LayerName, + "Graphics Pipeline viewport count (%u) must match scissor count (%u). %s", + pCreateInfos[i].pViewportState->viewportCount, pCreateInfos[i].pViewportState->scissorCount, + validation_error_map[VALIDATION_ERROR_01434]); + } + skip |= validate_struct_pnext(report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pViewportState->pNext", ParameterName::IndexVector{i}), -- 2.7.4