layers: Change pNext validation error to warning
Change the severity level of the parameter_validation layer's pNext
parameter validation messages from error to warning. Also add an
explanation that the warning is derived from the Valid Usage
language from version X of the Vulkan spec/header, which may be out
of date:
This warning is based on the Valid Usage documentation for version %d
of the Vulkan header. It is possible that you are using a struct
from a private extension or an extension that was added to a later
version of the Vulkan header, in which case your use of pNext is
perfectly valid but is not guaranteed to work correctly with
validation enabled
Issues-Addressed: LunarXchange 560
Change-Id: I97f55cba7538506d246e45ef603a86db9ad1adcb
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp
index 80be9ce..4d2f9f9 100644
--- a/layers/parameter_validation.cpp
+++ b/layers/parameter_validation.cpp
@@ -2802,7 +2802,7 @@
} else {
skip_call |=
validate_struct_pnext(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pTessellationState->pNext",
- NULL, pCreateInfos[i].pTessellationState->pNext, 0, NULL);
+ NULL, pCreateInfos[i].pTessellationState->pNext, 0, NULL, GeneratedHeaderVersion);
skip_call |=
validate_reserved_flags(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pTessellationState->flags",
@@ -2832,7 +2832,7 @@
} else {
skip_call |=
validate_struct_pnext(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pViewportState->pNext", NULL,
- pCreateInfos[i].pViewportState->pNext, 0, NULL);
+ pCreateInfos[i].pViewportState->pNext, 0, NULL, GeneratedHeaderVersion);
skip_call |=
validate_reserved_flags(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pViewportState->flags",
@@ -2919,7 +2919,7 @@
} else {
skip_call |=
validate_struct_pnext(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pMultisampleState->pNext",
- NULL, pCreateInfos[i].pMultisampleState->pNext, 0, NULL);
+ NULL, pCreateInfos[i].pMultisampleState->pNext, 0, NULL, GeneratedHeaderVersion);
skip_call |=
validate_reserved_flags(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pMultisampleState->flags",
@@ -2955,7 +2955,7 @@
if (pCreateInfos[i].pDepthStencilState != nullptr) {
skip_call |=
validate_struct_pnext(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pDepthStencilState->pNext",
- NULL, pCreateInfos[i].pDepthStencilState->pNext, 0, NULL);
+ NULL, pCreateInfos[i].pDepthStencilState->pNext, 0, NULL, GeneratedHeaderVersion);
skip_call |=
validate_reserved_flags(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pDepthStencilState->flags",
@@ -3027,7 +3027,7 @@
if (pCreateInfos[i].pColorBlendState != nullptr) {
skip_call |=
validate_struct_pnext(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pColorBlendState->pNext", NULL,
- pCreateInfos[i].pColorBlendState->pNext, 0, NULL);
+ pCreateInfos[i].pColorBlendState->pNext, 0, NULL, GeneratedHeaderVersion);
skip_call |=
validate_reserved_flags(report_data, "vkCreateGraphicsPipelines", "pCreateInfos[i].pColorBlendState->flags",
@@ -3788,7 +3788,7 @@
if (pBeginInfo->pInheritanceInfo != NULL) {
skip_call |= validate_struct_pnext(report_data, "vkBeginCommandBuffer", "pBeginInfo->pInheritanceInfo->pNext", NULL,
- pBeginInfo->pInheritanceInfo->pNext, 0, NULL);
+ pBeginInfo->pInheritanceInfo->pNext, 0, NULL, GeneratedHeaderVersion);
skip_call |= validate_bool32(report_data, "vkBeginCommandBuffer", "pBeginInfo->pInheritanceInfo->occlusionQueryEnable",
pBeginInfo->pInheritanceInfo->occlusionQueryEnable);