anv: Set 3DSTATE_VF_INSTANCING on the SVGS element
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 13 May 2020 03:31:54 +0000 (22:31 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 14 May 2020 00:34:47 +0000 (00:34 +0000)
It probably doesn't matter because that buffer should have a stride of
zero.  However, it still seems like a good idea just to be safe.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5022>

src/intel/vulkan/genX_pipeline.c

index f3f9333cc76a2f105afcc791c4e913b86af67492..e17ba6750d4d2c01d6ad011da41ef1de04f91de8 100644 (file)
@@ -219,6 +219,12 @@ emit_vertex_input(struct anv_graphics_pipeline *pipeline,
 #endif
       };
       GENX(VERTEX_ELEMENT_STATE_pack)(NULL, &p[1 + id_slot * 2], &element);
+
+#if GEN_GEN >= 8
+      anv_batch_emit(&pipeline->base.batch, GENX(3DSTATE_VF_INSTANCING), vfi) {
+         vfi.VertexElementIndex = id_slot;
+      }
+#endif
    }
 
 #if GEN_GEN >= 8