vk/formats: Document new meaning of anv_format::cpp
[mesa.git] / src / vulkan / pipeline.c
index 8be47c91205471843106b3c3fcc37954c2ab9dbf..f574038f83f072bcde9aae1be7f78ee6aa058e46 100644 (file)
@@ -96,13 +96,13 @@ emit_vertex_input(struct anv_pipeline *pipeline, VkPipelineVertexInputCreateInfo
       struct GEN8_VERTEX_ELEMENT_STATE element = {
          .VertexBufferIndex = desc->binding,
          .Valid = true,
-         .SourceElementFormat = format->format,
+         .SourceElementFormat = format->surface_format,
          .EdgeFlagEnable = false,
          .SourceElementOffset = desc->offsetInBytes,
          .Component0Control = VFCOMP_STORE_SRC,
-         .Component1Control = format->channels >= 2 ? VFCOMP_STORE_SRC : VFCOMP_STORE_0,
-         .Component2Control = format->channels >= 3 ? VFCOMP_STORE_SRC : VFCOMP_STORE_0,
-         .Component3Control = format->channels >= 4 ? VFCOMP_STORE_SRC : VFCOMP_STORE_1_FP
+         .Component1Control = format->num_channels >= 2 ? VFCOMP_STORE_SRC : VFCOMP_STORE_0,
+         .Component2Control = format->num_channels >= 3 ? VFCOMP_STORE_SRC : VFCOMP_STORE_0,
+         .Component3Control = format->num_channels >= 4 ? VFCOMP_STORE_SRC : VFCOMP_STORE_1_FP
       };
       GEN8_VERTEX_ELEMENT_STATE_pack(NULL, &p[1 + i * 2], &element);