mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.Target: Rename glsl450 Arch tag to opengl.
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.
This commit is contained in:
parent
15a3ee1979
commit
eb4539a27d
5 changed files with 17 additions and 17 deletions
2
lib/compiler/aro/aro/target.zig
vendored
2
lib/compiler/aro/aro/target.zig
vendored
|
|
@ -652,7 +652,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
|
|||
.shadermodel => "shadermodel",
|
||||
.liteos => "liteos",
|
||||
.opencl,
|
||||
.glsl450,
|
||||
.opengl,
|
||||
.vulkan,
|
||||
.plan9,
|
||||
.other,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue