working on queues
This commit is contained in:
@@ -12,3 +12,41 @@ pub const Interface = base.Queue;
|
||||
|
||||
interface: Interface,
|
||||
mutex: std.Thread.Mutex,
|
||||
|
||||
pub fn create(allocator: std.mem.Allocator, device: *const base.Device, index: u32, family_index: u32, flags: vk.DeviceQueueCreateFlags) VkError!*Self {
|
||||
const self = allocator.create(Self) catch return VkError.OutOfHostMemory;
|
||||
errdefer allocator.destroy(self);
|
||||
|
||||
var interface = try Interface.init(allocator, device, index, family_index, flags);
|
||||
|
||||
interface.dispatch_table = &.{
|
||||
.bindSparse = bindSparse,
|
||||
.submit = submit,
|
||||
.waitIdle = waitIdle,
|
||||
};
|
||||
|
||||
self.* = .{
|
||||
.interface = interface,
|
||||
.mutex = .{},
|
||||
};
|
||||
return self;
|
||||
}
|
||||
|
||||
pub fn bindSparse(interface: *Interface, info: []*const vk.BindSparseInfo, fence: ?*base.Fence) VkError!void {
|
||||
const self: *Self = @alignCast(@fieldParentPtr("interface", interface));
|
||||
_ = self;
|
||||
_ = info;
|
||||
_ = fence;
|
||||
}
|
||||
|
||||
pub fn submit(interface: *Interface, info: []*const vk.SubmitInfo, fence: ?*base.Fence) VkError!void {
|
||||
const self: *Self = @alignCast(@fieldParentPtr("interface", interface));
|
||||
_ = self;
|
||||
_ = info;
|
||||
_ = fence;
|
||||
}
|
||||
|
||||
pub fn waitIdle(interface: *Interface) VkError!void {
|
||||
const self: *Self = @alignCast(@fieldParentPtr("interface", interface));
|
||||
_ = self;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user