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