diff options
| author | Petr Kraus <petr_kraus@email.cz> | 2017-11-24 03:05:50 +0100 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-11-28 13:23:54 -0700 |
| commit | 2cc79644d84f7d35fd30ea264f238fe3bb6d174e (patch) | |
| tree | 3483834b1d602789203ba78da86b8821b64bb7da | |
| parent | 67d12020496164151f5961190d860195d5da9c06 (diff) | |
| download | usermoji-2cc79644d84f7d35fd30ea264f238fe3bb6d174e.tar.xz | |
layers: Quick fix odd create PSO param checks
- param check did only check the first create info
- `cullMode` check should be redundant to the automated part
| -rw-r--r-- | layers/parameter_validation_utils.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/layers/parameter_validation_utils.cpp b/layers/parameter_validation_utils.cpp index e29d74fb..1975299a 100644 --- a/layers/parameter_validation_utils.cpp +++ b/layers/parameter_validation_utils.cpp @@ -1411,12 +1411,10 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache } } } - } - if (pCreateInfos != nullptr) { - if (pCreateInfos->flags & VK_PIPELINE_CREATE_DERIVATIVE_BIT) { - if (pCreateInfos->basePipelineIndex != -1) { - if (pCreateInfos->basePipelineHandle != VK_NULL_HANDLE) { + if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_DERIVATIVE_BIT) { + if (pCreateInfos[i].basePipelineIndex != -1) { + if (pCreateInfos[i].basePipelineHandle != VK_NULL_HANDLE) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_096005a8, LayerName, @@ -1427,8 +1425,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache } } - if (pCreateInfos->basePipelineHandle != VK_NULL_HANDLE) { - if (pCreateInfos->basePipelineIndex != -1) { + if (pCreateInfos[i].basePipelineHandle != VK_NULL_HANDLE) { + if (pCreateInfos[i].basePipelineIndex != -1) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_096005aa, LayerName, @@ -1441,16 +1439,8 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache } } - if (pCreateInfos->pRasterizationState != nullptr) { - if (pCreateInfos->pRasterizationState->cullMode & ~VK_CULL_MODE_FRONT_AND_BACK) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - UNRECOGNIZED_VALUE, LayerName, - "vkCreateGraphicsPipelines parameter, VkCullMode pCreateInfos->pRasterizationState->cullMode, is an " - "unrecognized enumerator"); - } - - if ((pCreateInfos->pRasterizationState->polygonMode != VK_POLYGON_MODE_FILL) && + if (pCreateInfos[i].pRasterizationState) { + if ((pCreateInfos[i].pRasterizationState->polygonMode != VK_POLYGON_MODE_FILL) && (device_data->physical_device_features.fillModeNonSolid == false)) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, @@ -1461,7 +1451,6 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache } } - size_t i = 0; for (size_t j = 0; j < pCreateInfos[i].stageCount; j++) { skip |= validate_string(device_data->report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pStages[%i].pName", ParameterName::IndexVector{i, j}), |
