wgpu-hal: add ndk-sys dependency to fix linking error. (#5326)

This commit is contained in:
Eshed Schacham 2024-03-01 23:16:09 +02:00 committed by Connor Fitzgerald
parent bb09828a9e
commit 75fd68939c
No known key found for this signature in database
GPG Key ID: CF0A1F83B4E1A995
4 changed files with 11 additions and 11 deletions

View File

@ -81,6 +81,9 @@ By @cwfitzgerald in [#5325](https://github.com/gfx-rs/wgpu/pull/5325).
- Fix an issue where command encoders weren't properly freed if an error occurred during command encoding. By @ErichDonGubler in [#5251](https://github.com/gfx-rs/wgpu/pull/5251).
#### Android
- Fix linking error when targeting android without `winit`. By @ashdnazg in [#5326](https://github.com/gfx-rs/wgpu/pull/5326).
## v0.19.2 (2024-02-29)
### Added/New Features

1
Cargo.lock generated
View File

@ -4072,6 +4072,7 @@ dependencies = [
"log",
"metal",
"naga",
"ndk-sys 0.5.0+25.2.9519653",
"objc",
"once_cell",
"parking_lot",

View File

@ -154,6 +154,7 @@ libc = "0.2"
[target.'cfg(target_os = "android")'.dependencies]
android_system_properties = "0.1.1"
ndk-sys = "0.5.0"
[dependencies.naga]
path = "../naga"

View File

@ -50,16 +50,6 @@ type WlEglWindowResizeFun = unsafe extern "system" fn(
type WlEglWindowDestroyFun = unsafe extern "system" fn(window: *const raw::c_void);
#[cfg(target_os = "android")]
extern "C" {
pub fn ANativeWindow_setBuffersGeometry(
window: *mut raw::c_void,
width: i32,
height: i32,
format: i32,
) -> i32;
}
type EglLabel = *const raw::c_void;
#[allow(clippy::upper_case_acronyms)]
@ -863,7 +853,12 @@ impl crate::Instance<super::Api> for Instance {
.unwrap();
let ret = unsafe {
ANativeWindow_setBuffersGeometry(handle.a_native_window.as_ptr(), 0, 0, format)
ndk_sys::ANativeWindow_setBuffersGeometry(
handle.a_native_window.as_ptr() as *mut ndk_sys::ANativeWindow,
0,
0,
format,
)
};
if ret != 0 {