adding software blitter base

This commit is contained in:
2025-12-20 00:00:42 +01:00
parent 084412ac1c
commit 8a641adb8e
9 changed files with 95 additions and 28 deletions

27
src/soft/device/Blitter.zig git.filemode.normal_file
View File

@@ -0,0 +1,27 @@
const std = @import("std");
const vk = @import("vulkan");
const base = @import("base");
pub const SoftImage = @import("../SoftImage.zig");
pub const SoftImageView = @import("../SoftImageView.zig");
const Self = @This();
blit_mutex: std.Thread.Mutex,
pub const init: Self = .{
.blit_mutex = .{},
};
pub fn clear(self: *Self, pixel: *const anyopaque, format: vk.Format, dest: *SoftImage, view_format: vk.Format, range: vk.ImageSubresourceRange, area: ?vk.Rect2D) void {
const dst_format = base.Image.formatFromAspect(view_format, range.aspect_mask);
if (dst_format == .undefined) {
return;
}
_ = self;
_ = pixel;
_ = format;
_ = dest;
_ = area;
}