mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
wgpu-hal: add ndk-sys dependency to fix linking error. (#5326)
This commit is contained in:
parent
bb09828a9e
commit
75fd68939c
@ -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
1
Cargo.lock
generated
@ -4072,6 +4072,7 @@ dependencies = [
|
||||
"log",
|
||||
"metal",
|
||||
"naga",
|
||||
"ndk-sys 0.5.0+25.2.9519653",
|
||||
"objc",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user