Skip to content

Commit

Permalink
spirv: enable variable pointers for now
Browse files Browse the repository at this point in the history
This seems to be required for ptr_elem_ptr with storage buffers. Note that
this does not imply that the pointer can be regarded as physical too.

Some variants of ptr_elem_ptr will need to be forbidden
  • Loading branch information
Snektron committed Nov 8, 2024
1 parent 5345cf1 commit b50742f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/link/SpirV.zig
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ 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, .Addresses, .Int8, .Int16, .Int64, .Float64, .Float16, .Vector16, .GenericPointer },
.vulkan => &.{ .Shader, .PhysicalStorageBufferAddresses, .Int8, .Int16, .Int64, .Float64, .Float16 },
.vulkan => &.{ .Shader, .PhysicalStorageBufferAddresses, .Int8, .Int16, .Int64, .Float64, .Float16, .VariablePointers, .VariablePointersStorageBuffer },
else => unreachable,
};

Expand Down

0 comments on commit b50742f

Please sign in to comment.