fixing debug allocator
Build / build (push) Successful in 4m14s
Test / build_and_test (push) Has been cancelled

This commit is contained in:
2026-05-08 14:23:49 +02:00
parent eb743c914e
commit e793cb6c3f
9 changed files with 72 additions and 28 deletions
+14 -1
View File
@@ -50,7 +50,7 @@ pub fn init(allocator: std.mem.Allocator, infos: *const vk.InstanceCreateInfo) V
};
}
/// Dummy for docs creation and stuff
/// Dummy to avoid compile error in tests and doc generation
pub fn create(allocator: std.mem.Allocator, infos: *const vk.InstanceCreateInfo) VkError!*Self {
_ = allocator;
_ = infos;
@@ -62,6 +62,19 @@ pub fn deinit(self: *Self, allocator: std.mem.Allocator) VkError!void {
try self.dispatch_table.destroy(self, allocator);
}
pub fn enumerateLayerProperties(count: *u32, p_properties: ?[*]vk.LayerProperties) VkError!void {
if (comptime !builtin.is_test and @hasDecl(root.Instance, "LAYERS")) {
count.* = root.Instance.LAYERS.len;
if (p_properties) |properties| {
for (root.Instance.LAYERS, properties[0..]) |layer, *prop| {
prop.* = layer;
}
}
} else {
count.* = 0;
}
}
pub fn enumerateExtensionProperties(layer_name: ?[]const u8, count: *u32, p_properties: ?[*]vk.ExtensionProperties) VkError!void {
if (layer_name) |_| {
return VkError.LayerNotPresent;