+static void
+create_vertex_descriptions(struct vk_ctx *ctx,
+ struct vk_geometry *geometry,
+ int num_bind_dsc,
+ VkVertexInputBindingDescription *bind_dsc,
+ int num_att_dsc,
+ VkVertexInputAttributeDescription *att_dsc)
+{
+ VkFormat format;
+ VkFormatProperties fmt_props;
+ uint32_t stride;
+
+ assert(num_bind_dsc == num_att_dsc);
+
+ memset(bind_dsc, 0, num_bind_dsc * sizeof bind_dsc[0]);
+ memset(att_dsc, 0, num_att_dsc * sizeof att_dsc[0]);
+
+ /* FIXME!!! format and stride!!
+ * We have 3D Vectors so we need an RGB format:
+ * R for x, G for y, B for z
+ * If we need to set the w we need an RGBA format!
+ * the stride (distance between 2 consecutive elements
+ * must be 8 as we use 32bits floats and 32bits = 8bytes
+ */
+ format = VK_FORMAT_R32G32B32_SFLOAT;
+ vkGetPhysicalDeviceFormatProperties(ctx->pdev, format, &fmt_props);
+ assert(fmt_props.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT);
+ stride = 8;
+
+ /* Assumming that:
+ * 0 = vertices
+ * 1 = indices
+ * 2 = normals
+ * 3 = tangets
+ */
+
+ if (geometry->vertices.num_vertices) {
+ att_dsc[0].location = VERTEX_LOC;
+ att_dsc[0].binding = VERTEX_BIND;
+ att_dsc[0].format = format;
+ att_dsc[0].offset = 0;
+
+ bind_dsc[0].binding = VERTEX_BIND;
+ bind_dsc[0].stride = stride;
+ bind_dsc[0].inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
+ }
+
+ if (geometry->indices.num_vertices) {
+ }
+
+ if (geometry->normals.num_vertices) {
+ }
+
+ if (geometry->tangents.num_vertices) {
+ }
+}
+