| author | |
| committer | |
| log | eb4539a27d72defc2f90a0b164a5d7f27df79ea7 |
| tree | efe3019b3c60c1b0199c689fb9ff158a473b1383 |
| parent | 15a3ee19795dd9807107c2a45fa328b00e9edd10 |
| signature | Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM |
Versions can simply use the normal version range mechanism, or alternatively an
Abi tag if that makes more sense. For now, we only care about 4.5 anyway.5 files changed, 17 insertions(+), 17 deletions(-)
lib/compiler/aro/aro/target.zig+1-1| ... | ... | @@ -652,7 +652,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { |
| 652 | 652 | .shadermodel => "shadermodel", |
| 653 | 653 | .liteos => "liteos", |
| 654 | 654 | .opencl, |
| 655 | .glsl450, | |
| 655 | .opengl, | |
| 656 | 656 | .vulkan, |
| 657 | 657 | .plan9, |
| 658 | 658 | .other, |
lib/std/Target.zig+8-8| ... | ... | @@ -63,10 +63,10 @@ pub const Os = struct { |
| 63 | 63 | amdhsa, |
| 64 | 64 | amdpal, |
| 65 | 65 | cuda, |
| 66 | glsl450, | |
| 67 | 66 | mesa3d, |
| 68 | 67 | nvcl, |
| 69 | 68 | opencl, |
| 69 | opengl, | |
| 70 | 70 | shadermodel, |
| 71 | 71 | vulkan, |
| 72 | 72 | |
| ... | ... | @@ -171,7 +171,7 @@ pub const Os = struct { |
| 171 | 171 | .liteos, |
| 172 | 172 | .uefi, |
| 173 | 173 | .opencl, // TODO: OpenCL versions |
| 174 | .glsl450, // TODO: GLSL versions | |
| 174 | .opengl, // TODO: GLSL versions | |
| 175 | 175 | .vulkan, |
| 176 | 176 | .plan9, |
| 177 | 177 | .illumos, |
| ... | ... | @@ -402,7 +402,7 @@ pub const Os = struct { |
| 402 | 402 | .liteos, |
| 403 | 403 | .uefi, |
| 404 | 404 | .opencl, // TODO: OpenCL versions |
| 405 | .glsl450, // TODO: GLSL versions | |
| 405 | .opengl, // TODO: GLSL versions | |
| 406 | 406 | .vulkan, |
| 407 | 407 | .plan9, |
| 408 | 408 | .illumos, |
| ... | ... | @@ -601,7 +601,7 @@ pub const Os = struct { |
| 601 | 601 | .liteos, |
| 602 | 602 | .uefi, |
| 603 | 603 | .opencl, |
| 604 | .glsl450, | |
| 604 | .opengl, | |
| 605 | 605 | .vulkan, |
| 606 | 606 | .plan9, |
| 607 | 607 | .other, |
| ... | ... | @@ -715,7 +715,7 @@ pub const Abi = enum { |
| 715 | 715 | => .musl, |
| 716 | 716 | .liteos => .ohos, |
| 717 | 717 | .opencl, // TODO: SPIR-V ABIs with Linkage capability |
| 718 | .glsl450, | |
| 718 | .opengl, | |
| 719 | 719 | .vulkan, |
| 720 | 720 | .plan9, // TODO specify abi |
| 721 | 721 | .macos, |
| ... | ... | @@ -1661,7 +1661,7 @@ pub inline fn hasDynamicLinker(target: Target) bool { |
| 1661 | 1661 | .windows, |
| 1662 | 1662 | .emscripten, |
| 1663 | 1663 | .opencl, |
| 1664 | .glsl450, | |
| 1664 | .opengl, | |
| 1665 | 1665 | .vulkan, |
| 1666 | 1666 | .plan9, |
| 1667 | 1667 | .other, |
| ... | ... | @@ -1829,7 +1829,7 @@ pub const DynamicLinker = struct { |
| 1829 | 1829 | .emscripten, |
| 1830 | 1830 | .wasi, |
| 1831 | 1831 | .opencl, |
| 1832 | .glsl450, | |
| 1832 | .opengl, | |
| 1833 | 1833 | .vulkan, |
| 1834 | 1834 | .other, |
| 1835 | 1835 | .plan9, |
| ... | ... | @@ -2346,7 +2346,7 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 { |
| 2346 | 2346 | .contiki, |
| 2347 | 2347 | .hermit, |
| 2348 | 2348 | .hurd, |
| 2349 | .glsl450, | |
| 2349 | .opengl, | |
| 2350 | 2350 | .driverkit, |
| 2351 | 2351 | .shadermodel, |
| 2352 | 2352 | .liteos, |
src/codegen/llvm.zig+2-2| ... | ... | @@ -140,7 +140,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 140 | 140 | .serenity => "serenity", |
| 141 | 141 | .vulkan => "vulkan", |
| 142 | 142 | |
| 143 | .glsl450, | |
| 143 | .opengl, | |
| 144 | 144 | .plan9, |
| 145 | 145 | .minix, |
| 146 | 146 | .contiki, |
| ... | ... | @@ -210,7 +210,7 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { |
| 210 | 210 | .freestanding, |
| 211 | 211 | .other, |
| 212 | 212 | .opencl, |
| 213 | .glsl450, | |
| 213 | .opengl, | |
| 214 | 214 | .plan9, |
| 215 | 215 | .minix, |
| 216 | 216 | .contiki, |
src/link/SpirV.zig+4-4| ... | ... | @@ -85,7 +85,7 @@ pub fn createEmpty( |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | switch (target.os.tag) { |
| 88 | .opencl, .glsl450, .vulkan => {}, | |
| 88 | .opencl, .opengl, .vulkan => {}, | |
| 89 | 89 | else => unreachable, // Caught by Compilation.Config.resolve. |
| 90 | 90 | } |
| 91 | 91 | |
| ... | ... | @@ -290,7 +290,7 @@ fn writeCapabilities(spv: *SpvModule, target: std.Target) !void { |
| 290 | 290 | // TODO: Integrate with a hypothetical feature system |
| 291 | 291 | const caps: []const spec.Capability = switch (target.os.tag) { |
| 292 | 292 | .opencl => &.{ .Kernel, .Addresses, .Int8, .Int16, .Int64, .Float64, .Float16, .Vector16, .GenericPointer }, |
| 293 | .glsl450 => &.{.Shader}, | |
| 293 | .opengl => &.{.Shader}, | |
| 294 | 294 | .vulkan => &.{ .Shader, .VariablePointersStorageBuffer, .Int8, .Int16, .Int64, .Float64, .Float16 }, |
| 295 | 295 | else => unreachable, // TODO |
| 296 | 296 | }; |
| ... | ... | @@ -311,13 +311,13 @@ fn writeMemoryModel(spv: *SpvModule, target: std.Target) !void { |
| 311 | 311 | .spirv64 => spec.AddressingModel.Physical64, |
| 312 | 312 | else => unreachable, // TODO |
| 313 | 313 | }, |
| 314 | .glsl450, .vulkan => spec.AddressingModel.Logical, | |
| 314 | .opengl, .vulkan => spec.AddressingModel.Logical, | |
| 315 | 315 | else => unreachable, // TODO |
| 316 | 316 | }; |
| 317 | 317 | |
| 318 | 318 | const memory_model: spec.MemoryModel = switch (target.os.tag) { |
| 319 | 319 | .opencl => .OpenCL, |
| 320 | .glsl450 => .GLSL450, | |
| 320 | .opengl => .GLSL450, | |
| 321 | 321 | .vulkan => .GLSL450, |
| 322 | 322 | else => unreachable, |
| 323 | 323 | }; |
test/llvm_targets.zig+2-2| ... | ... | @@ -90,10 +90,10 @@ const targets = [_]std.Target.Query{ |
| 90 | 90 | .{ .cpu_arch = .sparc64, .os_tag = .freestanding, .abi = .none }, |
| 91 | 91 | .{ .cpu_arch = .sparc64, .os_tag = .linux, .abi = .gnu }, |
| 92 | 92 | //.{ .cpu_arch = .spirv32, .os_tag = .opencl, .abi = .none }, |
| 93 | //.{ .cpu_arch = .spirv32, .os_tag = .glsl450, .abi = .none }, | |
| 93 | //.{ .cpu_arch = .spirv32, .os_tag = .opengl, .abi = .none }, | |
| 94 | 94 | //.{ .cpu_arch = .spirv32, .os_tag = .vulkan, .abi = .none }, |
| 95 | 95 | //.{ .cpu_arch = .spirv64, .os_tag = .opencl, .abi = .none }, |
| 96 | //.{ .cpu_arch = .spirv64, .os_tag = .glsl450, .abi = .none }, | |
| 96 | //.{ .cpu_arch = .spirv64, .os_tag = .opengl, .abi = .none }, | |
| 97 | 97 | //.{ .cpu_arch = .spirv64, .os_tag = .vulkan, .abi = .none }, |
| 98 | 98 | .{ .cpu_arch = .thumb, .os_tag = .freestanding, .abi = .none }, |
| 99 | 99 | .{ .cpu_arch = .thumbeb, .os_tag = .freestanding, .abi = .none }, |