forked from AbleOS/ableos
35 lines
1,006 B
Plaintext
35 lines
1,006 B
Plaintext
|
application := @use("rel:application.hb");
|
||
|
.{ApplicationInfo} := application
|
||
|
|
||
|
structures := @use("rel:structures.hb")
|
||
|
errors := @use("rel:errors.hb")
|
||
|
|
||
|
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkInstanceCreateInfo.html
|
||
|
InstanceCreateInfo := struct {
|
||
|
sType: int,
|
||
|
pNext: int,
|
||
|
flags: int,
|
||
|
application_info: ^ApplicationInfo,
|
||
|
enabled_layer_count: int,
|
||
|
ppEnabledLayerNames: int,
|
||
|
enabled_extension_count: int,
|
||
|
ppEnabledExtensionNames: int,
|
||
|
}
|
||
|
|
||
|
new_create_info := fn(application_info: ^ApplicationInfo): InstanceCreateInfo {
|
||
|
create_info_type := structures.InstanceCreateInfoType
|
||
|
enabled_layer_count := 0
|
||
|
|
||
|
create_info := InstanceCreateInfo.(create_info_type, 0, 0, application_info, enabled_layer_count, 0, 0, 0)
|
||
|
return create_info
|
||
|
}
|
||
|
|
||
|
// TODO
|
||
|
Instance := struct {inner: int}
|
||
|
void_instance := fn(): Instance {
|
||
|
return Instance.(0)
|
||
|
}
|
||
|
|
||
|
create_instance := fn(create_info: ^InstanceCreateInfo, allocator_callback: int, new_obj: ^Instance): int {
|
||
|
return errors.IncompatibleDriver
|
||
|
}
|