INNER CODE UNIT · Rust

platform_memory_type

gfx-rs/gfx · src/auxil/external-memory/src/lib.rs:387

    pub fn platform_memory_type(&self) -> PlatformMemoryType {
        match self {
            #[cfg(unix)]
            Self::OpaqueFd(_) => PlatformMemoryType::Fd,
            #[cfg(windows)]
            Self::OpaqueWin32(_) => PlatformMemoryType::Handle,
            #[cfg(windows)]
            Self::OpaqueWin32Kmt(_) => PlatformMemoryType::Handle,
            #[cfg(windows)]
            Self::D3D11Texture(_) => PlatformMemoryType::Handle,
            #[cfg(windows)]
            Self::D3D11TextureKmt(_) => PlatformMemoryType::Handle,
            #[cfg(windows)]
            Self::D3D12Heap(_) => PlatformMemoryType::Handle,
            #[cfg(windows)]
            Self::D3D12Resource(_) => PlatformMemoryType::Handle,
            #[cfg(any(target_os = "linux", target_os = "android"))]
            Self::DmaBuf(_) => PlatformMemoryType::Fd,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…