adding cleaning engines, adding image engine
Test / build (push) Successful in 1m6s
Build / build (push) Successful in 1m14s

This commit is contained in:
2026-05-20 18:04:53 +02:00
parent 45453c1b9e
commit bc84a9f553
5 changed files with 712 additions and 551 deletions
+16 -2
View File
@@ -113,7 +113,11 @@ pub const Value = union(Type) {
driver_image: *anyopaque,
},
Sampler: struct {},
SampledImage: struct {},
SampledImage: struct {
type_word: SpvWord,
driver_image: *anyopaque,
driver_sampler: *anyopaque,
},
Pointer: struct {
ptr: union(enum) {
common: *Self,
@@ -244,7 +248,13 @@ pub const Value = union(Type) {
},
},
.Sampler => RuntimeError.ToDo,
.SampledImage => RuntimeError.ToDo,
.SampledImage => .{
.SampledImage = .{
.type_word = target_type,
.driver_image = undefined,
.driver_sampler = undefined,
},
},
.Pointer => .{
.Pointer = .{
.ptr = undefined,
@@ -469,6 +479,10 @@ pub const Value = union(Type) {
},
.RuntimeArray => |*arr| arr.data = @constCast(input[0..]),
.Image => |*img| img.driver_image = @ptrFromInt(std.mem.bytesToValue(usize, input[0..])),
.SampledImage => |*img| {
img.driver_image = @ptrFromInt(std.mem.bytesToValue(usize, input[0..]));
img.driver_sampler = @ptrFromInt(std.mem.bytesToValue(usize, input[@sizeOf(usize)..]));
},
else => return RuntimeError.InvalidValueType,
}
return 0;