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
+9
View File
@@ -19,6 +19,11 @@ pub fn NonDispatchable(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);
}
@@ -47,5 +52,9 @@ pub fn NonDispatchable(comptime T: type) type {
const non_dispatchable_handle = try Self.fromHandle(handle);
return non_dispatchable_handle.object;
}
pub inline fn checkHandleValidity(handle: anytype) VkError!void {
_ = try Self.fromHandle(handle);
}
};
}