Skip to content

Commit

Permalink
all: remove support for stage1
Browse files Browse the repository at this point in the history
With almost all tests/examples working on all platforms now with the new compiler,
hexops/mach#180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
  • Loading branch information
slimsag committed Sep 10, 2022
1 parent 771275a commit 0b57c0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/opengl.zig
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const builtin = @import("builtin");
/// Generic function pointer used for returning client API function pointers.
///
/// see also: context_glext, glfwGetProcAddress
pub const GLProc = if (builtin.zig_backend == .stage1 or builtin.zig_backend == .other) fn () callconv(.C) void else *const fn () callconv(.C) void;
pub const GLProc = *const fn () callconv(.C) void;

/// Returns the address of the specified function for the current context.
///
Expand Down
10 changes: 2 additions & 8 deletions src/vulkan.zig
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ pub fn initVulkanLoader(loader_function: ?VKGetInstanceProcAddr) void {
c.glfwInitVulkanLoader(loader_function orelse null);
}

pub const VKGetInstanceProcAddr = if (@import("builtin").zig_backend == .stage1)
fn (vk_instance: c.VkInstance, name: [*c]const u8) callconv(.C) ?VKProc
else
*const fn (vk_instance: c.VkInstance, name: [*c]const u8) callconv(.C) ?VKProc;
pub const VKGetInstanceProcAddr = *const fn (vk_instance: c.VkInstance, name: [*c]const u8) callconv(.C) ?VKProc;

/// Returns whether the Vulkan loader and an ICD have been found.
///
Expand Down Expand Up @@ -106,10 +103,7 @@ pub inline fn getRequiredInstanceExtensions() error{APIUnavailable}![][*:0]const
/// Generic function pointer used for returning Vulkan API function pointers.
///
/// see also: vulkan_proc, glfw.getInstanceProcAddress
pub const VKProc = if (@import("builtin").zig_backend == .stage1)
fn () callconv(.C) void
else
*const fn () callconv(.C) void;
pub const VKProc = *const fn () callconv(.C) void;

/// Returns the address of the specified Vulkan instance function.
///
Expand Down

0 comments on commit 0b57c0f

Please sign in to comment.