diff options
| author | Robin Voetter <robin@voetter.nl> | 2023-04-09 01:27:02 +0200 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2023-04-09 01:51:53 +0200 |
| commit | efe7fae6afe1ecdfc3838a97651dc617c4c747c2 (patch) | |
| tree | dc1ca64c31439427a08fa15dcb15d39f41feb6f8 /src/codegen/spirv/Module.zig | |
| parent | 719d47d823a7e27ba0902b2878835297a6001fd0 (diff) | |
| download | zig-efe7fae6afe1ecdfc3838a97651dc617c4c747c2.tar.gz zig-efe7fae6afe1ecdfc3838a97651dc617c4c747c2.zip | |
spirv: temporarily emit test kernels
SPIR-V cannot represent function pointers without extensions
that no vendor implements. For the time being, generate a test
kernel for each error, so that we can at least run SOME tests.
In the future we may be able to emulate function pointers in some
way, but that is not today.
Diffstat (limited to 'src/codegen/spirv/Module.zig')
| -rw-r--r-- | src/codegen/spirv/Module.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen/spirv/Module.zig b/src/codegen/spirv/Module.zig index 7501ec5d92..2bf1efeee2 100644 --- a/src/codegen/spirv/Module.zig +++ b/src/codegen/spirv/Module.zig @@ -187,8 +187,8 @@ fn orderGlobalsInto( seen: *std.DynamicBitSetUnmanaged, ) !void { const node = self.globals.nodes.items[@enumToInt(global_index)]; - const deps = self.globals.dependencies.items[node.begin_dep .. node.end_dep]; - const insts = self.globals.section.instructions.items[node.begin_inst .. node.end_inst]; + const deps = self.globals.dependencies.items[node.begin_dep..node.end_dep]; + const insts = self.globals.section.instructions.items[node.begin_inst..node.end_inst]; seen.set(@enumToInt(global_index)); @@ -725,7 +725,7 @@ pub fn allocGlobal(self: *Module) !Global.Index { .begin_inst = undefined, .end_inst = undefined, .begin_dep = undefined, - .end_dep = undefined, + .end_dep = undefined, }); return @intToEnum(Global.Index, @intCast(u32, self.globals.nodes.items.len - 1)); } |
