anv: Use input assembly state only when pipeline has vertex stage
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> 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:

committed by
Marge Bot

parent
d79c518a32
commit
1f1ad5a9b4
@@ -2036,7 +2036,8 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
|
||||
pCreateInfo->pRasterizationState->frontFace;
|
||||
}
|
||||
|
||||
if (states & ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY) {
|
||||
if ((states & ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY) &&
|
||||
(pipeline->active_stages & VK_SHADER_STAGE_VERTEX_BIT)) {
|
||||
assert(pCreateInfo->pInputAssemblyState);
|
||||
dynamic->primitive_topology = pCreateInfo->pInputAssemblyState->topology;
|
||||
}
|
||||
@@ -2053,7 +2054,8 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
|
||||
pCreateInfo->pRasterizationState->depthBiasEnable;
|
||||
}
|
||||
|
||||
if (states & ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_RESTART_ENABLE) {
|
||||
if ((states & ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_RESTART_ENABLE) &&
|
||||
(pipeline->active_stages & VK_SHADER_STAGE_VERTEX_BIT)) {
|
||||
assert(pCreateInfo->pInputAssemblyState);
|
||||
dynamic->primitive_restart_enable =
|
||||
pCreateInfo->pInputAssemblyState->primitiveRestartEnable;
|
||||
|
Reference in New Issue
Block a user