ci slip
This commit is contained in:
@@ -3,7 +3,7 @@ const builtin = @import("builtin");
|
|||||||
const vk = @import("vulkan");
|
const vk = @import("vulkan");
|
||||||
const config = @import("config");
|
const config = @import("config");
|
||||||
|
|
||||||
const logger = @import("lib.zig").logger;
|
const ThreadSafeLoggerManager = @import("logger/ThreadSafeManager.zig");
|
||||||
|
|
||||||
const VkError = @import("error_set.zig").VkError;
|
const VkError = @import("error_set.zig").VkError;
|
||||||
const Dispatchable = @import("Dispatchable.zig").Dispatchable;
|
const Dispatchable = @import("Dispatchable.zig").Dispatchable;
|
||||||
@@ -31,6 +31,7 @@ const DeviceAllocator = struct {
|
|||||||
physical_devices: std.ArrayList(*Dispatchable(PhysicalDevice)),
|
physical_devices: std.ArrayList(*Dispatchable(PhysicalDevice)),
|
||||||
threaded: std.Io.Threaded,
|
threaded: std.Io.Threaded,
|
||||||
allocator: if (config.debug_allocator) std.heap.DebugAllocator(.{}) else DeviceAllocator,
|
allocator: if (config.debug_allocator) std.heap.DebugAllocator(.{}) else DeviceAllocator,
|
||||||
|
logger: ThreadSafeLoggerManager,
|
||||||
dispatch_table: *const DispatchTable,
|
dispatch_table: *const DispatchTable,
|
||||||
vtable: *const VTable,
|
vtable: *const VTable,
|
||||||
|
|
||||||
@@ -46,11 +47,20 @@ pub const DispatchTable = struct {
|
|||||||
pub fn init(allocator: std.mem.Allocator, infos: *const vk.InstanceCreateInfo) VkError!Self {
|
pub fn init(allocator: std.mem.Allocator, infos: *const vk.InstanceCreateInfo) VkError!Self {
|
||||||
_ = allocator;
|
_ = allocator;
|
||||||
_ = infos;
|
_ = infos;
|
||||||
return .{
|
|
||||||
|
var self: Self = .{
|
||||||
.physical_devices = .empty,
|
.physical_devices = .empty,
|
||||||
|
.threaded = undefined,
|
||||||
|
.allocator = if (config.debug_allocator) .init else .{},
|
||||||
|
.logger = undefined,
|
||||||
.dispatch_table = undefined,
|
.dispatch_table = undefined,
|
||||||
.vtable = undefined,
|
.vtable = undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.threaded = .init(self.allocator.allocator(), .{});
|
||||||
|
self.logger = .init(self.threaded.io(), self.allocator.allocator());
|
||||||
|
|
||||||
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Dummy for docs creation and stuff
|
/// Dummy for docs creation and stuff
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//! A driver-global logger that stack in memory all same-indent `debug` logs
|
//! A instance-level logger that stack in memory all same-indent `debug` logs
|
||||||
//! and only displays them in reverse order if a non-debug log is requested
|
//! and only displays them in reverse order if a non-debug log is requested
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
@@ -71,10 +71,6 @@ pub fn log(comptime level: std.log.Level, comptime scope: @EnumLiteral(), compti
|
|||||||
.warn, .err => stderr_file,
|
.warn, .err => stderr_file,
|
||||||
};
|
};
|
||||||
|
|
||||||
var timezone = zdt.Timezone.tzLocal(std.heap.page_allocator) catch zdt.Timezone.UTC;
|
|
||||||
defer timezone.deinit();
|
|
||||||
const now = zdt.Datetime.now(.{ .tz = &timezone }) catch zdt.Datetime{};
|
|
||||||
|
|
||||||
var fmt_buffer = std.mem.zeroes([4096]u8);
|
var fmt_buffer = std.mem.zeroes([4096]u8);
|
||||||
var fmt_writer = std.Io.Writer.fixed(&fmt_buffer);
|
var fmt_writer = std.Io.Writer.fixed(&fmt_buffer);
|
||||||
fmt_writer.print(format ++ "\n", args) catch {};
|
fmt_writer.print(format ++ "\n", args) catch {};
|
||||||
|
|||||||
Reference in New Issue
Block a user