aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2023-03-18 15:59:56 +0100
committerVeikka Tuominen <git@vexu.eu>2023-03-30 12:20:24 +0300
commit3357c59cebacb6b60da865376b20d2b307d12ec1 (patch)
tree51edbb19a1f063888bac386c6a51ba250e361b11 /src/arch/wasm/CodeGen.zig
parent83051b0cbf31b76e824d3911a7f4a0be3c0cf94d (diff)
downloadzig-3357c59cebacb6b60da865376b20d2b307d12ec1.tar.gz
zig-3357c59cebacb6b60da865376b20d2b307d12ec1.zip
new builtins: @workItemId, @workGroupId, @workGroupSize
* @workItemId returns the index of the work item in a work group for a dimension. * @workGroupId returns the index of the work group in the kernel dispatch for a dimension. * @workGroupSize returns the size of the work group for a dimension. These builtins are mainly useful for GPU backends. They are currently only implemented for the AMDGCN LLVM backend.
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index 199ddada65..fc5d13e5a4 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -1997,6 +1997,11 @@ fn genInst(func: *CodeGen, inst: Air.Inst.Index) InnerError!void {
.reduce_optimized,
.float_to_int_optimized,
=> return func.fail("TODO implement optimized float mode", .{}),
+
+ .work_item_id,
+ .work_group_size,
+ .work_group_id,
+ => unreachable,
};
}