Add various assertions throughout renderer

This commit is contained in:
2025-03-16 12:58:15 +10:00
parent ee2637cd36
commit 76b0e87f28
4 changed files with 7 additions and 8 deletions

View File

@@ -53,16 +53,14 @@ u32 VulkanRenderDriver::get_device_count() const {
}
const RenderDevice& VulkanRenderDriver::get_device(const u32 index) const {
NOVA_ASSERT(index < m_devices.size());
return m_devices[index];
}
void VulkanRenderDriver::create_device(const u32 index) {
NOVA_AUTO_TRACE();
if (m_device) {
NOVA_ERROR("VkDevice already created");
return;
}
NOVA_ASSERT(index < m_devices.size());
NOVA_ASSERT(!m_device);
m_physical_device = static_cast<VkPhysicalDevice>(m_devices[index].handle);
std::vector<VkDeviceQueueCreateInfo> queues;
@@ -324,4 +322,4 @@ VkAllocationCallbacks* VulkanRenderDriver::_get_allocator(const VkObjectType typ
// TODO: Add custom allocator
(void)type;
return nullptr;
}
}