Remove legacy render passes and frambebuffers in favor of dynamic rendering

Somehow, some way, we ended up with net positive lines changed
This commit is contained in:
2026-05-13 17:28:16 +02:00
parent e736c0df34
commit 36434f8107
6 changed files with 231 additions and 219 deletions

View File

@@ -10,6 +10,8 @@ const CommandBuffer = @import("CommandBuffer.zig");
const Engine = @import("Engine.zig");
const GenericBuffer = @import("GenericBuffer.zig").GenericBuffer;
const StagingBuffer = @import("StagingBuffer.zig");
const Swapchain = @import("Swapchain.zig");
const Texture = @import("Texture.zig");
image: vk.Image,
image_view: vk.ImageView,
@@ -28,10 +30,10 @@ pipeline: vk.Pipeline,
pub fn load(
filename: []const u8,
engine: *Engine,
swapchain: *Swapchain,
stbi: *media.stbi,
cube_size: u32,
global_uniforms_buffer: vk.Buffer,
render_pass: vk.RenderPass,
temp_allocator: std.mem.Allocator,
io: std.Io,
) !Skybox {
@@ -735,8 +737,10 @@ pub fn load(
.dynamic_states = &.{ .viewport, .scissor },
},
.layout = pipeline_layout,
.render_pass = render_pass,
.subpass = 0,
.view_mask = 0,
.color_attachment_formats = &.{swapchain.params.surface_format.format},
.depth_attachment_format = Texture.Usage.depth.vkFormat(),
.stencil_attachment_format = .undefined,
});
return .{