diff options
-rw-r--r-- | src/vulkan/gen7_pipeline.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vulkan/gen7_pipeline.c b/src/vulkan/gen7_pipeline.c index 3622071ead2..269d9d46ac5 100644 --- a/src/vulkan/gen7_pipeline.c +++ b/src/vulkan/gen7_pipeline.c @@ -39,10 +39,11 @@ gen7_emit_vertex_input(struct anv_pipeline *pipeline, const uint32_t num_dwords = 1 + element_count * 2; uint32_t *p; - if (info->attributeCount > 0) { - p = anv_batch_emitn(&pipeline->batch, num_dwords, - GEN7_3DSTATE_VERTEX_ELEMENTS); - } + if (info->attributeCount == 0 && !sgvs) + return; + + p = anv_batch_emitn(&pipeline->batch, num_dwords, + GEN7_3DSTATE_VERTEX_ELEMENTS); for (uint32_t i = 0; i < info->attributeCount; i++) { const VkVertexInputAttributeDescription *desc = |