Move to bindless design

Replaced DrawIndexed with DrawIndexedIndirect function. This way
less parameters are passed from CPU and are store in GPU
mapped memory. Multiple meshes with multiple instances also work.
This commit is contained in:
Piotr Krygier committed 2023-09-26 14:15:21 +02:00
1 parent 3a58bd8756
commit 252a0820ed
6 files changed
+175 -102

No files matched your search

+4 -13
View File
@@ -14,19 +14,6 @@
#include "vulkan_commons.h"
/**
* @brief Mesh data, with unique id and dynamic arrays holding vertices and indices.
* One mesh can have multiple instances.
*
*/
struct rse_mesh_t
{
uint32_t unique_id;
size_t vertices_count;
size_t indices_count;
size_t instances_count;
};
/**
* @brief Create a new mesh for provided vertices and indices.
*
@@ -73,6 +60,10 @@ size_t get_indices_count(uint16_t mesh_id);
*/
size_t get_instances_count(uint16_t mesh_id);
size_t get_vertex_offset(uint16_t mesh_id);
VkDrawIndexedIndirectCommand get_indices_data_buffer(uint16_t mesh_id);
#endif /* RSE_MESH_CONTROLLER_H */