Skip to main content

Ngx

Struct Ngx 

Source
pub struct Ngx;

Implementations§

Source§

impl Ngx

Source

pub const fn native_backend_available() -> bool

Returns whether this build includes the native NGX backend.

Source

pub fn staged_runtime_dir() -> Option<&'static Path>

Returns the build-staged runtime directory, or None without the native backend.

Source

pub fn new(_info: InitInfo) -> Result<Self>

§Errors

Always returns an error because the native backend is unavailable.

Source

pub fn instance_extensions(&self) -> &[CString]

Source

pub unsafe fn device_extensions( &self, _instance: &Instance, _physical_device: PhysicalDevice, ) -> Result<Vec<CString>>

Queries NGX device extension requirements.

§Safety

physical_device must be a valid physical device enumerated from instance. The instance, physical device, and Vulkan loader that created them must remain valid throughout the call and must not be destroyed concurrently.

§Errors

Always returns an error because the native backend is unavailable.

Source

pub unsafe fn device_extensions_raw( &self, _instance: Instance, _physical_device: PhysicalDevice, ) -> Result<Vec<CString>>

§Safety

instance must be a valid Vulkan instance, and physical_device must be a valid physical device enumerated from it. The instance, physical device, and Vulkan loader that created them must remain valid throughout the call and must not be destroyed concurrently.

§Errors

Always returns an error because the native backend is unavailable.

Source

pub unsafe fn initialize( &mut self, _device: &Device, _config: DlssRrConfig, ) -> Result<Evaluator>

Initializes NGX while retaining ownership of the graph device.

§Safety

The instance and device must enable the extensions returned by NGX. Complete all NGX GPU work before explicit shutdown through Ngx or any evaluator. Dropping these wrappers does not shut down NGX.

§Errors

Always returns an error because the native backend is unavailable.

Source

pub unsafe fn initialize_raw( &mut self, _info: VulkanInitInfo, _config: DlssRrConfig, ) -> Result<Evaluator>

Initializes NGX without retaining ownership of the Vulkan device.

§Safety

Handles must be valid and belong to the same Vulkan instance and physical device. The instance and device must enable the extensions returned by NGX. The entrypoints must belong to the loader that created these handles. Keep the loader, instance, and device alive until explicit shutdown through Ngx or any evaluator completes, and complete all NGX GPU work before shutdown. Dropping these wrappers does not shut down NGX.

§Errors

Always returns an error because the native backend is unavailable.

Source

pub fn evaluator(&self) -> Option<Evaluator>

Source

pub unsafe fn shutdown(&mut self) -> Result<()>

§Safety

All NGX GPU work must have completed before shutdown.

§Errors

This stub always succeeds; the native backend can report shutdown failures.

Auto Trait Implementations§

§

impl Freeze for Ngx

§

impl RefUnwindSafe for Ngx

§

impl Send for Ngx

§

impl Sync for Ngx

§

impl Unpin for Ngx

§

impl UnsafeUnpin for Ngx

§

impl UnwindSafe for Ngx

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.