diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-07-25 15:10:29 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-07-26 14:30:46 -0600 |
| commit | 3a0c72c59bf6d378ea8802c532adb12e3cc4c546 (patch) | |
| tree | bee210e23a3375161d372feb470baecdac2e48c8 /layers/parameter_validation.cpp | |
| parent | ab87a84283d781ce108742ae9d664652b7edbb09 (diff) | |
| download | usermoji-3a0c72c59bf6d378ea8802c532adb12e3cc4c546.tar.xz | |
scripts: Generate calls to new enum PV function
Change-Id: I9692f1b2101d6cc1eef3bf55582dbf7980c4e8d2
Diffstat (limited to 'layers/parameter_validation.cpp')
| -rw-r--r-- | layers/parameter_validation.cpp | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index 7d6cf318..6d126937 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -2190,8 +2190,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->depthCompareOp", ParameterName::IndexVector{i}), - "VkCompareOp", VK_COMPARE_OP_BEGIN_RANGE, VK_COMPARE_OP_END_RANGE, - pCreateInfos[i].pDepthStencilState->depthCompareOp, VALIDATION_ERROR_0f604001); + "VkCompareOp", AllVkCompareOpEnums, pCreateInfos[i].pDepthStencilState->depthCompareOp, + VALIDATION_ERROR_0f604001); skip |= validate_bool32( report_data, "vkCreateGraphicsPipelines", @@ -2206,50 +2206,50 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->front.failOp", ParameterName::IndexVector{i}), - "VkStencilOp", VK_STENCIL_OP_BEGIN_RANGE, VK_STENCIL_OP_END_RANGE, - pCreateInfos[i].pDepthStencilState->front.failOp, VALIDATION_ERROR_13a08601); + "VkStencilOp", AllVkStencilOpEnums, pCreateInfos[i].pDepthStencilState->front.failOp, + VALIDATION_ERROR_13a08601); skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->front.passOp", ParameterName::IndexVector{i}), - "VkStencilOp", VK_STENCIL_OP_BEGIN_RANGE, VK_STENCIL_OP_END_RANGE, - pCreateInfos[i].pDepthStencilState->front.passOp, VALIDATION_ERROR_13a27801); + "VkStencilOp", AllVkStencilOpEnums, pCreateInfos[i].pDepthStencilState->front.passOp, + VALIDATION_ERROR_13a27801); skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->front.depthFailOp", ParameterName::IndexVector{i}), - "VkStencilOp", VK_STENCIL_OP_BEGIN_RANGE, VK_STENCIL_OP_END_RANGE, - pCreateInfos[i].pDepthStencilState->front.depthFailOp, VALIDATION_ERROR_13a04201); + "VkStencilOp", AllVkStencilOpEnums, pCreateInfos[i].pDepthStencilState->front.depthFailOp, + VALIDATION_ERROR_13a04201); skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->front.compareOp", ParameterName::IndexVector{i}), - "VkCompareOp", VK_COMPARE_OP_BEGIN_RANGE, VK_COMPARE_OP_END_RANGE, - pCreateInfos[i].pDepthStencilState->front.compareOp, VALIDATION_ERROR_0f604001); + "VkCompareOp", AllVkCompareOpEnums, pCreateInfos[i].pDepthStencilState->front.compareOp, + VALIDATION_ERROR_0f604001); skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->back.failOp", ParameterName::IndexVector{i}), - "VkStencilOp", VK_STENCIL_OP_BEGIN_RANGE, VK_STENCIL_OP_END_RANGE, - pCreateInfos[i].pDepthStencilState->back.failOp, VALIDATION_ERROR_13a08601); + "VkStencilOp", AllVkStencilOpEnums, pCreateInfos[i].pDepthStencilState->back.failOp, + VALIDATION_ERROR_13a08601); skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->back.passOp", ParameterName::IndexVector{i}), - "VkStencilOp", VK_STENCIL_OP_BEGIN_RANGE, VK_STENCIL_OP_END_RANGE, - pCreateInfos[i].pDepthStencilState->back.passOp, VALIDATION_ERROR_13a27801); + "VkStencilOp", AllVkStencilOpEnums, pCreateInfos[i].pDepthStencilState->back.passOp, + VALIDATION_ERROR_13a27801); skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->back.depthFailOp", ParameterName::IndexVector{i}), - "VkStencilOp", VK_STENCIL_OP_BEGIN_RANGE, VK_STENCIL_OP_END_RANGE, - pCreateInfos[i].pDepthStencilState->back.depthFailOp, VALIDATION_ERROR_13a04201); + "VkStencilOp", AllVkStencilOpEnums, pCreateInfos[i].pDepthStencilState->back.depthFailOp, + VALIDATION_ERROR_13a04201); skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->back.compareOp", ParameterName::IndexVector{i}), - "VkCompareOp", VK_COMPARE_OP_BEGIN_RANGE, VK_COMPARE_OP_END_RANGE, - pCreateInfos[i].pDepthStencilState->back.compareOp, VALIDATION_ERROR_0f604001); + "VkCompareOp", AllVkCompareOpEnums, pCreateInfos[i].pDepthStencilState->back.compareOp, + VALIDATION_ERROR_0f604001); if (pCreateInfos[i].pDepthStencilState->sType != VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, @@ -2296,7 +2296,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pColorBlendState->pAttachments[%i].srcColorBlendFactor", ParameterName::IndexVector{i, attachmentIndex}), - "VkBlendFactor", VK_BLEND_FACTOR_BEGIN_RANGE, VK_BLEND_FACTOR_END_RANGE, + "VkBlendFactor", AllVkBlendFactorEnums, pCreateInfos[i].pColorBlendState->pAttachments[attachmentIndex].srcColorBlendFactor, VALIDATION_ERROR_0f22cc01); @@ -2304,7 +2304,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pColorBlendState->pAttachments[%i].dstColorBlendFactor", ParameterName::IndexVector{i, attachmentIndex}), - "VkBlendFactor", VK_BLEND_FACTOR_BEGIN_RANGE, VK_BLEND_FACTOR_END_RANGE, + "VkBlendFactor", AllVkBlendFactorEnums, pCreateInfos[i].pColorBlendState->pAttachments[attachmentIndex].dstColorBlendFactor, VALIDATION_ERROR_0f207001); @@ -2312,7 +2312,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pColorBlendState->pAttachments[%i].colorBlendOp", ParameterName::IndexVector{i, attachmentIndex}), - "VkBlendOp", VK_BLEND_OP_BEGIN_RANGE, VK_BLEND_OP_END_RANGE, + "VkBlendOp", AllVkBlendOpEnums, pCreateInfos[i].pColorBlendState->pAttachments[attachmentIndex].colorBlendOp, VALIDATION_ERROR_0f202001); @@ -2320,7 +2320,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pColorBlendState->pAttachments[%i].srcAlphaBlendFactor", ParameterName::IndexVector{i, attachmentIndex}), - "VkBlendFactor", VK_BLEND_FACTOR_BEGIN_RANGE, VK_BLEND_FACTOR_END_RANGE, + "VkBlendFactor", AllVkBlendFactorEnums, pCreateInfos[i].pColorBlendState->pAttachments[attachmentIndex].srcAlphaBlendFactor, VALIDATION_ERROR_0f22c601); @@ -2328,7 +2328,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pColorBlendState->pAttachments[%i].dstAlphaBlendFactor", ParameterName::IndexVector{i, attachmentIndex}), - "VkBlendFactor", VK_BLEND_FACTOR_BEGIN_RANGE, VK_BLEND_FACTOR_END_RANGE, + "VkBlendFactor", AllVkBlendFactorEnums, pCreateInfos[i].pColorBlendState->pAttachments[attachmentIndex].dstAlphaBlendFactor, VALIDATION_ERROR_0f206a01); @@ -2336,7 +2336,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pColorBlendState->pAttachments[%i].alphaBlendOp", ParameterName::IndexVector{i, attachmentIndex}), - "VkBlendOp", VK_BLEND_OP_BEGIN_RANGE, VK_BLEND_OP_END_RANGE, + "VkBlendOp", AllVkBlendOpEnums, pCreateInfos[i].pColorBlendState->pAttachments[attachmentIndex].alphaBlendOp, VALIDATION_ERROR_0f200801); @@ -2363,7 +2363,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli skip |= validate_ranged_enum( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pColorBlendState->logicOp", ParameterName::IndexVector{i}), "VkLogicOp", - VK_LOGIC_OP_BEGIN_RANGE, VK_LOGIC_OP_END_RANGE, pCreateInfos[i].pColorBlendState->logicOp, + AllVkLogicOpEnums, pCreateInfos[i].pColorBlendState->logicOp, VALIDATION_ERROR_UNDEFINED); } } @@ -2481,8 +2481,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler(VkDevice device, const VkSamplerCre // If compareEnable is VK_TRUE, compareOp must be a valid VkCompareOp value if (pCreateInfo->compareEnable == VK_TRUE) { skip |= validate_ranged_enum(report_data, "vkCreateSampler", "pCreateInfo->compareOp", "VkCompareOp", - VK_COMPARE_OP_BEGIN_RANGE, VK_COMPARE_OP_END_RANGE, pCreateInfo->compareOp, - VALIDATION_ERROR_12600870); + AllVkCompareOpEnums, pCreateInfo->compareOp, VALIDATION_ERROR_12600870); } // If any of addressModeU, addressModeV or addressModeW are VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, borderColor must be a @@ -2491,8 +2490,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler(VkDevice device, const VkSamplerCre (pCreateInfo->addressModeV == VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER) || (pCreateInfo->addressModeW == VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER)) { skip |= validate_ranged_enum(report_data, "vkCreateSampler", "pCreateInfo->borderColor", "VkBorderColor", - VK_BORDER_COLOR_BEGIN_RANGE, VK_BORDER_COLOR_END_RANGE, pCreateInfo->borderColor, - VALIDATION_ERROR_1260086c); + AllVkBorderColorEnums, pCreateInfo->borderColor, VALIDATION_ERROR_1260086c); } // If any of addressModeU, addressModeV or addressModeW are VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, the @@ -2752,7 +2750,7 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets(VkDevice device, uint32_t descri skip |= validate_ranged_enum(report_data, "vkUpdateDescriptorSets", ParameterName("pDescriptorWrites[%i].pImageInfo[%i].imageLayout", ParameterName::IndexVector{i, descriptor_index}), - "VkImageLayout", VK_IMAGE_LAYOUT_BEGIN_RANGE, VK_IMAGE_LAYOUT_END_RANGE, + "VkImageLayout", AllVkImageLayoutEnums, pDescriptorWrites[i].pImageInfo[descriptor_index].imageLayout, VALIDATION_ERROR_UNDEFINED); } |
