Fix incorrect index data size
This commit is contained in:
1 parent
8bd595989d
commit
3806fa97a3
1 file changed
+1
-1
@@ -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
|
// Set up staging, vertex and index buffers
|
||||||
const size_t vertex_data_size = model.vertex_count * sizeof(vertex_t);
|
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;
|
VkBuffer staging_buf;
|
||||||
VkDeviceMemory staging_buf_mem;
|
VkDeviceMemory staging_buf_mem;
|
||||||
const size_t staging_buf_size = MAX(vertex_data_size, index_data_size);
|
const size_t staging_buf_size = MAX(vertex_data_size, index_data_size);
|
||||||
|
|||||||
Reference in new issue
Block a user