working on wsi
Test / build_and_test (push) Failing after 1m4s
Build / build (push) Successful in 1m9s

This commit is contained in:
2026-05-05 02:21:35 +02:00
parent ed50a39cb4
commit 82a13f47a4
17 changed files with 458 additions and 115 deletions
+7 -3
View File
@@ -20,13 +20,13 @@ pub fn NonDispatchable(comptime T: type) type {
return self;
}
pub inline fn intrusiveDestroy(self: *Self, allocator: std.mem.Allocator) void {
pub fn intrusiveDestroy(self: *Self, allocator: std.mem.Allocator) void {
self.object.destroy(allocator);
allocator.destroy(self);
std.log.debug("Destroyed non dispatchable handle of type '{s}' at 0x{X}", .{ @typeName(T), @intFromPtr(self) });
}
pub inline fn destroy(self: *Self, allocator: std.mem.Allocator) void {
pub fn destroy(self: *Self, allocator: std.mem.Allocator) void {
allocator.destroy(self);
std.log.debug("Destroyed non dispatchable handle of type '{s}' at 0x{X}", .{ @typeName(T), @intFromPtr(self) });
}
@@ -39,7 +39,11 @@ pub fn NonDispatchable(comptime T: type) type {
return @enumFromInt(@intFromPtr(self));
}
pub inline fn fromHandle(vk_handle: anytype) VkError!*Self {
pub fn fromObject(object: *T) *Self {
return @alignCast(@constCast(@fieldParentPtr("object", &object)));
}
pub fn fromHandle(vk_handle: anytype) VkError!*Self {
const handle = @intFromEnum(vk_handle);
if (handle == 0) {
return VkError.InvalidHandleDrv;