diff options
| author | Dustin Graves <dustin@lunarg.com> | 2016-04-15 18:06:14 -0600 |
|---|---|---|
| committer | Dustin Graves <dustin@lunarg.com> | 2016-04-18 11:51:12 -0600 |
| commit | 7ffa43a7e3ed89003a5317d93121924a56f21a40 (patch) | |
| tree | 44dc2fcc5f10a0800be3cd9e8bc8950acb9332c0 /layers/parameter_validation.cpp | |
| parent | bd690e5f72f4b4780886c9a8dbc1b890929d5d33 (diff) | |
| download | usermoji-7ffa43a7e3ed89003a5317d93121924a56f21a40.tar.xz | |
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
Diffstat (limited to 'layers/parameter_validation.cpp')
| -rw-r--r-- | layers/parameter_validation.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
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"); |
