anv: Validate vertex related states only when VS is present
Mesh pipeline doesn't use those states, so we can't assert them unconditionally for a graphics pipeline. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>
This commit is contained in:
parent
82c69c9a9d
commit
bc2545fc57
|
@ -2265,8 +2265,6 @@ anv_pipeline_validate_create_info(const VkGraphicsPipelineCreateInfo *info)
|
|||
subpass = &renderpass->subpasses[info->subpass];
|
||||
|
||||
assert(info->stageCount >= 1);
|
||||
assert(info->pVertexInputState);
|
||||
assert(info->pInputAssemblyState);
|
||||
assert(info->pRasterizationState);
|
||||
if (!info->pRasterizationState->rasterizerDiscardEnable) {
|
||||
assert(info->pViewportState);
|
||||
|
@ -2291,6 +2289,10 @@ anv_pipeline_validate_create_info(const VkGraphicsPipelineCreateInfo *info)
|
|||
|
||||
for (uint32_t i = 0; i < info->stageCount; ++i) {
|
||||
switch (info->pStages[i].stage) {
|
||||
case VK_SHADER_STAGE_VERTEX_BIT:
|
||||
assert(info->pVertexInputState);
|
||||
assert(info->pInputAssemblyState);
|
||||
break;
|
||||
case VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT:
|
||||
case VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT:
|
||||
assert(info->pTessellationState);
|
||||
|
|
Loading…
Reference in New Issue