diff --git a/lib/compiler/aro/aro/target.zig b/lib/compiler/aro/aro/target.zig index a876723302..95be478230 100644 --- a/lib/compiler/aro/aro/target.zig +++ b/lib/compiler/aro/aro/target.zig @@ -652,7 +652,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { .shadermodel => "shadermodel", .liteos => "liteos", .opencl, - .glsl450, + .opengl, .vulkan, .plan9, .other, diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 13b269bfcc..cfbb2f25dc 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -63,10 +63,10 @@ pub const Os = struct { amdhsa, amdpal, cuda, - glsl450, mesa3d, nvcl, opencl, + opengl, shadermodel, vulkan, @@ -171,7 +171,7 @@ pub const Os = struct { .liteos, .uefi, .opencl, // TODO: OpenCL versions - .glsl450, // TODO: GLSL versions + .opengl, // TODO: GLSL versions .vulkan, .plan9, .illumos, @@ -402,7 +402,7 @@ pub const Os = struct { .liteos, .uefi, .opencl, // TODO: OpenCL versions - .glsl450, // TODO: GLSL versions + .opengl, // TODO: GLSL versions .vulkan, .plan9, .illumos, @@ -601,7 +601,7 @@ pub const Os = struct { .liteos, .uefi, .opencl, - .glsl450, + .opengl, .vulkan, .plan9, .other, @@ -715,7 +715,7 @@ pub const Abi = enum { => .musl, .liteos => .ohos, .opencl, // TODO: SPIR-V ABIs with Linkage capability - .glsl450, + .opengl, .vulkan, .plan9, // TODO specify abi .macos, @@ -1661,7 +1661,7 @@ pub inline fn hasDynamicLinker(target: Target) bool { .windows, .emscripten, .opencl, - .glsl450, + .opengl, .vulkan, .plan9, .other, @@ -1829,7 +1829,7 @@ pub const DynamicLinker = struct { .emscripten, .wasi, .opencl, - .glsl450, + .opengl, .vulkan, .other, .plan9, @@ -2346,7 +2346,7 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 { .contiki, .hermit, .hurd, - .glsl450, + .opengl, .driverkit, .shadermodel, .liteos, diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index b900c15d82..959d5fa658 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -140,7 +140,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { .serenity => "serenity", .vulkan => "vulkan", - .glsl450, + .opengl, .plan9, .minix, .contiki, @@ -210,7 +210,7 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { .freestanding, .other, .opencl, - .glsl450, + .opengl, .plan9, .minix, .contiki, diff --git a/src/link/SpirV.zig b/src/link/SpirV.zig index e97c80c3fe..57e69ed860 100644 --- a/src/link/SpirV.zig +++ b/src/link/SpirV.zig @@ -85,7 +85,7 @@ pub fn createEmpty( } switch (target.os.tag) { - .opencl, .glsl450, .vulkan => {}, + .opencl, .opengl, .vulkan => {}, else => unreachable, // Caught by Compilation.Config.resolve. } @@ -290,7 +290,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 }, - .glsl450 => &.{.Shader}, + .opengl => &.{.Shader}, .vulkan => &.{ .Shader, .VariablePointersStorageBuffer, .Int8, .Int16, .Int64, .Float64, .Float16 }, else => unreachable, // TODO }; @@ -311,13 +311,13 @@ fn writeMemoryModel(spv: *SpvModule, target: std.Target) !void { .spirv64 => spec.AddressingModel.Physical64, else => unreachable, // TODO }, - .glsl450, .vulkan => spec.AddressingModel.Logical, + .opengl, .vulkan => spec.AddressingModel.Logical, else => unreachable, // TODO }; const memory_model: spec.MemoryModel = switch (target.os.tag) { .opencl => .OpenCL, - .glsl450 => .GLSL450, + .opengl => .GLSL450, .vulkan => .GLSL450, else => unreachable, }; diff --git a/test/llvm_targets.zig b/test/llvm_targets.zig index 71dc9e30a3..76b9e668fa 100644 --- a/test/llvm_targets.zig +++ b/test/llvm_targets.zig @@ -90,10 +90,10 @@ const targets = [_]std.Target.Query{ .{ .cpu_arch = .sparc64, .os_tag = .freestanding, .abi = .none }, .{ .cpu_arch = .sparc64, .os_tag = .linux, .abi = .gnu }, //.{ .cpu_arch = .spirv32, .os_tag = .opencl, .abi = .none }, - //.{ .cpu_arch = .spirv32, .os_tag = .glsl450, .abi = .none }, + //.{ .cpu_arch = .spirv32, .os_tag = .opengl, .abi = .none }, //.{ .cpu_arch = .spirv32, .os_tag = .vulkan, .abi = .none }, //.{ .cpu_arch = .spirv64, .os_tag = .opencl, .abi = .none }, - //.{ .cpu_arch = .spirv64, .os_tag = .glsl450, .abi = .none }, + //.{ .cpu_arch = .spirv64, .os_tag = .opengl, .abi = .none }, //.{ .cpu_arch = .spirv64, .os_tag = .vulkan, .abi = .none }, .{ .cpu_arch = .thumb, .os_tag = .freestanding, .abi = .none }, .{ .cpu_arch = .thumbeb, .os_tag = .freestanding, .abi = .none },