Add android platform to external memory cfgs (#1726)

This commit is contained in:
Jason Macnak 2021-10-20 07:11:32 -07:00 committed by GitHub
parent 32a007f193
commit 3634518e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,7 @@ use crate::VulkanObject;
use std::error; use std::error;
use std::fmt; use std::fmt;
#[cfg(any( #[cfg(any(
target_os = "android",
target_os = "linux", target_os = "linux",
target_os = "dragonflybsd", target_os = "dragonflybsd",
target_os = "freebsd", target_os = "freebsd",
@ -36,6 +37,7 @@ use std::ops::DerefMut;
use std::ops::Range; use std::ops::Range;
use std::os::raw::c_void; use std::os::raw::c_void;
#[cfg(any( #[cfg(any(
target_os = "android",
target_os = "linux", target_os = "linux",
target_os = "dragonflybsd", target_os = "dragonflybsd",
target_os = "freebsd", target_os = "freebsd",
@ -203,6 +205,7 @@ impl<'a> DeviceMemoryBuilder<'a> {
/// ///
/// - Panics if the import info has already been set. /// - Panics if the import info has already been set.
#[cfg(any( #[cfg(any(
target_os = "android",
target_os = "linux", target_os = "linux",
target_os = "dragonflybsd", target_os = "dragonflybsd",
target_os = "freebsd", target_os = "freebsd",
@ -465,6 +468,7 @@ impl DeviceMemory {
/// Same as `alloc`, but allows exportable file descriptor on Linux/BSD. /// Same as `alloc`, but allows exportable file descriptor on Linux/BSD.
#[inline] #[inline]
#[cfg(any( #[cfg(any(
target_os = "android",
target_os = "linux", target_os = "linux",
target_os = "dragonflybsd", target_os = "dragonflybsd",
target_os = "freebsd", target_os = "freebsd",
@ -491,6 +495,7 @@ impl DeviceMemory {
/// Same as `dedicated_alloc`, but allows exportable file descriptor on Linux/BSD. /// Same as `dedicated_alloc`, but allows exportable file descriptor on Linux/BSD.
#[inline] #[inline]
#[cfg(any( #[cfg(any(
target_os = "android",
target_os = "linux", target_os = "linux",
target_os = "dragonflybsd", target_os = "dragonflybsd",
target_os = "freebsd", target_os = "freebsd",
@ -519,6 +524,7 @@ impl DeviceMemory {
/// Same as `alloc_and_map`, but allows exportable file descriptor on Linux/BSD. /// Same as `alloc_and_map`, but allows exportable file descriptor on Linux/BSD.
#[inline] #[inline]
#[cfg(any( #[cfg(any(
target_os = "android",
target_os = "linux", target_os = "linux",
target_os = "dragonflybsd", target_os = "dragonflybsd",
target_os = "freebsd", target_os = "freebsd",
@ -541,6 +547,7 @@ impl DeviceMemory {
/// Same as `dedicated_alloc_and_map`, but allows exportable file descriptor on Linux/BSD. /// Same as `dedicated_alloc_and_map`, but allows exportable file descriptor on Linux/BSD.
#[inline] #[inline]
#[cfg(any( #[cfg(any(
target_os = "android",
target_os = "linux", target_os = "linux",
target_os = "dragonflybsd", target_os = "dragonflybsd",
target_os = "freebsd", target_os = "freebsd",
@ -615,6 +622,7 @@ impl DeviceMemory {
/// - Panics if the user requests an invalid handle type for this device memory object. /// - Panics if the user requests an invalid handle type for this device memory object.
#[inline] #[inline]
#[cfg(any( #[cfg(any(
target_os = "android",
target_os = "linux", target_os = "linux",
target_os = "dragonflybsd", target_os = "dragonflybsd",
target_os = "freebsd", target_os = "freebsd",