authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2022-11-25 01:31:06+01:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2023-04-09 01:51:47+02:00
log17de4a88e9d494cfd7e07ab5277b5e335a2dc9e3
tree490b80747f3bbb984283a9ecbe4908d59c9824af
parentc22a30ac99b9a2b92d9a8e926b9bf0c9dbc3d14e
signaturelock-open Commit is signed but in an unrecognized format.

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.

1 files changed, 1 insertions(+), 1 deletions(-)

src/link/SpirV.zig+1-1
...@@ -242,7 +242,7 @@ pub fn flushModule(self: *SpirV, comp: *Compilation, prog_node: *std.Progress.No...@@ -242,7 +242,7 @@ pub fn flushModule(self: *SpirV, comp: *Compilation, prog_node: *std.Progress.No
242fn writeCapabilities(spv: *SpvModule, target: std.Target) !void {242fn writeCapabilities(spv: *SpvModule, target: std.Target) !void {
243 // TODO: Integrate with a hypothetical feature system243 // TODO: Integrate with a hypothetical feature system
244 const caps: []const spec.Capability = switch (target.os.tag) {244 const caps: []const spec.Capability = switch (target.os.tag) {
245 .opencl => &.{.Kernel},245 .opencl => &.{ .Kernel, .Addresses },
246 .glsl450 => &.{.Shader},246 .glsl450 => &.{.Shader},
247 .vulkan => &.{.Shader},247 .vulkan => &.{.Shader},
248 else => unreachable, // TODO248 else => unreachable, // TODO