fixing crashes
This commit is contained in:
@@ -149,7 +149,6 @@ vkEnumerateDeviceLayerProperties | ✅ Implemented
|
|||||||
vkEnumerateInstanceExtensionProperties | ✅ Implemented
|
vkEnumerateInstanceExtensionProperties | ✅ Implemented
|
||||||
vkEnumerateInstanceLayerProperties | ✅ Implemented
|
vkEnumerateInstanceLayerProperties | ✅ Implemented
|
||||||
vkEnumeratePhysicalDevices | ✅ Implemented
|
vkEnumeratePhysicalDevices | ✅ Implemented
|
||||||
vkEnumeratePhysicalDeviceGroups | ✅ Implemented
|
|
||||||
vkEnumeratePhysicalDeviceGroupsKHR | ✅ Implemented
|
vkEnumeratePhysicalDeviceGroupsKHR | ✅ Implemented
|
||||||
vkFlushMappedMemoryRanges | ✅ Implemented
|
vkFlushMappedMemoryRanges | ✅ Implemented
|
||||||
vkFreeCommandBuffers | ✅ 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 {
|
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;
|
self.transitionState(.Recording, &.{ .Initial, .Executable, .Invalid }) catch return VkError.ValidationFailed;
|
||||||
if (implicitly_reset) {
|
if (implicitly_reset) {
|
||||||
try self.dispatch_table.reset(self, .{});
|
try self.dispatch_table.reset(self, .{});
|
||||||
self.begin_info = null;
|
self.begin_info = null;
|
||||||
|
self.usage_flags = .{};
|
||||||
}
|
}
|
||||||
|
|
||||||
try self.dispatch_table.begin(self, info);
|
try self.dispatch_table.begin(self, info);
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ pub fn freeCommandBuffers(self: *Self, cmds: []*Dispatchable(CommandBuffer)) VkE
|
|||||||
var len: usize = 0;
|
var len: usize = 0;
|
||||||
for (cmds) |cmd| {
|
for (cmds) |cmd| {
|
||||||
if (std.mem.indexOfScalar(*Dispatchable(CommandBuffer), self.buffers.items, cmd)) |i| {
|
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);
|
const save = self.buffers.orderedRemove(i);
|
||||||
self.buffers.appendAssumeCapacity(save);
|
self.buffers.appendAssumeCapacity(save);
|
||||||
len += 1;
|
len += 1;
|
||||||
|
|||||||
@@ -2326,11 +2326,15 @@ pub export fn apeGetPhysicalDeviceSurfaceSupportKHR(p_physical_device: vk.Physic
|
|||||||
|
|
||||||
/// TODO: proper implementation when adding new drivers
|
/// 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 {
|
pub export fn apeGetPhysicalDeviceWaylandPresentationSupportKHR(p_physical_device: vk.PhysicalDevice, _: u32, _: *anyopaque) callconv(vk.vulkan_call_conv) vk.Bool32 {
|
||||||
entryPointBeginLogTrace(.vkGetPhysicalDeviceWaylandPresentationSupportKHR);
|
if (comptime has_wayland) {
|
||||||
defer entryPointEndLogTrace();
|
entryPointBeginLogTrace(.vkGetPhysicalDeviceWaylandPresentationSupportKHR);
|
||||||
|
defer entryPointEndLogTrace();
|
||||||
|
|
||||||
Dispatchable(PhysicalDevice).checkHandleValidity(p_physical_device) catch |err| errorLogger(err);
|
Dispatchable(PhysicalDevice).checkHandleValidity(p_physical_device) catch |err| errorLogger(err);
|
||||||
return .true;
|
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 {
|
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