Update to zig 0.16.0, update deps, Vulkan validation fixes

This commit is contained in:
2026-05-13 00:43:49 +02:00
parent 39712e359d
commit 79c62141df
16 changed files with 204 additions and 137 deletions

View File

@@ -25,17 +25,26 @@ descriptor_set: vk.DescriptorSet,
pipeline_layout: vk.PipelineLayout,
pipeline: vk.Pipeline,
pub fn load(filename: []const u8, engine: *Engine, stbi: *media.stbi, cube_size: u32, global_uniforms_buffer: vk.Buffer, render_pass: vk.RenderPass, temp_allocator: std.mem.Allocator) !Skybox {
pub fn load(
filename: []const u8,
engine: *Engine,
stbi: *media.stbi,
cube_size: u32,
global_uniforms_buffer: vk.Buffer,
render_pass: vk.RenderPass,
temp_allocator: std.mem.Allocator,
io: std.Io,
) !Skybox {
std.log.debug("Loading skybox \"{s}\"...", .{filename});
// --- LOAD IMAGE FROM MEMORY ----------------------------------------------
const cwd = std.fs.cwd();
const cwd = std.Io.Dir.cwd();
var dir = try cwd.openDir("assets", .{});
defer dir.close();
var dir = try cwd.openDir(io, "assets", .{});
defer dir.close(io);
const file_buf = try dir.readFileAlloc(temp_allocator, filename, std.math.maxInt(usize));
const file_buf = try dir.readFileAlloc(io, filename, temp_allocator, .unlimited);
defer temp_allocator.free(file_buf);
const img = try stbi.loadHdrBuf(file_buf);
@@ -169,7 +178,7 @@ pub fn load(filename: []const u8, engine: *Engine, stbi: *media.stbi, cube_size:
// --- TRANSITION TO SHADER_READ_ONLY_OPTIMAL ------------------------------
var transition1_command_buffer = try CommandBuffer.init(engine, .graphics);
var transition1_command_buffer = try CommandBuffer.init(engine, .compute);
defer transition1_command_buffer.deinit(engine);
try transition1_command_buffer.beginCommandBuffer();
@@ -304,7 +313,7 @@ pub fn load(filename: []const u8, engine: *Engine, stbi: *media.stbi, cube_size:
defer engine.destroyShaderModule(compute_shader);
var compute_pipeline: vk.Pipeline = undefined;
_ = try engine.device.createComputePipelines(.null_handle, 1, &.{
_ = try engine.device.createComputePipelines(.null_handle, &.{
.{
.stage = .{
.stage = .{ .compute_bit = true },