If there are no attributes, don't emit 3DSTATE_VERTEX_ELEMENTS.
That packet does not allow 0 attributes.
const uint32_t num_dwords = 1 + element_count * 2;
uint32_t *p;
- p = anv_batch_emitn(&pipeline->batch, num_dwords,
- GEN7_3DSTATE_VERTEX_ELEMENTS);
+ if (info->attributeCount > 0) {
+ p = anv_batch_emitn(&pipeline->batch, num_dwords,
+ GEN7_3DSTATE_VERTEX_ELEMENTS);
+ }
for (uint32_t i = 0; i < info->attributeCount; i++) {
const VkVertexInputAttributeDescription *desc =
const uint32_t num_dwords = 1 + info->attributeCount * 2;
uint32_t *p;
- p = anv_batch_emitn(&pipeline->batch, num_dwords,
- GEN8_3DSTATE_VERTEX_ELEMENTS);
+ if (info->attributeCount > 0) {
+ p = anv_batch_emitn(&pipeline->batch, num_dwords,
+ GEN8_3DSTATE_VERTEX_ELEMENTS);
+ }
for (uint32_t i = 0; i < info->attributeCount; i++) {
const VkVertexInputAttributeDescription *desc =