spirv: super basic composite int support

This commit is contained in:
Ali Cheraghi
2025-05-07 20:25:06 +03:30
parent 0901328f12
commit dacd70fbe4
10 changed files with 120 additions and 72 deletions

View File

@@ -369,8 +369,11 @@ pub fn finalize(self: *Module, a: Allocator) ![]Word {
// Emit memory model
const addressing_model: spec.AddressingModel = blk: {
if (self.hasFeature(.shader)) {
assert(self.target.cpu.arch == .spirv64);
if (self.hasFeature(.physical_storage_buffer)) break :blk .PhysicalStorageBuffer64;
if (self.hasFeature(.physical_storage_buffer)) {
assert(self.target.cpu.arch == .spirv64);
break :blk .PhysicalStorageBuffer64;
}
assert(self.target.cpu.arch == .spirv);
break :blk .Logical;
}