working on events

This commit is contained in:
2025-12-14 23:11:35 +01:00
parent 86e1e8ab6c
commit bbd21e55de
5 changed files with 136 additions and 33 deletions
+20
View File
@@ -16,6 +16,10 @@ vtable: *const VTable,
pub const VTable = struct {
destroy: *const fn (*Self, std.mem.Allocator) void,
getStatus: *const fn (*Self) VkError!void,
reset: *const fn (*Self) VkError!void,
signal: *const fn (*Self) VkError!void,
wait: *const fn (*Self, u64) VkError!void,
};
pub fn init(device: *Device, allocator: std.mem.Allocator, info: *const vk.EventCreateInfo) VkError!Self {
@@ -30,3 +34,19 @@ pub fn init(device: *Device, allocator: std.mem.Allocator, info: *const vk.Event
pub inline fn destroy(self: *Self, allocator: std.mem.Allocator) void {
self.vtable.destroy(self, allocator);
}
pub inline fn getStatus(self: *Self) VkError!void {
try self.vtable.getStatus(self);
}
pub inline fn reset(self: *Self) VkError!void {
try self.vtable.reset(self);
}
pub inline fn signal(self: *Self) VkError!void {
try self.vtable.signal(self);
}
pub inline fn wait(self: *Self, timeout: u64) VkError!void {
try self.vtable.wait(self, timeout);
}