fixing crashes
This commit is contained in:
@@ -149,7 +149,6 @@ vkEnumerateDeviceLayerProperties | ✅ Implemented
|
||||
vkEnumerateInstanceExtensionProperties | ✅ Implemented
|
||||
vkEnumerateInstanceLayerProperties | ✅ Implemented
|
||||
vkEnumeratePhysicalDevices | ✅ Implemented
|
||||
vkEnumeratePhysicalDeviceGroups | ✅ Implemented
|
||||
vkEnumeratePhysicalDeviceGroupsKHR | ✅ Implemented
|
||||
vkFlushMappedMemoryRanges | ✅ Implemented
|
||||
vkFreeCommandBuffers | ✅ Implemented
|
||||
|
||||
@@ -120,12 +120,13 @@ pub inline fn destroy(self: *Self, allocator: std.mem.Allocator) void {
|
||||
}
|
||||
|
||||
pub fn begin(self: *Self, info: *const vk.CommandBufferBeginInfo) VkError!void {
|
||||
const implicitly_reset = self.state == .Executable;
|
||||
const implicitly_reset = self.state == .Executable or self.state == .Invalid;
|
||||
|
||||
self.transitionState(.Recording, &.{ .Initial, .Executable, .Invalid }) catch return VkError.ValidationFailed;
|
||||
if (implicitly_reset) {
|
||||
try self.dispatch_table.reset(self, .{});
|
||||
self.begin_info = null;
|
||||
self.usage_flags = .{};
|
||||
}
|
||||
|
||||
try self.dispatch_table.begin(self, info);
|
||||
|
||||
@@ -86,6 +86,7 @@ pub fn freeCommandBuffers(self: *Self, cmds: []*Dispatchable(CommandBuffer)) VkE
|
||||
var len: usize = 0;
|
||||
for (cmds) |cmd| {
|
||||
if (std.mem.indexOfScalar(*Dispatchable(CommandBuffer), self.buffers.items, cmd)) |i| {
|
||||
try cmd.object.resetFromPool(.{ .release_resources_bit = true });
|
||||
const save = self.buffers.orderedRemove(i);
|
||||
self.buffers.appendAssumeCapacity(save);
|
||||
len += 1;
|
||||
|
||||
@@ -2326,11 +2326,15 @@ pub export fn apeGetPhysicalDeviceSurfaceSupportKHR(p_physical_device: vk.Physic
|
||||
|
||||
/// TODO: proper implementation when adding new drivers
|
||||
pub export fn apeGetPhysicalDeviceWaylandPresentationSupportKHR(p_physical_device: vk.PhysicalDevice, _: u32, _: *anyopaque) callconv(vk.vulkan_call_conv) vk.Bool32 {
|
||||
if (comptime has_wayland) {
|
||||
entryPointBeginLogTrace(.vkGetPhysicalDeviceWaylandPresentationSupportKHR);
|
||||
defer entryPointEndLogTrace();
|
||||
|
||||
Dispatchable(PhysicalDevice).checkHandleValidity(p_physical_device) catch |err| errorLogger(err);
|
||||
return .true;
|
||||
} else {
|
||||
return .false;
|
||||
}
|
||||
}
|
||||
|
||||
pub export fn apeGetSwapchainImagesKHR(p_device: vk.Device, p_swapchain: vk.SwapchainKHR, count: *u32, p_images: ?[*]vk.Image) callconv(vk.vulkan_call_conv) vk.Result {
|
||||
|
||||
Reference in New Issue
Block a user