implementing imulextend and umulextend
Build / build (push) Successful in 1m6s
Test / build_and_test (push) Successful in 32m11s

This commit is contained in:
2026-04-29 23:53:27 +02:00
parent 0ea7281eff
commit b9ce18ca8e
8 changed files with 59 additions and 20 deletions
+4 -1
View File
@@ -62,7 +62,10 @@ fn alloc(context: *anyopaque, len: usize, alignment: Alignment, ret_addr: usize)
if (self.callbacks) |callbacks| {
if (callbacks.pfn_allocation) |pfn_allocation| {
return @ptrCast(pfn_allocation(self.callbacks.?.p_user_data, len, alignment.toByteUnits(), self.scope));
const ptr: ?[*]u8 = @ptrCast(pfn_allocation(self.callbacks.?.p_user_data, len, alignment.toByteUnits(), self.scope));
//std.debug.print("test {*}\n", .{ptr});
//std.debug.dumpCurrentStackTrace(.{});
return ptr;
}
}
+11
View File
@@ -1,5 +1,6 @@
const std = @import("std");
const vk = @import("vulkan");
const lib = @import("lib.zig");
pub const VkError = error{
NotReady,
@@ -58,10 +59,20 @@ pub const VkError = error{
pub inline fn errorLogger(err: VkError) void {
std.log.scoped(.errorLogger).err("Error logger catched a '{s}'", .{@errorName(err)});
if (comptime lib.config.logs == .verbose) {
if (@errorReturnTrace()) |trace| {
std.debug.dumpErrorReturnTrace(trace);
}
}
}
pub inline fn errorLoggerContext(err: VkError, context: []const u8) void {
std.log.scoped(.errorLogger).err("Error logger catched a '{s}' in {s}", .{ @errorName(err), context });
if (comptime lib.config.logs == .verbose) {
if (@errorReturnTrace()) |trace| {
std.debug.dumpErrorReturnTrace(trace);
}
}
}
pub inline fn toVkResult(err: VkError) vk.Result {
+2 -2
View File
@@ -14,14 +14,14 @@ comptime {
var mutex: std.Io.Mutex = .init;
pub inline fn fixme(comptime format: []const u8, args: anytype) void {
if (comptime !lib.config.logs) {
if (comptime lib.config.logs == .none) {
return;
}
std.log.scoped(.FIXME).warn("FIXME: " ++ format, args);
}
pub fn log(comptime level: std.log.Level, comptime scope: @EnumLiteral(), comptime format: []const u8, args: anytype) void {
if (comptime !lib.config.logs) {
if (comptime lib.config.logs == .none) {
return;
}