fixing triggered assertion in blitter
Build / build (push) Successful in 1m13s
Test / build_and_test (push) Failing after 2m21s

This commit is contained in:
2026-05-09 23:52:06 +02:00
parent 13b898a7cd
commit 1e02a5bc3e
8 changed files with 156 additions and 47 deletions
+1 -4
View File
@@ -55,10 +55,7 @@ fn alloc(context: *anyopaque, len: usize, alignment: Alignment, ret_addr: usize)
if (self.callbacks) |callbacks| {
if (callbacks.pfn_allocation) |pfn_allocation| {
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;
return @ptrCast(pfn_allocation(self.callbacks.?.p_user_data, len, alignment.toByteUnits(), self.scope));
}
}
+3 -3
View File
@@ -4,7 +4,7 @@ const lib = @import("lib.zig");
const zm = @import("zmath");
pub fn fromAspect(format: vk.Format, aspect: vk.ImageAspectFlags) vk.Format {
if (aspect.color_bit or (aspect.color_bit and aspect.stencil_bit)) {
if (aspect.color_bit or (aspect.depth_bit and aspect.stencil_bit)) {
return format;
} else if (aspect.depth_bit) {
if (format == .d16_unorm or format == .d16_unorm_s8_uint) {
@@ -20,7 +20,7 @@ pub fn fromAspect(format: vk.Format, aspect: vk.ImageAspectFlags) vk.Format {
}
}
lib.unsupported("format {s}", .{@tagName(format)});
return format;
return .undefined;
}
pub fn toAspect(format: vk.Format) vk.ImageAspectFlags {
@@ -40,7 +40,7 @@ pub inline fn texelSize(format: vk.Format) usize {
return lib.c.vkuFormatTexelBlockSize(@intCast(@intFromEnum(format)));
}
pub inline fn supportsColorAttachemendBlend(format: vk.Format) bool {
pub fn supportsColorAttachemendBlend(format: vk.Format) bool {
return switch (format) {
// Vulkan 1.1 mandatory
.r5g6b5_unorm_pack16,