adding base Buffer, refactoring of unnecessary device layer functions

This commit is contained in:
2025-11-20 17:40:23 +01:00
parent 4c91713ccd
commit 967451a458
11 changed files with 208 additions and 190 deletions

View File

@@ -24,6 +24,11 @@ pub fn Dispatchable(comptime T: type) type {
return self;
}
pub inline fn intrusiveDestroy(self: *Self, allocator: std.mem.Allocator) void {
self.object.destroy(allocator);
allocator.destroy(self);
}
pub inline fn destroy(self: *Self, allocator: std.mem.Allocator) void {
allocator.destroy(self);
}
@@ -52,5 +57,9 @@ pub fn Dispatchable(comptime T: type) type {
const dispatchable_handle = try Self.fromHandle(handle);
return dispatchable_handle.object;
}
pub inline fn checkHandleValidity(handle: anytype) VkError!void {
_ = try Self.fromHandle(handle);
}
};
}