1
0
Fork 0
forked from koniifer/ableos

ignim work

This commit is contained in:
Able 2024-09-13 20:17:47 -05:00
parent 9686349476
commit 1b5cb54a2b
5 changed files with 48 additions and 7 deletions

View file

@ -0,0 +1,16 @@
// the 0- thing is scuffed
OutOfHostMemory := 0 - 1
OutOfDeviceMemory := 0 - 2
InitializationFailed := 0 - 3
DeviceLost := 0 - 4
MemoryMapFailed := 0 - 5
LayerNotPresent := 0 - 6
ExtensionNotPresent := 0 - 7
FeatureNotPresent := 0 - 8
IncompatibleDriver := 0 - 9
TooManyObjects := 0 - 10
FormatNotSupported := 0 - 11
FragmentedPool := 0 - 12
Unknown := 0 - 13

View file

@ -1,7 +1,9 @@
VK_VERSION_MAJOR := 1;
VK_VERSION_MINOR := 0;
results := @use("rel:results.hb")
errors := @use("rel:errors.hb")
init_vulkan := fn(): void {
VK_VERSION_MAJOR := 1
VK_VERSION_MINOR := 0
return
init_vulkan := fn(): int {
return errors.IncompatibleDriver
}

View file

@ -0,0 +1,7 @@
// NonErrors
Success := 0
NotReady := 1
Timeout := 2
EventSet := 3
EventReset := 4
Incomplete := 5

View file

@ -1,8 +1,14 @@
dt_api := @use("../../../libraries/dt_api/src/lib.hb")
dt_api := @use("../../../libraries/dt_api/src/lib.hb");
.{dt_get} := dt_api
main := fn(): int {
dt_api.dt_get("framebuffer/fb0/width\0")
dt_api.dt_get("cpu/architecture\0")
dt_api.dt_get("cpu/cpu0/architecture\0")
// Checking if the first detected serial port is memory mapped or port mapped
// 0 -> memory mapped
// 1 -> port mapped
dt_get("serial_ports/sp0/mapping\0")
return 0
}

View file

@ -4,9 +4,19 @@ stn := @use("../../../libraries/stn/src/lib.hb");
horizon_api := @use("../../../libraries/horizon_api/src/lib.hb");
.{create_window} := horizon_api
ignim := @use("../../../libraries/ignim/src/lib.hb");
.{init_vulkan} := ignim
main := fn(): int {
windowing_system_buffer := buffer.create("XHorizon\0")
create_window(windowing_system_buffer)
// TODO: get WindowID
vk_state := init_vulkan()
if vk_state == ignim.errors.IncompatibleDriver {
stn.log.info("Incompatible Vulkan Driver\0")
}
return 0
}