From d2cb27753510cc87908690fb8234bb8509b299c8 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Thu, 15 Dec 2016 15:49:59 -0700 Subject: layers: GH1261, Incorrect ParamValidation error msgs Out-of-date dynamic state errors incorrectly specified that viewport or scissor counts had to be greater than zero 'if the dynamic state bit was not specified'. Removed this confusing condition. Change-Id: Idf206e8671b04979b7a0f5e9597e4a7aec50333f --- layers/parameter_validation.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'layers/parameter_validation.cpp') diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index cb7b5ac0..a3d5b90f 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -2929,12 +2929,10 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli // viewportCount must be greater than 0 // TODO: viewportCount must be 1 when multiple_viewport feature is not enabled if (pCreateInfos[i].pViewportState->viewportCount == 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, REQUIRED_PARAMETER, LayerName, - "vkCreateGraphicsPipelines: if pCreateInfos[%d].pDynamicState->pDynamicStates does " - "not contain VK_DYNAMIC_STATE_VIEWPORT, pCreateInfos[%d].pViewportState->viewportCount " - "must be greater than 0", - i, i); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + REQUIRED_PARAMETER, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%d].pViewportState->viewportCount must be greater than 0", i); } // If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT, the pViewports @@ -2951,12 +2949,10 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli // scissorCount must be greater than 0 // TODO: scissorCount must be 1 when multiple_viewport feature is not enabled if (pCreateInfos[i].pViewportState->scissorCount == 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, REQUIRED_PARAMETER, LayerName, - "vkCreateGraphicsPipelines: if pCreateInfos[%d].pDynamicState->pDynamicStates does " - "not contain VK_DYNAMIC_STATE_SCISSOR, pCreateInfos[%d].pViewportState->scissorCount " - "must be greater than 0", - i, i); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + REQUIRED_PARAMETER, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%d].pViewportState->scissorCount must be greater than 0", i); } // If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SCISSOR, the pScissors member -- cgit v1.2.3