vk: Fix 3DSTATE_VERTEX_BUFFER emission
authorKristian Høgsberg <kristian.h.kristensen@intel.com>
Tue, 12 May 2015 05:25:52 +0000 (22:25 -0700)
committerKristian Høgsberg <kristian.h.kristensen@intel.com>
Tue, 12 May 2015 06:25:29 +0000 (23:25 -0700)
Set VertexBufferIndex to the attribute binding, not the location.

src/vulkan/pipeline.c

index 445ffde..a7775cf 100644 (file)
@@ -92,7 +92,7 @@ emit_vertex_input(struct anv_pipeline *pipeline, VkPipelineVertexInputCreateInfo
       const struct anv_format *format = anv_format_for_vk_format(desc->format);
 
       struct GEN8_VERTEX_ELEMENT_STATE element = {
-         .VertexBufferIndex = desc->location,
+         .VertexBufferIndex = desc->binding,
          .Valid = true,
          .SourceElementFormat = format->format,
          .EdgeFlagEnable = false,