adding debug vulkan resources names

This commit is contained in:
Kbz-8
2024-09-21 12:18:42 +02:00
parent 3f065bc77e
commit 0b3ca8ec0c
27 changed files with 306 additions and 104 deletions

View File

@@ -6,12 +6,14 @@ namespace mlx
{
void Mesh::Draw(VkCommandBuffer cmd, std::size_t& drawcalls, std::size_t& polygondrawn) const noexcept
{
MLX_PROFILE_FUNCTION();
for(std::size_t i = 0; i < m_sub_meshes.size(); i++)
Draw(cmd, drawcalls, polygondrawn, i);
}
void Mesh::Draw(VkCommandBuffer cmd, std::size_t& drawcalls, std::size_t& polygondrawn, std::size_t submesh_index) const noexcept
{
MLX_PROFILE_FUNCTION();
Verify(submesh_index < m_sub_meshes.size(), "invalid submesh index");
m_sub_meshes[submesh_index].vbo.Bind(cmd);
m_sub_meshes[submesh_index].ibo.Bind(cmd);
@@ -22,6 +24,7 @@ namespace mlx
Mesh::~Mesh()
{
MLX_PROFILE_FUNCTION();
for(auto& mesh : m_sub_meshes)
{
mesh.vbo.Destroy();