From 164aed6c8142a995c6ac1c36ee7a16896f675163 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 24 Apr 2020 12:27:21 -0500 Subject: [PATCH] anv:gpu_memcpy: Emit 3DSTATE_VF_INDEXING on Gen8+ If this gets run right after something which uses VK_VERTEX_INPUT_RATE_INSTANCE on its first vertex binding, we could end up in serious trouble. Fixes: 3d9747780b "anv: Add a helper for doing buffer copies with..." Reviewed-by: Rafael Antognolli Part-of: --- src/intel/vulkan/genX_gpu_memcpy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/intel/vulkan/genX_gpu_memcpy.c b/src/intel/vulkan/genX_gpu_memcpy.c index 504c70f3ef3..57dc55ec394 100644 --- a/src/intel/vulkan/genX_gpu_memcpy.c +++ b/src/intel/vulkan/genX_gpu_memcpy.c @@ -112,6 +112,13 @@ genX(cmd_buffer_so_memcpy)(struct anv_cmd_buffer *cmd_buffer, .Component3Control = (bs >= 16) ? VFCOMP_STORE_SRC : VFCOMP_STORE_0, }); +#if GEN_GEN >= 8 + anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_VF_INSTANCING), vfi) { + vfi.InstancingEnable = false; + vfi.VertexElementIndex = 0; + } +#endif + #if GEN_GEN >= 8 anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_VF_SGVS), sgvs); #endif -- 2.30.2