improving architecture, adding logical device creation and destruction
This commit is contained in:
@@ -2,11 +2,13 @@ const std = @import("std");
|
||||
const vk = @import("vulkan");
|
||||
|
||||
pub const lib_vulkan = @import("lib_vulkan.zig");
|
||||
pub const logs = @import("logs.zig");
|
||||
|
||||
pub const Dispatchable = @import("Dispatchable.zig").Dispatchable;
|
||||
pub const VkError = @import("error_set.zig").VkError;
|
||||
|
||||
pub const Instance = @import("Instance.zig");
|
||||
pub const Device = @import("Device.zig");
|
||||
pub const PhysicalDevice = @import("PhysicalDevice.zig");
|
||||
pub const VulkanAllocator = @import("VulkanAllocator.zig");
|
||||
//pub const Device = @import("Device.zig");
|
||||
@@ -15,19 +17,10 @@ pub const VULKAN_VENDOR_ID = @typeInfo(vk.VendorId).@"enum".fields[@typeInfo(vk.
|
||||
pub const DRIVER_LOGS_ENV_NAME = "DRIVER_LOGS";
|
||||
|
||||
pub const std_options: std.Options = .{
|
||||
.log_level = .info,
|
||||
.logFn = logFn,
|
||||
.log_level = .debug,
|
||||
.logFn = logs.logger,
|
||||
};
|
||||
|
||||
pub fn logFn(comptime level: std.log.Level, comptime scope: @Type(.enum_literal), comptime format: []const u8, args: anytype) void {
|
||||
_ = level;
|
||||
_ = scope;
|
||||
std.debug.lockStdErr();
|
||||
defer std.debug.unlockStdErr();
|
||||
const stderr = std.fs.File.stderr().deprecatedWriter();
|
||||
nosuspend stderr.print(format ++ "\n", args) catch return;
|
||||
}
|
||||
|
||||
pub fn retrieveDriverDataAs(handle: anytype, comptime T: type) !*T {
|
||||
comptime {
|
||||
switch (@typeInfo(@TypeOf(handle))) {
|
||||
|
||||
Reference in New Issue
Block a user