diff options
author | Volker Schlecht <47375452+VlkrS@users.noreply.github.com> | 2024-05-23 19:43:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 10:43:23 -0700 |
commit | 20dad295e2e0961932b05d34b29b07ee97eb0815 (patch) | |
tree | 90a1ce561fc795e685674d95002d57452bb26390 /ext/webgpu | |
parent | e450c6b7cb23be95862d48ef047490490391c9d9 (diff) |
feat(ext/webgpu): byow support for {Free,Open}BSD (#23832)
Both ports for the BSDs include patches to the same effect.
Diffstat (limited to 'ext/webgpu')
-rw-r--r-- | ext/webgpu/byow.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/webgpu/byow.rs b/ext/webgpu/byow.rs index 8864e8d2b..2d77cff6e 100644 --- a/ext/webgpu/byow.rs +++ b/ext/webgpu/byow.rs @@ -6,7 +6,12 @@ use deno_core::op2; use deno_core::OpState; use deno_core::ResourceId; use std::ffi::c_void; -#[cfg(any(target_os = "linux", target_os = "macos"))] +#[cfg(any( + target_os = "linux", + target_os = "macos", + target_os = "freebsd", + target_os = "openbsd" +))] use std::ptr::NonNull; use crate::surface::WebGpuSurface; @@ -103,7 +108,7 @@ fn raw_window( Ok((win_handle, display_handle)) } -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))] fn raw_window( system: &str, window: *const c_void, @@ -136,7 +141,7 @@ fn raw_window( ), ); } else { - return Err(type_error("Invalid system on Linux")); + return Err(type_error("Invalid system on Linux/BSD")); } Ok((win_handle, display_handle)) |