diff options
| author | Tobin Ehlis <tobin@lunarg.com> | 2015-09-17 08:46:18 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobin@lunarg.com> | 2015-09-21 11:41:46 -0600 |
| commit | 71ccff011ec16ed932fe8b58504f05d3915b64cb (patch) | |
| tree | 3910c90251f4ac30d027c9ca64722f3eb3ced822 /layers/draw_state.cpp | |
| parent | 3bbc9d950dff9879eea04a28757b93df6832e831 (diff) | |
| download | usermoji-71ccff011ec16ed932fe8b58504f05d3915b64cb.tar.xz | |
Remove old checks from pipeline.c and verify that they're handled in validation
Most checks were already handled in DrawState.
Added additional check for invalid patchControlPoints along with a new test, but test can't run on sample driver b/c TESS shaders not supported by the shader compiler.
For check that VBO vtx & attrib binding counts don't exceed VB array limit, added comment noting that this is a device-specific limit that should be captured in API-defined "maxVertexInputBindings" and added to DeviceLimits.
Also added pending task for ParamChecker to fix how it handles arrays in vkCreateGraphicsPipelines() call. It has a bug in how it handles check that each shader "stage" is within acceptable enum limits.
Diffstat (limited to 'layers/draw_state.cpp')
| -rw-r--r-- | layers/draw_state.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 83377115..4a894f24 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -505,10 +505,16 @@ static VkBool32 verifyPipelineCreateState(const VkDevice device, const PIPELINE_ skipCall |= log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) (VkDbgObjectType) 0, 0, 0, DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "DS", "Invalid Pipeline CreateInfo State: VK_PRIMITIVE_TOPOLOGY_PATCH must be set as IA topology for tessellation pipelines"); } - if ((pPipeline->iaStateCI.topology == VK_PRIMITIVE_TOPOLOGY_PATCH) && - (~pPipeline->active_shaders & VK_SHADER_STAGE_TESS_CONTROL_BIT)) { - skipCall |= log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) (VkDbgObjectType) 0, 0, 0, DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "DS", + if (pPipeline->iaStateCI.topology == VK_PRIMITIVE_TOPOLOGY_PATCH) { + if (~pPipeline->active_shaders & VK_SHADER_STAGE_TESS_CONTROL_BIT) { + skipCall |= log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) (VkDbgObjectType) 0, 0, 0, DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "DS", "Invalid Pipeline CreateInfo State: VK_PRIMITIVE_TOPOLOGY_PATCH primitive topology is only valid for tessellation pipelines"); + } + if (!pPipeline->tessStateCI.patchControlPoints || (pPipeline->tessStateCI.patchControlPoints > 32)) { + skipCall |= log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) (VkDbgObjectType) 0, 0, 0, DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "DS", + "Invalid Pipeline CreateInfo State: VK_PRIMITIVE_TOPOLOGY_PATCH primitive topology used with patchControlPoints value %u." + " patchControlPoints should be >0 and <=32.", pPipeline->tessStateCI.patchControlPoints); + } } return skipCall; } |
