| ... | @@ -15,13 +15,14 @@ pub const Feature = enum { | ... | @@ -15,13 +15,14 @@ pub const Feature = enum { |
| 15 | int64, | 15 | int64, |
| 16 | float16, | 16 | float16, |
| 17 | float64, | 17 | float64, |
| 18 | addresses, | | |
| 19 | matrix, | 18 | matrix, |
| 20 | storage_push_constant16, | 19 | storage_push_constant16, |
| 21 | kernel, | 20 | kernel, |
| | 21 | addresses, |
| 22 | generic_pointer, | 22 | generic_pointer, |
| 23 | vector16, | 23 | vector16, |
| 24 | shader, | 24 | shader, |
| | 25 | physical_storage_buffer, |
| 25 | }; | 26 | }; |
| 26 | | 27 | |
| 27 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; | 28 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| ... | @@ -94,11 +95,6 @@ pub const all_features = blk: { | ... | @@ -94,11 +95,6 @@ pub const all_features = blk: { |
| 94 | .description = "Enable Float64 capability", | 95 | .description = "Enable Float64 capability", |
| 95 | .dependencies = featureSet(&[_]Feature{.v1_0}), | 96 | .dependencies = featureSet(&[_]Feature{.v1_0}), |
| 96 | }; | 97 | }; |
| 97 | result[@intFromEnum(Feature.addresses)] = .{ | | |
| 98 | .llvm_name = null, | | |
| 99 | .description = "Enable either the Addresses capability or, SPV_KHR_physical_storage_buffer extension and the PhysicalStorageBufferAddresses capability", | | |
| 100 | .dependencies = featureSet(&[_]Feature{.v1_0}), | | |
| 101 | }; | | |
| 102 | result[@intFromEnum(Feature.matrix)] = .{ | 98 | result[@intFromEnum(Feature.matrix)] = .{ |
| 103 | .llvm_name = null, | 99 | .llvm_name = null, |
| 104 | .description = "Enable Matrix capability", | 100 | .description = "Enable Matrix capability", |
| ... | @@ -114,6 +110,11 @@ pub const all_features = blk: { | ... | @@ -114,6 +110,11 @@ pub const all_features = blk: { |
| 114 | .description = "Enable Kernel capability", | 110 | .description = "Enable Kernel capability", |
| 115 | .dependencies = featureSet(&[_]Feature{.v1_0}), | 111 | .dependencies = featureSet(&[_]Feature{.v1_0}), |
| 116 | }; | 112 | }; |
| | 113 | result[@intFromEnum(Feature.addresses)] = .{ |
| | 114 | .llvm_name = null, |
| | 115 | .description = "Enable Addresses capability", |
| | 116 | .dependencies = featureSet(&[_]Feature{.v1_0}), |
| | 117 | }; |
| 117 | result[@intFromEnum(Feature.generic_pointer)] = .{ | 118 | result[@intFromEnum(Feature.generic_pointer)] = .{ |
| 118 | .llvm_name = null, | 119 | .llvm_name = null, |
| 119 | .description = "Enable GenericPointer capability", | 120 | .description = "Enable GenericPointer capability", |
| ... | @@ -129,6 +130,11 @@ pub const all_features = blk: { | ... | @@ -129,6 +130,11 @@ pub const all_features = blk: { |
| 129 | .description = "Enable Shader capability", | 130 | .description = "Enable Shader capability", |
| 130 | .dependencies = featureSet(&[_]Feature{ .v1_0, .matrix }), | 131 | .dependencies = featureSet(&[_]Feature{ .v1_0, .matrix }), |
| 131 | }; | 132 | }; |
| | 133 | result[@intFromEnum(Feature.physical_storage_buffer)] = .{ |
| | 134 | .llvm_name = null, |
| | 135 | .description = "Enable SPV_KHR_physical_storage_buffer extension and the PhysicalStorageBufferAddresses capability", |
| | 136 | .dependencies = featureSet(&[_]Feature{.v1_0}), |
| | 137 | }; |
| 132 | const ti = @typeInfo(Feature); | 138 | const ti = @typeInfo(Feature); |
| 133 | for (&result, 0..) |*elem, i| { | 139 | for (&result, 0..) |*elem, i| { |
| 134 | elem.index = i; | 140 | elem.index = i; |
| ... | @@ -147,7 +153,7 @@ pub const cpu = struct { | ... | @@ -147,7 +153,7 @@ pub const cpu = struct { |
| 147 | pub const vulkan_v1_2: CpuModel = .{ | 153 | pub const vulkan_v1_2: CpuModel = .{ |
| 148 | .name = "vulkan_v1_2", | 154 | .name = "vulkan_v1_2", |
| 149 | .llvm_name = null, | 155 | .llvm_name = null, |
| 150 | .features = featureSet(&[_]Feature{ .v1_5, .shader, .addresses }), | 156 | .features = featureSet(&[_]Feature{ .v1_5, .shader, .physical_storage_buffer }), |
| 151 | }; | 157 | }; |
| 152 | | 158 | |
| 153 | pub const opencl_v2: CpuModel = .{ | 159 | pub const opencl_v2: CpuModel = .{ |