adding base Buffer, refactoring of unnecessary device layer functions
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user