forked from mirror/vulkan-zig
Only use stdcall when on 32-bit windows (https://github.com/ziglang/zig/issues/7337)
This commit is contained in:
@@ -8,6 +8,6 @@ const vk = @import("vulkan");
|
|||||||
// usually the GLFW vulkan functions are exported if Vulkan is included,
|
// usually the GLFW vulkan functions are exported if Vulkan is included,
|
||||||
// but since thats not the case here, they are manually imported.
|
// but since thats not the case here, they are manually imported.
|
||||||
|
|
||||||
pub extern "c" fn glfwGetInstanceProcAddress(instance: vk.Instance, procname: [*:0]const u8) vk.PfnVoidFunction;
|
pub extern fn glfwGetInstanceProcAddress(instance: vk.Instance, procname: [*:0]const u8) vk.PfnVoidFunction;
|
||||||
pub extern "c" fn glfwGetPhysicalDevicePresentationSupport(instance: vk.Instance, pdev: vk.PhysicalDevice, queuefamily: u32) c_int;
|
pub extern fn glfwGetPhysicalDevicePresentationSupport(instance: vk.Instance, pdev: vk.PhysicalDevice, queuefamily: u32) c_int;
|
||||||
pub extern "c" fn glfwCreateWindowSurface(instance: vk.Instance, window: *GLFWwindow, allocation_callbacks: ?*const vk.AllocationCallbacks, surface: *vk.SurfaceKHR) vk.Result;
|
pub extern fn glfwCreateWindowSurface(instance: vk.Instance, window: *GLFWwindow, allocation_callbacks: ?*const vk.AllocationCallbacks, surface: *vk.SurfaceKHR) vk.Result;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const preamble =
|
|||||||
\\const std = @import("std");
|
\\const std = @import("std");
|
||||||
\\const builtin = @import("builtin");
|
\\const builtin = @import("builtin");
|
||||||
\\const root = @import("root");
|
\\const root = @import("root");
|
||||||
\\pub const vulkan_call_conv: builtin.CallingConvention = if (builtin.os.tag == .windows)
|
\\pub const vulkan_call_conv: builtin.CallingConvention = if (builtin.os.tag == .windows and builtin.os.arch == .i386)
|
||||||
\\ .Stdcall
|
\\ .Stdcall
|
||||||
\\ else if (builtin.abi == .android and (builtin.cpu.arch.isARM() or builtin.cpu.arch.isThumb()) and builtin.Target.arm.featureSetHas(builtin.cpu.features, .has_v7) and builtin.cpu.arch.ptrBitWidth() == 32)
|
\\ else if (builtin.abi == .android and (builtin.cpu.arch.isARM() or builtin.cpu.arch.isThumb()) and builtin.Target.arm.featureSetHas(builtin.cpu.features, .has_v7) and builtin.cpu.arch.ptrBitWidth() == 32)
|
||||||
\\ // On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
\\ // On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
||||||
|
|||||||
Reference in New Issue
Block a user