adding gdb utils

This commit is contained in:
2025-11-16 15:28:12 +01:00
parent b8c7a6e41e
commit c74bc7fb15
3 changed files with 13 additions and 7 deletions

View File

@@ -25,6 +25,5 @@ pub fn init(device: *Device, allocator: std.mem.Allocator, info: *const vk.Comma
}
pub inline fn destroy(self: *Self, allocator: std.mem.Allocator) void {
std.debug.print("{any}\n", .{self});
self.vtable.destroy(self, allocator);
}

View File

@@ -51,7 +51,7 @@ pub fn init(device: *Device, allocator: std.mem.Allocator, info: *const vk.Comma
pub fn allocateCommandBuffers(self: *Self, info: *const vk.CommandBufferAllocateInfo) VkError![]*NonDispatchable(CommandBuffer) {
const allocator = self.host_allocator.allocator();
if (self.buffers.items.len < info.command_buffer_count or self.first_free_buffer_index + info.command_buffer_count > self.buffers.items.len) {
if (self.buffers.items.len < self.first_free_buffer_index + info.command_buffer_count) {
while (self.buffers.capacity < self.buffers.items.len + info.command_buffer_count) {
self.buffers.ensureUnusedCapacity(allocator, BUFFER_POOL_BASE_CAPACITY) catch return VkError.OutOfHostMemory;
}