diff --git a/gpu.c b/gpu.c index f775985..2c9660e 100644 --- a/gpu.c +++ b/gpu.c @@ -778,7 +778,7 @@ void gpu_init(gpu_ctx_t *ctx, const gpu_config_t *config, model_t model) // Set up staging, vertex and index buffers const size_t vertex_data_size = model.vertex_count * sizeof(vertex_t); - const size_t index_data_size = model.index_count * sizeof(vertex_t); + const size_t index_data_size = model.index_count * sizeof(index_t); VkBuffer staging_buf; VkDeviceMemory staging_buf_mem; const size_t staging_buf_size = MAX(vertex_data_size, index_data_size);