fixing test and docs
This commit is contained in:
@@ -15,9 +15,6 @@ comptime {
|
|||||||
if (!@hasDecl(root, "VULKAN_VERSION")) {
|
if (!@hasDecl(root, "VULKAN_VERSION")) {
|
||||||
@compileError("Missing VULKAN_VERSION in module root");
|
@compileError("Missing VULKAN_VERSION in module root");
|
||||||
}
|
}
|
||||||
if (!@hasDecl(root.Instance, "EXTENSIONS")) {
|
|
||||||
@compileError("Missing EXTENSIONS in Instance's implementation");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,12 +60,16 @@ pub fn enumerateExtensionProperties(layer_name: ?[]const u8, count: *u32, p_prop
|
|||||||
if (layer_name) |_| {
|
if (layer_name) |_| {
|
||||||
return VkError.LayerNotPresent;
|
return VkError.LayerNotPresent;
|
||||||
}
|
}
|
||||||
|
if (@hasDecl(root, "EXTENSIONS")) {
|
||||||
count.* = root.Instance.EXTENSIONS.len;
|
count.* = root.Instance.EXTENSIONS.len;
|
||||||
if (p_properties) |properties| {
|
if (p_properties) |properties| {
|
||||||
for (root.Instance.EXTENSIONS, 0..) |ext, i| {
|
for (root.Instance.EXTENSIONS, 0..) |ext, i| {
|
||||||
properties[i] = ext;
|
properties[i] = ext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
count.* = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn enumerateVersion(version: *u32) VkError!void {
|
pub fn enumerateVersion(version: *u32) VkError!void {
|
||||||
|
|||||||
Reference in New Issue
Block a user