implementing binary semaphores
Test / build_and_test (push) Successful in 40s
Build / build (push) Successful in 52s

This commit is contained in:
2026-06-06 11:25:21 +02:00
parent c7a298978a
commit 3fcdc26baf
11 changed files with 250 additions and 70 deletions
+10
View File
@@ -16,6 +16,8 @@ vtable: *const VTable,
pub const VTable = struct {
destroy: *const fn (*Self, std.mem.Allocator) void,
signal: *const fn (*Self) VkError!void,
wait: *const fn (*Self) VkError!void,
};
pub fn init(device: *Device, allocator: std.mem.Allocator, info: *const vk.SemaphoreCreateInfo) VkError!Self {
@@ -30,3 +32,11 @@ pub fn init(device: *Device, allocator: std.mem.Allocator, info: *const vk.Semap
pub inline fn destroy(self: *Self, allocator: std.mem.Allocator) void {
self.vtable.destroy(self, allocator);
}
pub inline fn signal(self: *Self) VkError!void {
try self.vtable.signal(self);
}
pub inline fn wait(self: *Self) VkError!void {
try self.vtable.wait(self);
}