From 4f9a1541761aa5f7e7097372955b63fae7884987 Mon Sep 17 00:00:00 2001 From: David Allemang Date: Tue, 9 Jul 2024 15:17:26 -0400 Subject: [PATCH] move au into nu/render --- src/App.zig | 5 +- src/au.zig | 474 ------------------------- src/main.zig | 5 +- src/nu/Render.zig | 12 +- src/nu/Render/{Context.zig => au.zig} | 74 ++-- src/{ => nu/Render}/au/Bus.zig | 0 src/{ => nu/Render}/au/Flights.zig | 0 src/{ => nu/Render}/au/SwapChain.zig | 0 src/{ => nu/Render}/au/VkAllocator.zig | 0 src/{ => nu/Render}/au/ui.zig | 0 10 files changed, 53 insertions(+), 517 deletions(-) delete mode 100644 src/au.zig rename src/nu/Render/{Context.zig => au.zig} (88%) rename src/{ => nu/Render}/au/Bus.zig (100%) rename src/{ => nu/Render}/au/Flights.zig (100%) rename src/{ => nu/Render}/au/SwapChain.zig (100%) rename src/{ => nu/Render}/au/VkAllocator.zig (100%) rename src/{ => nu/Render}/au/ui.zig (100%) diff --git a/src/App.zig b/src/App.zig index c0bd5ce..95a830a 100644 --- a/src/App.zig +++ b/src/App.zig @@ -1,11 +1,8 @@ const std = @import("std"); const nu = @import("nu.zig"); -const Self = @This(); - pub fn init(alloc: std.mem.Allocator) !void { _ = alloc; } -pub fn deinit() void { -} +pub fn deinit() void {} diff --git a/src/au.zig b/src/au.zig deleted file mode 100644 index 2ce76d9..0000000 --- a/src/au.zig +++ /dev/null @@ -1,474 +0,0 @@ -const std = @import("std"); -const builtin = @import("builtin"); - -const vk = @import("vk"); -const c = @import("c.zig"); - -pub const Bus = @import("au/Bus.zig"); -pub const SwapChain = @import("au/SwapChain.zig"); -pub const Flights = @import("au/Flights.zig"); -pub const VkAllocator = @import("au/VkAllocator.zig"); - -pub const use_debug_messenger = switch (builtin.mode) { - .Debug, .ReleaseSafe => true, - .ReleaseSmall, .ReleaseFast => false, -}; - -pub const apis: []const vk.ApiInfo = &.{ - vk.features.version_1_0, - vk.features.version_1_1, - vk.features.version_1_2, - vk.features.version_1_3, - vk.extensions.khr_surface, - vk.extensions.khr_swapchain, - vk.extensions.khr_dynamic_rendering, - if (use_debug_messenger) vk.extensions.ext_debug_utils else .{}, -}; - -pub const device_extensions: []const [*:0]const u8 = &.{ - // todo somehow sync this with APIs above? - vk.extensions.khr_swapchain.name, - vk.extensions.khr_dynamic_rendering.name, -}; - -pub const app_info: vk.ApplicationInfo = .{ - .p_application_name = "zig-glfw-vulkan", - .application_version = vk.makeApiVersion(0, 0, 0, 0), - .p_engine_name = "zig-glfw-vulkan", - .engine_version = vk.makeApiVersion(0, 0, 0, 0), - .api_version = vk.API_VERSION_1_3, -}; - -pub const BaseWrapper = vk.BaseWrapper(apis); -pub const InstanceWrapper = vk.InstanceWrapper(apis); -pub const DeviceWrapper = vk.DeviceWrapper(apis); - -pub const InstanceProxy = vk.InstanceProxy(apis); -pub const DeviceProxy = vk.DeviceProxy(apis); -pub const QueueProxy = vk.QueueProxy(apis); -pub const CommandBufferProxy = vk.CommandBufferProxy(apis); - -pub const B: *const BaseWrapper = &_bw; -pub const I: *const InstanceProxy = &_ip; -pub const D: *const DeviceProxy = &_dp; -pub const W: *const Window = &_window; -pub const Q: *const QueueProxy = &_qp; - -pub const device_config: *const CandidateDeviceInfo = &_dconfig; - -var _bw: BaseWrapper = undefined; -var _iw: InstanceWrapper = undefined; -var _dw: DeviceWrapper = undefined; - -var _ip: InstanceProxy = undefined; -var _dp: DeviceProxy = undefined; -var _qp: QueueProxy = undefined; - -var _instance: vk.Instance = undefined; -var _window: Window = undefined; -var _bus: Bus = undefined; -var _device: vk.Device = undefined; -var _dconfig: CandidateDeviceInfo = undefined; -var _queue: vk.Queue = undefined; - -pub fn init(alloc: std.mem.Allocator) !void { - try init_glfw(); - errdefer deinit_glfw(); - - try init_base(); - errdefer deinit_base(); - - try init_instance(alloc); - errdefer deinit_instance(); - - try init_window(alloc); - errdefer deinit_window(); - - try init_device(alloc); - errdefer deinit_device(); - - try init_event_bus(alloc); - errdefer deinit_event_bus(); -} - -pub fn deinit() void { - deinit_event_bus(); - deinit_device(); - deinit_window(); - deinit_instance(); - deinit_base(); - deinit_glfw(); -} - -fn init_glfw() !void { - if (c.glfwInit() != c.GLFW_TRUE) - return error.glfwInitFailed; - errdefer c.glfwTerminate(); - - // todo move to render - if (c.glfwVulkanSupported() != c.GLFW_TRUE) - return error.glfwNoVulkan; -} - -fn deinit_glfw() void { - c.glfwTerminate(); -} - -fn init_base() !void { - if (use_debug_messenger) { - _bw = try BaseWrapper.load(c.glfwGetInstanceProcAddress); - } else { - _bw = BaseWrapper.loadNoFail(c.glfwGetInstanceProcAddress); - } -} - -fn deinit_base() void {} - -fn init_instance(alloc: std.mem.Allocator) !void { - var extensions = std.ArrayList([*:0]const u8).init(alloc); - defer extensions.deinit(); - - var layers = std.ArrayList([*:0]const u8).init(alloc); - defer layers.deinit(); - - if (use_debug_messenger) { - try extensions.appendSlice(&.{ - vk.extensions.ext_debug_utils.name, - }); - - try layers.appendSlice(&.{ - "VK_LAYER_KHRONOS_validation", - }); - } - - var glfw_exts_count: u32 = 0; - const glfw_exts: [*]const [*:0]const u8 = - @ptrCast(c.glfwGetRequiredInstanceExtensions(&glfw_exts_count)); - try extensions.appendSlice(glfw_exts[0..glfw_exts_count]); - - const mci: vk.DebugUtilsMessengerCreateInfoEXT = .{ - .message_severity = .{ - .error_bit_ext = true, - .info_bit_ext = true, - .verbose_bit_ext = true, - .warning_bit_ext = true, - }, - .message_type = .{ - .device_address_binding_bit_ext = true, - .general_bit_ext = false, - .performance_bit_ext = true, - .validation_bit_ext = true, - }, - .pfn_user_callback = &debug_callback, - .p_user_data = null, - }; - - _instance = try B.createInstance(&.{ - .p_application_info = &app_info, - .enabled_extension_count = @intCast(extensions.items.len), - .pp_enabled_extension_names = extensions.items.ptr, - .enabled_layer_count = @intCast(layers.items.len), - .pp_enabled_layer_names = layers.items.ptr, - .p_next = if (use_debug_messenger) &mci else null, - }, null); - - if (use_debug_messenger) { - _iw = try InstanceWrapper.load(_instance, _bw.dispatch.vkGetInstanceProcAddr); - } else { - _iw = InstanceWrapper.loadNoFail(_instance, _bw.dispatch.vkGetInstanceProcAddr); - } - - _ip = InstanceProxy.init(_instance, &_iw); -} - -fn deinit_instance() void { - _ip.destroyInstance(null); -} - -fn init_window(alloc: std.mem.Allocator) !void { - _window = try Window.init( - alloc, - app_info.p_application_name orelse "Au Window", - .{ .height = 720, .width = 1280 }, - ); - errdefer _window.deinit(); -} - -fn deinit_window() void { - _window.deinit(); -} - -const CandidateDeviceInfo = struct { - pdev: vk.PhysicalDevice, - format: vk.SurfaceFormatKHR, - mode: vk.PresentModeKHR, - family: u32, // must support graphics and present for now - - fn init(alloc: std.mem.Allocator, pdev: vk.PhysicalDevice) !struct { i32, CandidateDeviceInfo } { - var score: i32 = 0; - var res: CandidateDeviceInfo = undefined; - - res.pdev = pdev; - - const props = I.getPhysicalDeviceProperties(pdev); - score += switch (props.device_type) { - vk.PhysicalDeviceType.discrete_gpu => 1000, - vk.PhysicalDeviceType.integrated_gpu => 500, - else => 0, - }; - - var format_count: u32 = undefined; - _ = try I.getPhysicalDeviceSurfaceFormatsKHR(pdev, W.surface, &format_count, null); - if (format_count == 0) return error.NoSurfaceFormats; - const formats = try alloc.alloc(vk.SurfaceFormatKHR, format_count); - defer alloc.free(formats); - _ = try I.getPhysicalDeviceSurfaceFormatsKHR(pdev, W.surface, &format_count, formats.ptr); - - for (formats) |fmt| { - if (fmt.color_space == .srgb_nonlinear_khr) { - res.format = fmt; - break; - } - } else { - res.format = formats[0]; - score -= 100; - } - - var mode_count: u32 = undefined; - _ = try I.getPhysicalDeviceSurfacePresentModesKHR(pdev, W.surface, &mode_count, null); - if (mode_count == 0) return error.NoSurfacePresentModes; - const modes = try alloc.alloc(vk.PresentModeKHR, mode_count); - defer alloc.free(modes); - _ = try I.getPhysicalDeviceSurfacePresentModesKHR(pdev, W.surface, &mode_count, modes.ptr); - - if (std.mem.indexOfAny(vk.PresentModeKHR, modes, &.{ - vk.PresentModeKHR.mailbox_khr, - vk.PresentModeKHR.immediate_khr, - })) |idx| { - res.mode = modes[idx]; - } else { - score -= 50; - res.mode = .fifo_khr; // this is guaranteed - } - - var ext_count: u32 = undefined; - _ = try I.enumerateDeviceExtensionProperties(pdev, null, &ext_count, null); - const exts = try alloc.alloc(vk.ExtensionProperties, ext_count); - defer alloc.free(exts); - _ = try I.enumerateDeviceExtensionProperties(pdev, null, &ext_count, exts.ptr); - - for (device_extensions) |needle| { - for (exts) |ext| { - if (std.mem.eql( - u8, - std.mem.span(needle), - std.mem.sliceTo(&ext.extension_name, 0), - )) - break; - } else { - return error.MissingDeviceExtension; - } - } - - var family_count: u32 = undefined; - I.getPhysicalDeviceQueueFamilyProperties(pdev, &family_count, null); - const families = try alloc.alloc(vk.QueueFamilyProperties, family_count); - defer alloc.free(families); - I.getPhysicalDeviceQueueFamilyProperties(pdev, &family_count, families.ptr); - - for (families, 0..) |prop, idx| { - const graphics_support = prop.queue_flags.graphics_bit; - const present_support = try I.getPhysicalDeviceSurfaceSupportKHR(pdev, @intCast(idx), W.surface) == vk.TRUE; - - if (graphics_support and present_support) { - res.family = @intCast(idx); - break; - } - } else { - return error.NoSuitableFamily; - } - - return .{ score, res }; - } -}; - -fn init_device(alloc: std.mem.Allocator) !void { - var pdev_count: u32 = undefined; - _ = try I.enumeratePhysicalDevices(&pdev_count, null); - if (pdev_count == 0) return error.NoDevice; - const pdevs = try alloc.alloc(vk.PhysicalDevice, pdev_count); - defer alloc.free(pdevs); - _ = try I.enumeratePhysicalDevices(&pdev_count, pdevs.ptr); - - // const scores = std.ArrayList(i32). - var scores: std.MultiArrayList(struct { score: i32, ci: CandidateDeviceInfo }) = .{}; - defer scores.deinit(alloc); - - for (pdevs) |pdev| { - const score, const ci = CandidateDeviceInfo.init(alloc, pdev) catch continue; - try scores.append(alloc, .{ .score = score, .ci = ci }); - } - - const idx = std.sort.argMax(i32, scores.items(.score), {}, std.sort.asc(i32)) orelse - return error.NoSuitableDevice; - _dconfig = scores.get(idx).ci; - - const qci: []const vk.DeviceQueueCreateInfo = &.{ - vk.DeviceQueueCreateInfo{ - .queue_family_index = _dconfig.family, - .queue_count = 1, - .p_queue_priorities = &[_]f32{1.0}, - }, - }; - - _device = try I.createDevice(_dconfig.pdev, &.{ - .queue_create_info_count = @intCast(qci.len), - .p_queue_create_infos = qci.ptr, - .enabled_extension_count = @intCast(device_extensions.len), - .pp_enabled_extension_names = device_extensions.ptr, - .p_next = &vk.PhysicalDeviceDynamicRenderingFeaturesKHR{ - .dynamic_rendering = vk.TRUE, - }, - }, null); - - if (use_debug_messenger) { - _dw = try DeviceWrapper.load(_device, _iw.dispatch.vkGetDeviceProcAddr); - } else { - _dw = DeviceWrapper.loadNoFail(_device, _iw.dispatch.vkGetDeviceProcAddr); - } - _dp = DeviceProxy.init(_device, &_dw); - errdefer D.destroyDevice(null); - - _queue = D.getDeviceQueue(_dconfig.family, 0); - - _qp = QueueProxy.init(_queue, &_dw); - - // todo i'm thinking this needs to be a more complex pointer structure... i'm making assumptions here about how the - // command pools are meant to work. probably I am cooking too much. -} - -fn deinit_device() void { - D.destroyDevice(null); -} - -pub fn debug_callback( - msg_severity: vk.DebugUtilsMessageSeverityFlagsEXT, - msg_type: vk.DebugUtilsMessageTypeFlagsEXT, - p_data: ?*const vk.DebugUtilsMessengerCallbackDataEXT, - _: ?*anyopaque, -) callconv(vk.vulkan_call_conv) vk.Bool32 { - // ripped from std.log.defaultLog - - const data = p_data orelse return vk.FALSE; - const message = data.p_message orelse return vk.FALSE; - - const severity_prefix = if (msg_severity.verbose_bit_ext) - "verbose:" - else if (msg_severity.info_bit_ext) - "info:" - else if (msg_severity.warning_bit_ext) - "warning:" - else if (msg_severity.error_bit_ext) - "error:" - else - "?:"; - - const type_prefix = if (msg_type.general_bit_ext) - "" - else if (msg_type.validation_bit_ext) - "validation:" - else if (msg_type.performance_bit_ext) - "performance:" - else if (msg_type.device_address_binding_bit_ext) - "device_address_binding:" - else - "?:"; - - const stderr = std.io.getStdErr().writer(); - var bw = std.io.bufferedWriter(stderr); - const writer = bw.writer(); - - std.debug.lockStdErr(); - defer std.debug.unlockStdErr(); - nosuspend { - writer.print("vk-{s}{s} {s}\n", .{ severity_prefix, type_prefix, message }) catch return vk.FALSE; - bw.flush() catch return vk.FALSE; - } - - return vk.FALSE; -} - -pub const Window = struct { - const Self = @This(); - - alloc: std.mem.Allocator, - handle: *c.GLFWwindow, - surface: vk.SurfaceKHR, - - pub fn init(alloc: std.mem.Allocator, title: [*:0]const u8, extent: vk.Extent2D) !Self { - var self: Self = undefined; - self.alloc = alloc; - - c.glfwWindowHintString(c.GLFW_X11_CLASS_NAME, "floating_window"); - c.glfwWindowHintString(c.GLFW_X11_INSTANCE_NAME, "floating_window"); - c.glfwWindowHint(c.GLFW_CLIENT_API, c.GLFW_NO_API); - - self.handle = c.glfwCreateWindow( - @intCast(extent.width), - @intCast(extent.height), - title, - null, - null, - ) orelse return error.glfwWindowFailed; - errdefer c.glfwDestroyWindow(self.handle); - - if (c.glfwCreateWindowSurface(_instance, self.handle, null, &self.surface) != .success) { - return error.glfwSurfaceFailed; - } - errdefer I.destroySurfaceKHR(self.surface, null); - - return self; - } - - pub fn deinit(self: Self) void { - I.destroySurfaceKHR(self.surface, null); - c.glfwDestroyWindow(self.handle); - } - - pub fn should_close(self: Self) bool { - return c.glfwWindowShouldClose(self.handle) == c.GLFW_TRUE; - } - - pub fn focused(self: Self) bool { - return c.glfwGetWindowAttrib(self.handle, c.GLFW_FOCUSED) == c.GLFW_TRUE; - } -}; - -pub fn wait_events() []const Bus.Event { - _bus.clear(); - c.glfwWaitEvents(); - return _bus.events.items; -} - -pub fn poll_events() []const Bus.Event { - _bus.clear(); - c.glfwPollEvents(); - return _bus.events.items; -} - -pub fn wait_events_timeout(seconds: f64) []const Bus.Event { - _bus.clear(); - c.glfwWaitEventsTimeout(seconds); - return _bus.events.items; -} - -fn init_event_bus(alloc: std.mem.Allocator) !void { - _bus = Bus.init(alloc); - errdefer _bus.deinit(); - try _bus.connect(&_window); -} - -fn deinit_event_bus() void { - try _bus.disconnect(&_window); - _bus.deinit(); -} diff --git a/src/main.zig b/src/main.zig index 3a3a79e..2404851 100644 --- a/src/main.zig +++ b/src/main.zig @@ -5,7 +5,10 @@ const App = @import("App.zig"); pub const nu_options: nu.Options = .{ .window = .{ .title = "Hello World" }, - .render = .{ .app_name = "hello-world" }, + .render = .{ + .app_name = "hello-world", + .frames_in_flight = 3, + }, }; pub fn main() !void { diff --git a/src/nu/Render.zig b/src/nu/Render.zig index 47fa3f7..972f4e8 100644 --- a/src/nu/Render.zig +++ b/src/nu/Render.zig @@ -6,17 +6,17 @@ const std = @import("std"); const builtin = @import("builtin"); const vk = @import("vk"); -const ctx = @import("Render/Context.zig"); +const au = @import("Render/au.zig"); pub const Options = struct { - app_name: []const u8 = "nu-au-app", + app_name: [*:0]const u8 = "nu-au-app", app_version: struct { variant: u3 = 0, major: u7 = 0, minor: u10 = 0, patch: u12 = 0, } = .{}, - engine_name: []const u8 = "nu-au", + engine_name: [*:0]const u8 = "nu-au", engine_version: struct { variant: u3 = 0, major: u7 = 0, @@ -29,12 +29,12 @@ pub const Options = struct { pub fn init(alloc: std.mem.Allocator) !void { // todo make ctx not globals - try ctx.init(alloc); - errdefer ctx.deinit(); + try au.init(alloc); + errdefer au.deinit(); } pub fn frame() void {} pub fn deinit() void { - ctx.deinit(); + au.deinit(); } diff --git a/src/nu/Render/Context.zig b/src/nu/Render/au.zig similarity index 88% rename from src/nu/Render/Context.zig rename to src/nu/Render/au.zig index 5c32c7a..94705b4 100644 --- a/src/nu/Render/Context.zig +++ b/src/nu/Render/au.zig @@ -1,9 +1,12 @@ const std = @import("std"); const builtin = @import("builtin"); -const vk = @import("vk"); +const vk = @import("vk"); const nu = @import("../../nu.zig"); -const Window = @import("../Window.zig"); + +pub const SwapChain = @import("au/SwapChain.zig"); +pub const Flights = @import("au/Flights.zig"); +pub const VkAllocator = @import("au/VkAllocator.zig"); pub const use_debug_messenger = switch (builtin.mode) { .Debug, .ReleaseSafe => true, @@ -27,24 +30,6 @@ pub const device_extensions: []const [*:0]const u8 = &.{ vk.extensions.khr_dynamic_rendering.name, }; -pub const app_info: vk.ApplicationInfo = .{ - .p_application_name = nu.options.render.app_name, - .application_version = vk.makeApiVersion( - nu.options.render.app_version.variant, - nu.options.render.app_version.major, - nu.options.render.app_version.minor, - nu.options.render.app_version.patch, - ), - .p_engine_name = nu.options.render.engine_name, - .engine_version = vk.makeApiVersion( - nu.options.render.engine_version.variant, - nu.options.render.engine_version.major, - nu.options.render.engine_version.minor, - nu.options.render.engine_version.patch, - ), - .api_version = vk.API_VERSION_1_3, -}; - pub const BaseWrapper = vk.BaseWrapper(apis); pub const InstanceWrapper = vk.InstanceWrapper(apis); pub const DeviceWrapper = vk.DeviceWrapper(apis); @@ -58,6 +43,7 @@ pub const B: *const BaseWrapper = &_bw; pub const I: *const InstanceProxy = &_ip; pub const D: *const DeviceProxy = &_dp; pub const Q: *const QueueProxy = &_qp; +pub const S: *const vk.SurfaceKHR = &_surface; pub const device_config: *const CandidateDeviceInfo = &_dconfig; @@ -70,14 +56,12 @@ var _dp: DeviceProxy = undefined; var _qp: QueueProxy = undefined; var _instance: vk.Instance = undefined; +var _surface: vk.SurfaceKHR = undefined; var _device: vk.Device = undefined; var _dconfig: CandidateDeviceInfo = undefined; var _queue: vk.Queue = undefined; -var _surface: vk.SurfaceKHR = undefined; -pub fn init( - alloc: std.mem.Allocator, -) !void { +pub fn init(alloc: std.mem.Allocator) !void { try init_base(); errdefer deinit_base(); @@ -95,6 +79,9 @@ pub fn deinit() void { } fn init_base() !void { + if (glfwVulkanSupported() != nu.Window.c.GLFW_TRUE) + return error.glfwNoVulkan; + if (use_debug_messenger) { _bw = try BaseWrapper.load(glfwGetInstanceProcAddress); } else { @@ -145,10 +132,20 @@ fn init_instance(alloc: std.mem.Allocator) !void { _instance = try B.createInstance(&.{ .p_application_info = &.{ - .p_application_name = "zig-glfw-vulkan", // todo RenderOptions - .application_version = vk.makeApiVersion(0, 0, 0, 0), - .p_engine_name = "nu-au", // todo RenderOptions - .engine_version = vk.makeApiVersion(0, 0, 0, 0), + .p_application_name = nu.options.render.app_name, + .application_version = vk.makeApiVersion( + nu.options.render.app_version.variant, + nu.options.render.app_version.major, + nu.options.render.app_version.minor, + nu.options.render.app_version.patch, + ), + .p_engine_name = nu.options.render.engine_name, + .engine_version = vk.makeApiVersion( + nu.options.render.engine_version.variant, + nu.options.render.engine_version.major, + nu.options.render.engine_version.minor, + nu.options.render.engine_version.patch, + ), .api_version = vk.API_VERSION_1_3, }, .enabled_extension_count = @intCast(extensions.items.len), @@ -166,7 +163,7 @@ fn init_instance(alloc: std.mem.Allocator) !void { _ip = InstanceProxy.init(_instance, &_iw); - if (glfwCreateWindowSurface(_instance, Window.handle, null, &_surface) != .success) { + if (glfwCreateWindowSurface(_instance, nu.Window.handle, null, &_surface) != .success) { return error.glfwCreateWindowSurfaceFailed; } } @@ -376,13 +373,26 @@ pub fn debug_callback( return vk.FALSE; } -extern fn glfwGetInstanceProcAddress(instance: vk.Instance, procname: [*:0]const u8) vk.PfnVoidFunction; +extern fn glfwVulkanSupported() c_int; -extern fn glfwGetRequiredInstanceExtensions(count: *u32) [*]const [*:0]const u8; +extern fn glfwGetInstanceProcAddress( + instance: vk.Instance, + procname: [*:0]const u8, +) vk.PfnVoidFunction; + +extern fn glfwGetPhysicalDevicePresentationSupport( + instance: vk.Instance, + pdev: vk.PhysicalDevice, + queuefamily: u32, +) c_int; extern fn glfwCreateWindowSurface( instance: vk.Instance, - window: *Window.c.GLFWwindow, + window: *nu.Window.c.GLFWwindow, allocation_callbacks: ?*const vk.AllocationCallbacks, surface: *vk.SurfaceKHR, ) vk.Result; + +extern fn glfwGetRequiredInstanceExtensions( + count: *u32, +) [*][*:0]const u8; diff --git a/src/au/Bus.zig b/src/nu/Render/au/Bus.zig similarity index 100% rename from src/au/Bus.zig rename to src/nu/Render/au/Bus.zig diff --git a/src/au/Flights.zig b/src/nu/Render/au/Flights.zig similarity index 100% rename from src/au/Flights.zig rename to src/nu/Render/au/Flights.zig diff --git a/src/au/SwapChain.zig b/src/nu/Render/au/SwapChain.zig similarity index 100% rename from src/au/SwapChain.zig rename to src/nu/Render/au/SwapChain.zig diff --git a/src/au/VkAllocator.zig b/src/nu/Render/au/VkAllocator.zig similarity index 100% rename from src/au/VkAllocator.zig rename to src/nu/Render/au/VkAllocator.zig diff --git a/src/au/ui.zig b/src/nu/Render/au/ui.zig similarity index 100% rename from src/au/ui.zig rename to src/nu/Render/au/ui.zig