Loading materials and textures

This commit is contained in:
2025-11-22 00:41:56 +01:00
parent 63a8eee18c
commit bf0224ccd8
16 changed files with 563 additions and 626 deletions

View File

@@ -0,0 +1,20 @@
const QueueSharingMode = @This();
const vk = @import("vulkan");
threadlocal var qsm: QueueSharingMode = undefined;
buffer: [2]u32,
sharing_mode: vk.SharingMode,
queue_family_index_count: u32,
p_queue_family_indices: ?[*]const u32,
pub fn resolve(a: u32, b: u32) *const QueueSharingMode {
const self = &qsm;
const same = a == b;
self.buffer = .{ a, b };
self.sharing_mode = if (same) .exclusive else .concurrent;
self.queue_family_index_count = if (same) 0 else 2;
self.p_queue_family_indices = if (same) null else &self.buffer;
return self;
}