adding descriptor sets injections to graphics stages
Test / build_and_test (push) Successful in 45s
Build / build (push) Successful in 1m18s

This commit is contained in:
2026-05-15 00:58:58 +02:00
parent d460f22a45
commit 134925a16e
9 changed files with 75 additions and 28 deletions
+16 -6
View File
@@ -98,18 +98,28 @@ pub fn create(device: *base.Device, allocator: std.mem.Allocator, layout: *base.
return self;
}
pub fn copy(interface: *Interface, copy_data: vk.CopyDescriptorSet) VkError!void {
const self: *Self = @alignCast(@fieldParentPtr("interface", interface));
_ = self;
_ = copy_data;
}
pub fn destroy(interface: *Interface, allocator: std.mem.Allocator) void {
const self: *Self = @alignCast(@fieldParentPtr("interface", interface));
allocator.free(self.heap);
allocator.destroy(self);
}
pub fn copy(interface: *Interface, src_interface: *const Interface, data: vk.CopyDescriptorSet) VkError!void {
const self: *Self = @alignCast(@fieldParentPtr("interface", interface));
const src: *const Self = @alignCast(@fieldParentPtr("interface", src_interface));
for (self.descriptors[data.dst_binding..(data.dst_binding + data.descriptor_count)], src.descriptors[data.src_binding..(data.src_binding + data.descriptor_count)]) |*dst_desc, src_desc| {
switch (dst_desc.*) {
.buffer => |dst_buffer| @memcpy(dst_buffer[0..], src_desc.buffer[0..]),
.image => |dst_image| @memcpy(dst_image[0..], src_desc.image[0..]),
else => {
dst_desc.* = .{ .unsupported = .{} };
base.unsupported("descriptor type for copy", .{});
},
}
}
}
pub fn write(interface: *Interface, write_data: vk.WriteDescriptorSet) VkError!void {
const self: *Self = @alignCast(@fieldParentPtr("interface", interface));