diff options
| author | Mike Schuchardt <mikes@lunarg.com> | 2017-04-26 15:25:23 -0600 |
|---|---|---|
| committer | Mike Schuchardt <mikes@lunarg.com> | 2017-05-05 09:49:20 -0600 |
| commit | 4771b415dcd07959c3d27366ae7b72fb067bb8f8 (patch) | |
| tree | 2f3f6037f03012670b7e53b60ba065c127024300 /layers/parameter_validation.cpp | |
| parent | fafe5f9dd7f239ca285b3947077fa6a51d3257c4 (diff) | |
| download | usermoji-4771b415dcd07959c3d27366ae7b72fb067bb8f8.tar.xz | |
layers: Move patchControlPoints validation
Move pTessellationState->patchControlPoints checks to parameter
validation where they will only be executed if the pipeline contains
tessellation stages.
Change-Id: I271f915625995f4a54045d0abe63ce27b9e023f9
Diffstat (limited to 'layers/parameter_validation.cpp')
| -rw-r--r-- | layers/parameter_validation.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index d9cd7f7d..301fb404 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -2961,6 +2961,19 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli "be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO. %s", i, validation_error_map[VALIDATION_ERROR_00538]); } + + if (pCreateInfos[i].pTessellationState->patchControlPoints == 0 || + pCreateInfos[i].pTessellationState->patchControlPoints > + device_data->device_limits.maxTessellationPatchSize) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_01426, LayerName, + "vkCreateGraphicsPipelines: invalid parameter " + "pCreateInfos[%d].pTessellationState->patchControlPoints value %u. patchControlPoints " + "should be >0 and <=%u. %s", + i, pCreateInfos[i].pTessellationState->patchControlPoints, + device_data->device_limits.maxTessellationPatchSize, + validation_error_map[VALIDATION_ERROR_01426]); + } } } } |
