adding functions

This commit is contained in:
2025-11-04 22:52:39 +01:00
parent 12ad577c25
commit dd527acc2e
5 changed files with 120 additions and 54 deletions

View File

@@ -4,6 +4,14 @@ const VkError = @import("error_set.zig").VkError;
const Dispatchable = @import("Dispatchable.zig").Dispatchable;
const PhysicalDevice = @import("PhysicalDevice.zig");
const root = @import("root");
comptime {
if (!@hasDecl(root, "VULKAN_VERSION")) {
@compileError("Missing VULKAN_VERSION in module root");
}
}
const Self = @This();
pub const ObjectType: vk.ObjectType = .instance;
@@ -41,6 +49,10 @@ pub fn enumerateExtensionProperties(layer_name: ?[]const u8, property_count: *u3
property_count.* = 0;
}
pub fn enumerateVersion(version: *u32) VkError!void {
version.* = @bitCast(root.VULKAN_VERSION);
}
pub fn releasePhysicalDevices(self: *Self, allocator: std.mem.Allocator) VkError!void {
try self.dispatch_table.releasePhysicalDevices(self, allocator);
}