Mesa (main): anv: Use input assembly state only when pipeline has vertex stage
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Oct 4 19:18:16 UTC 2021
Module: Mesa
Branch: main
Commit: 1f1ad5a9b43e1757e6603668b1266f29af2dba9c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f1ad5a9b43e1757e6603668b1266f29af2dba9c
Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date: Tue Aug 31 14:49:57 2021 +0200
anv: Use input assembly state only when pipeline has vertex stage
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>
---
src/intel/vulkan/anv_pipeline.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index eded787ea66..509bb500b58 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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;
More information about the mesa-commit
mailing list