From 7ffa43a7e3ed89003a5317d93121924a56f21a40 Mon Sep 17 00:00:00 2001 From: Dustin Graves Date: Fri, 15 Apr 2016 18:06:14 -0600 Subject: layers: Make logicOp param validation conditional - Only validate that VkPipelineColorBlendStateCreateInfo::logicOp is a valid VkLogicOp enumeration value when VkPipelineColorBlendStateCreateInfo::logicOpEnable is set to VK_TRUE. - Remove redundant VkPipelineColorBlendStateCreateInfo validation (hand written code replaced by generated code). Change-Id: I075c58342678219c5ed1dd5c401e0da2cea53232 --- layers/parameter_validation.cpp | 55 ----------------------------------------- 1 file changed, 55 deletions(-) (limited to 'layers/parameter_validation.cpp') diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index b70cd322..b6e8f6d2 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -2481,61 +2481,6 @@ bool PreCreateGraphicsPipelines(VkDevice device, const VkGraphicsPipelineCreateI return false; } } - if (pCreateInfos->pColorBlendState != nullptr) { - if (pCreateInfos->pColorBlendState->logicOpEnable == VK_TRUE && - (pCreateInfos->pColorBlendState->logicOp < VK_LOGIC_OP_BEGIN_RANGE || - pCreateInfos->pColorBlendState->logicOp > VK_LOGIC_OP_END_RANGE)) { - log_msg(mdd(device), VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "PARAMCHECK", - "vkCreateGraphicsPipelines parameter, VkLogicOp pCreateInfos->pColorBlendState->logicOp, is an " - "unrecognized enumerator"); - return false; - } - if (pCreateInfos->pColorBlendState->pAttachments != nullptr && - pCreateInfos->pColorBlendState->pAttachments->blendEnable == VK_TRUE) { - if (pCreateInfos->pColorBlendState->pAttachments->srcColorBlendFactor < VK_BLEND_FACTOR_BEGIN_RANGE || - pCreateInfos->pColorBlendState->pAttachments->srcColorBlendFactor > VK_BLEND_FACTOR_END_RANGE) { - log_msg(mdd(device), VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "PARAMCHECK", - "vkCreateGraphicsPipelines parameter, VkBlendFactor " - "pCreateInfos->pColorBlendState->pAttachments->srcColorBlendFactor, is an unrecognized enumerator"); - return false; - } - if (pCreateInfos->pColorBlendState->pAttachments->dstColorBlendFactor < VK_BLEND_FACTOR_BEGIN_RANGE || - pCreateInfos->pColorBlendState->pAttachments->dstColorBlendFactor > VK_BLEND_FACTOR_END_RANGE) { - log_msg(mdd(device), VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "PARAMCHECK", - "vkCreateGraphicsPipelines parameter, VkBlendFactor " - "pCreateInfos->pColorBlendState->pAttachments->dstColorBlendFactor, is an unrecognized enumerator"); - return false; - } - if (pCreateInfos->pColorBlendState->pAttachments->colorBlendOp < VK_BLEND_OP_BEGIN_RANGE || - pCreateInfos->pColorBlendState->pAttachments->colorBlendOp > VK_BLEND_OP_END_RANGE) { - log_msg(mdd(device), VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "PARAMCHECK", - "vkCreateGraphicsPipelines parameter, VkBlendOp " - "pCreateInfos->pColorBlendState->pAttachments->colorBlendOp, is an unrecognized enumerator"); - return false; - } - if (pCreateInfos->pColorBlendState->pAttachments->srcAlphaBlendFactor < VK_BLEND_FACTOR_BEGIN_RANGE || - pCreateInfos->pColorBlendState->pAttachments->srcAlphaBlendFactor > VK_BLEND_FACTOR_END_RANGE) { - log_msg(mdd(device), VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "PARAMCHECK", - "vkCreateGraphicsPipelines parameter, VkBlendFactor " - "pCreateInfos->pColorBlendState->pAttachments->srcAlphaBlendFactor, is an unrecognized enumerator"); - return false; - } - if (pCreateInfos->pColorBlendState->pAttachments->dstAlphaBlendFactor < VK_BLEND_FACTOR_BEGIN_RANGE || - pCreateInfos->pColorBlendState->pAttachments->dstAlphaBlendFactor > VK_BLEND_FACTOR_END_RANGE) { - log_msg(mdd(device), VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "PARAMCHECK", - "vkCreateGraphicsPipelines parameter, VkBlendFactor " - "pCreateInfos->pColorBlendState->pAttachments->dstAlphaBlendFactor, is an unrecognized enumerator"); - return false; - } - if (pCreateInfos->pColorBlendState->pAttachments->alphaBlendOp < VK_BLEND_OP_BEGIN_RANGE || - pCreateInfos->pColorBlendState->pAttachments->alphaBlendOp > VK_BLEND_OP_END_RANGE) { - log_msg(mdd(device), VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "PARAMCHECK", - "vkCreateGraphicsPipelines parameter, VkBlendOp " - "pCreateInfos->pColorBlendState->pAttachments->alphaBlendOp, is an unrecognized enumerator"); - return false; - } - } - } if (pCreateInfos->renderPass == VK_NULL_HANDLE) { log_msg(mdd(device), VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "PARAMCHECK", "vkCreateGraphicsPipelines parameter, VkRenderPass pCreateInfos->renderPass, is null pointer"); -- cgit v1.2.3