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