Files
VulkanDriver/src/intel/FlintPipelineLayout.zig
T
kbz_8 2375abf688
Test / build_and_test (push) Successful in 5m28s
Build / build (push) Successful in 7m26s
fixing linter errors
2026-07-15 15:39:16 +02:00

32 lines
837 B
Zig

const std = @import("std");
const vk = @import("vulkan");
const base = @import("base");
const VkError = base.VkError;
const Self = @This();
pub const Interface = base.PipelineLayout;
interface: Interface,
pub fn create(device: *base.Device, allocator: std.mem.Allocator, info: *const vk.PipelineLayoutCreateInfo) VkError!*Self {
const self = allocator.create(Self) catch return VkError.OutOfHostMemory;
errdefer allocator.destroy(self);
var interface = try Interface.init(device, allocator, info);
interface.vtable = &.{
.destroy = destroy,
};
self.* = .{
.interface = interface,
};
return self;
}
pub fn destroy(interface: *Interface, allocator: std.mem.Allocator) void {
const self: *Self = @alignCast(@fieldParentPtr("interface", interface));
allocator.destroy(self);
}