adding all base handles

This commit is contained in:
2025-11-30 21:43:19 +01:00
parent 71f2b9171b
commit ff1317d412
29 changed files with 1143 additions and 219 deletions
+44
View File
@@ -0,0 +1,44 @@
const std = @import("std");
const vk = @import("vulkan");
const NonDispatchable = @import("NonDispatchable.zig");
const VkError = @import("error_set.zig").VkError;
const Device = @import("Device.zig");
const PipelineCache = @import("PipelineCache.zig");
const Self = @This();
pub const ObjectType: vk.ObjectType = .pipeline;
owner: *Device,
vtable: *const VTable,
pub const VTable = struct {
destroy: *const fn (*Self, std.mem.Allocator) void,
};
pub fn initCompute(device: *Device, allocator: std.mem.Allocator, cache: ?*PipelineCache, info: *const vk.ComputePipelineCreateInfo) VkError!Self {
_ = allocator;
_ = cache;
_ = info;
return .{
.owner = device,
.vtable = undefined,
};
}
pub fn initGraphics(device: *Device, allocator: std.mem.Allocator, cache: ?*PipelineCache, info: *const vk.GraphicsPipelineCreateInfo) VkError!Self {
_ = allocator;
_ = cache;
_ = info;
return .{
.owner = device,
.vtable = undefined,
};
}
pub inline fn destroy(self: *Self, allocator: std.mem.Allocator) void {
self.vtable.destroy(self, allocator);
}