adding Vulkan conformance tests as a step
This commit is contained in:
@@ -78,6 +78,13 @@ pub inline fn bindSparse(self: *Self, info: []const vk.BindSparseInfo, fence: ?*
|
||||
}
|
||||
|
||||
pub inline fn submit(self: *Self, infos: []const vk.SubmitInfo, p_fence: ?*Fence) VkError!void {
|
||||
if (infos.len == 0) {
|
||||
if (p_fence) |fence| {
|
||||
try fence.signal();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const allocator = self.host_allocator.cloneWithScope(.command).allocator();
|
||||
|
||||
var submit_infos = try SubmitInfo.initBlob(allocator, infos);
|
||||
|
||||
@@ -90,7 +90,6 @@ fn free(context: *anyopaque, ptr: []u8, alignment: Alignment, ret_addr: usize) v
|
||||
pfn_free(self.callbacks.?.p_user_data, ptr.ptr);
|
||||
}
|
||||
}
|
||||
|
||||
getFallbackAllocator().rawFree(ptr, alignment, ret_addr);
|
||||
}
|
||||
|
||||
@@ -99,6 +98,6 @@ inline fn getFallbackAllocator() std.mem.Allocator {
|
||||
@branchHint(.unlikely);
|
||||
return debug_allocator.allocator();
|
||||
} else {
|
||||
return std.heap.c_allocator;
|
||||
return std.heap.page_allocator;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,6 +205,7 @@ const device_pfn_map = block: {
|
||||
functionMapEntryPoint("vkFreeMemory"),
|
||||
functionMapEntryPoint("vkGetBufferMemoryRequirements"),
|
||||
functionMapEntryPoint("vkGetDeviceMemoryCommitment"),
|
||||
functionMapEntryPoint("vkGetDeviceProcAddr"),
|
||||
functionMapEntryPoint("vkGetDeviceQueue"),
|
||||
functionMapEntryPoint("vkGetEventStatus"),
|
||||
functionMapEntryPoint("vkGetFenceStatus"),
|
||||
@@ -497,8 +498,6 @@ pub export fn strollQueueSubmit(p_queue: vk.Queue, count: u32, info: [*]const vk
|
||||
entryPointBeginLogTrace(.vkQueueSubmit);
|
||||
defer entryPointEndLogTrace();
|
||||
|
||||
if (count == 0) return .success;
|
||||
|
||||
const queue = Dispatchable(Queue).fromHandleObject(p_queue) catch |err| return toVkResult(err);
|
||||
const fence = if (p_fence != .null_handle) NonDispatchable(Fence).fromHandleObject(p_fence) catch |err| return toVkResult(err) else null;
|
||||
queue.submit(info[0..count], fence) catch |err| return toVkResult(err);
|
||||
|
||||
@@ -56,6 +56,7 @@ pub inline fn disableIndent() void {
|
||||
|
||||
pub inline fn freeInnerDebugStack() void {
|
||||
debug_stack.deinit(std.heap.c_allocator);
|
||||
debug_stack = .empty;
|
||||
}
|
||||
|
||||
pub inline fn fixme(comptime format: []const u8, args: anytype) void {
|
||||
|
||||
Reference in New Issue
Block a user