From: Jason Ekstrand Date: Tue, 10 Nov 2015 19:31:31 +0000 (-0800) Subject: anv/gen7: Properly handle VS with VertexID but no vertices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b461744c52c60bb855d6119e9adc5f93b75480d5;p=mesa.git anv/gen7: Properly handle VS with VertexID but no vertices --- 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 =