pub struct Streamline { /* private fields */ }Implementations§
Source§impl Streamline
impl Streamline
Sourcepub fn staged_runtime_dir() -> Option<&'static Path>
pub fn staged_runtime_dir() -> Option<&'static Path>
Returns the build-staged Streamline runtime directory on the supported target.
Sourcepub fn initialize(
project_id: &str,
engine_version: &str,
runtime_dir: impl AsRef<Path>,
) -> Result<Self>
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.
pub fn runtime_dir(&self) -> &Path
pub fn evaluator(&self) -> Evaluator
Sourcepub unsafe fn is_dlss_rr_supported(
&self,
physical_device: PhysicalDevice,
) -> bool
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.
Sourcepub fn optimal_render_extent(
&self,
output_extent: [u32; 2],
quality: DlssRrQuality,
) -> Result<[u32; 2]>
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.
Sourcepub unsafe fn evaluate_dlss_rr(
&self,
command_buffer: CommandBuffer,
frame: &DlssRrFrameConstants,
resources: &DlssRrResources,
quality: DlssRrQuality,
) -> Result<()>
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.
Sourcepub unsafe fn create_proxy_ash_instance(
&mut self,
create_info: &InstanceCreateInfo<'_>,
) -> Result<ProxyInstanceOwner>
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.
Sourcepub unsafe fn create_proxy_vulkan_instance(
&mut self,
create_info: &InstanceCreateInfo<'_>,
) -> Result<ProxyVulkanInstance>
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.