From 17de4a88e9d494cfd7e07ab5277b5e335a2dc9e3 Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Fri, 25 Nov 2022 01:31:06 +0100 Subject: [PATCH] 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. --- src/link/SpirV.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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