diff options
| author | Ali Cheraghi <alichraghi@proton.me> | 2025-05-07 15:03:42 +0330 |
|---|---|---|
| committer | Ali Cheraghi <alichraghi@proton.me> | 2025-05-21 12:57:40 +0330 |
| commit | 0901328f12e7ea3d05dc1d5b4a588e595c4bc0bc (patch) | |
| tree | 79320b4a4b280636ec5ff0d85d1bf2414c64a0e3 /lib/std | |
| parent | fca5f3602d697bd3de6a36d4504703693133144c (diff) | |
| download | zig-0901328f12e7ea3d05dc1d5b4a588e595c4bc0bc.tar.gz zig-0901328f12e7ea3d05dc1d5b4a588e595c4bc0bc.zip | |
spirv: write error value in an storage buffer
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/Target.zig | 2 | ||||
| -rw-r--r-- | lib/std/Target/spirv.zig | 8 | ||||
| -rw-r--r-- | lib/std/builtin.zig | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 9148fd5fdc..bf5a6369b5 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -2014,7 +2014,7 @@ pub const Cpu = struct { .global, .local, .shared => is_gpu, .constant => is_gpu and (context == null or context == .constant), .param => is_nvptx, - .input, .output, .uniform, .push_constant, .storage_buffer => is_spirv, + .input, .output, .uniform, .push_constant, .storage_buffer, .physical_storage_buffer => is_spirv, }; } }; diff --git a/lib/std/Target/spirv.zig b/lib/std/Target/spirv.zig index a2575b2fe8..90abacdd08 100644 --- a/lib/std/Target/spirv.zig +++ b/lib/std/Target/spirv.zig @@ -21,6 +21,7 @@ pub const Feature = enum { generic_pointer, vector16, shader, + variable_pointers, physical_storage_buffer, }; @@ -129,6 +130,11 @@ pub const all_features = blk: { .description = "Enable SPV_KHR_physical_storage_buffer extension and the PhysicalStorageBufferAddresses capability", .dependencies = featureSet(&[_]Feature{.v1_0}), }; + result[@intFromEnum(Feature.variable_pointers)] = .{ + .llvm_name = null, + .description = "Enable SPV_KHR_variable_pointers extension and the (VariablePointers, VariablePointersStorageBuffer) capabilities", + .dependencies = featureSet(&[_]Feature{.v1_0}), + }; const ti = @typeInfo(Feature); for (&result, 0..) |*elem, i| { elem.index = i; @@ -147,7 +153,7 @@ pub const cpu = struct { pub const vulkan_v1_2: CpuModel = .{ .name = "vulkan_v1_2", .llvm_name = null, - .features = featureSet(&[_]Feature{ .v1_5, .shader, .physical_storage_buffer }), + .features = featureSet(&[_]Feature{ .v1_5, .shader }), }; pub const opencl_v2: CpuModel = .{ diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index 852b94c324..1683cc500b 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -531,6 +531,7 @@ pub const AddressSpace = enum(u5) { uniform, push_constant, storage_buffer, + physical_storage_buffer, // AVR address spaces. flash, |
