aboutsummaryrefslogtreecommitdiff
path: root/src/link/SpirV.zig
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2022-11-25 01:31:06 +0100
committerRobin Voetter <robin@voetter.nl>2023-04-09 01:51:47 +0200
commit17de4a88e9d494cfd7e07ab5277b5e335a2dc9e3 (patch)
tree490b80747f3bbb984283a9ecbe4908d59c9824af /src/link/SpirV.zig
parentc22a30ac99b9a2b92d9a8e926b9bf0c9dbc3d14e (diff)
downloadzig-17de4a88e9d494cfd7e07ab5277b5e335a2dc9e3.tar.gz
zig-17de4a88e9d494cfd7e07ab5277b5e335a2dc9e3.zip
spirv: add Addresses capability for opencl
This capability is required to generate SPIR-V kernels with the Physical32 and Physical64 memory models, which we use in OpenCL kernels.
Diffstat (limited to 'src/link/SpirV.zig')
-rw-r--r--src/link/SpirV.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/link/SpirV.zig b/src/link/SpirV.zig
index 2d74e404eb..284e25671d 100644
--- a/src/link/SpirV.zig
+++ b/src/link/SpirV.zig
@@ -242,7 +242,7 @@ pub fn flushModule(self: *SpirV, comp: *Compilation, prog_node: *std.Progress.No
fn writeCapabilities(spv: *SpvModule, target: std.Target) !void {
// TODO: Integrate with a hypothetical feature system
const caps: []const spec.Capability = switch (target.os.tag) {
- .opencl => &.{.Kernel},
+ .opencl => &.{ .Kernel, .Addresses },
.glsl450 => &.{.Shader},
.vulkan => &.{.Shader},
else => unreachable, // TODO