fixing crashes
Test / build_and_test (push) Successful in 49s
Build / build (push) Successful in 1m28s

This commit is contained in:
2026-05-17 01:58:20 +02:00
parent 134925a16e
commit 3c9a864240
9 changed files with 292 additions and 97 deletions
+10 -3
View File
@@ -1,16 +1,20 @@
const std = @import("std");
const vk = @import("vulkan");
const NonDispatchable = @import("NonDispatchable.zig");
const VkError = @import("error_set.zig").VkError;
const NonDispatchable = @import("NonDispatchable.zig").NonDispatchable;
const Device = @import("Device.zig");
const Buffer = @import("Buffer.zig");
const Self = @This();
pub const ObjectType: vk.ObjectType = .buffer_view;
owner: *Device,
buffer: *Buffer,
format: vk.Format,
offset: vk.DeviceSize,
range: vk.DeviceSize,
vtable: *const VTable,
@@ -20,10 +24,13 @@ pub const VTable = struct {
pub fn init(device: *Device, allocator: std.mem.Allocator, info: *const vk.BufferViewCreateInfo) VkError!Self {
_ = allocator;
_ = info;
return .{
.owner = device,
.buffer = try NonDispatchable(Buffer).fromHandleObject(info.buffer),
.vtable = undefined,
.format = info.format,
.offset = info.offset,
.range = info.range,
};
}
-2
View File
@@ -6,8 +6,6 @@ const VkError = @import("error_set.zig").VkError;
const NonDispatchable = @import("NonDispatchable.zig").NonDispatchable;
const Device = @import("Device.zig");
const DeviceMemory = @import("DeviceMemory.zig");
const Image = @import("Image.zig");
const Self = @This();
+1 -1
View File
@@ -64,7 +64,7 @@ pub fn init(device: *Device, allocator: std.mem.Allocator, info: *const vk.Rende
else
null,
.depth_stencil_attachments = if (subpass_info.p_depth_stencil_attachment) |subpass_attachment|
subpass_attachment.*
if (subpass_attachment.attachment != vk.ATTACHMENT_UNUSED) subpass_attachment.* else null
else
null,
.preserve_attachments = if (subpass_info.p_preserve_attachments) |subpass_attachments|