Skip to main content

Streamline

Struct Streamline 

Source
pub struct Streamline { /* private fields */ }

Implementations§

Source§

impl Streamline

Source

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

Returns the build-staged Streamline runtime directory on the supported target.

Source

pub fn initialize( project_id: &str, engine_version: &str, runtime_dir: impl AsRef<Path>, ) -> Result<Self>

§Errors

Returns an error if either identity string is empty or contains a null byte, the native backend is unavailable, the runtime directory is not absolute or lacks the interposer, another context is active, or native initialization fails.

Source

pub fn runtime_dir(&self) -> &Path

Source

pub fn evaluator(&self) -> Evaluator

Source

pub unsafe fn is_dlss_rr_supported( &self, physical_device: PhysicalDevice, ) -> bool

§Safety

Unless null (which returns false), physical_device must be a valid handle enumerated from this context’s interposer instance. The physical device, its parent instance, and the Vulkan/interposer loaders and their function pointers must remain valid throughout the call; do not destroy the instance or unload either loader concurrently.

Source

pub fn optimal_render_extent( &self, output_extent: [u32; 2], quality: DlssRrQuality, ) -> Result<[u32; 2]>

§Errors

Returns the errors described by Evaluator::optimal_render_extent.

Source

pub unsafe fn evaluate_dlss_rr( &self, command_buffer: CommandBuffer, frame: &DlssRrFrameConstants, resources: &DlssRrResources, quality: DlssRrQuality, ) -> Result<()>

§Safety

This evaluator and its owning Streamline context must remain valid until execution completes. The command buffer must be recording on the context’s device; every image and view must belong to that device, and each declared layout must match its actual state. All handles must remain valid until GPU execution completes. If dimensions or quality change, prior evaluations must have completed first.

§Errors

Returns the errors described by Evaluator::evaluate_dlss_rr.

Source

pub unsafe fn create_proxy_ash_instance( &mut self, create_info: &InstanceCreateInfo<'_>, ) -> Result<ProxyInstanceOwner>

Creates an ash instance through the Streamline interposer without requiring vk-graph.

Only one proxy may be successfully created per context, across both creation APIs. Devices must be created through this instance so the interposer observes their creation; this does not register externally created devices.

§Safety

create_info must satisfy Vulkan’s instance creation requirements. Every reachable pointer (including application info, name arrays and strings, and the entire p_next chain) must be correctly aligned, initialized, and valid for its declared type and length throughout the call. Any callbacks and user data retained by Vulkan must remain valid for all possible invocations, including instance destruction.

The returned owner must outlive all imported wrappers, instance/loader clones, function pointers, and child objects. Do not destroy its instance yourself. After GPU completion, shut the evaluator down before destroying child devices, then destroy all children and drop imported wrappers before dropping the owner and unloading its interposer.

§Errors

Returns an error if a proxy already exists, the backend is unavailable, the context is shut down, or loading the interposer or creating the instance fails.

Source

pub unsafe fn create_proxy_vulkan_instance( &mut self, create_info: &InstanceCreateInfo<'_>, ) -> Result<ProxyVulkanInstance>

Creates a vk-graph instance through the Streamline interposer.

Only one proxy may be successfully created per context, across both creation APIs. Devices must be created through this instance so the interposer observes their creation; this does not register externally created devices.

§Safety

create_info must satisfy Vulkan’s instance creation requirements. Every reachable pointer (including application info, name arrays and strings, and the entire p_next chain) must be correctly aligned, initialized, and valid for its declared type and length throughout the call. Any callbacks and user data retained by Vulkan must remain valid for all possible invocations, including instance destruction.

The returned owner must outlive all imported wrappers, instance/loader clones, function pointers, and child objects. Do not destroy its instance yourself. After GPU completion, shut the evaluator down before destroying child devices, then destroy all children and drop imported wrappers before dropping the owner and unloading its interposer.

§Errors

Returns an error if a proxy already exists, the backend is unavailable, the context is shut down, or loading, creating, or importing the instance fails.

Source

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

§Safety

All Streamline GPU work must have completed before shutdown.

§Errors

Returns the errors described by Evaluator::shutdown.

Auto Trait Implementations§

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.