pub struct D3D11StreamParams {
pub color_bind_flags: u32,
pub depth_bind_flags: u32,
pub acquire_keyed_mutex_sync: bool,
/* private fields */
}Expand description
QarStreamParamsD3D11: the application’s D3D11.1 device and immediate context, on which
QAROS creates the frame’s shared textures, and how it creates and synchronizes them.
Fields§
§color_bind_flags: u32D3D11_BIND_FLAG bits of the color textures; the C sample asks for
D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE. The header’s default is 0.
depth_bind_flags: u32D3D11_BIND_FLAG bits of the depth textures, for example D3D11_BIND_DEPTH_STENCIL.
QAROS creates them as DXGI_FORMAT_D32_FLOAT, a typed depth format, so
D3D11_BIND_SHADER_RESOURCE makes sender creation fail with E_INVALIDARG. The header’s
default is 0.
acquire_keyed_mutex_sync: boolTrue (the header’s default): the library acquires and releases each texture’s keyed
mutex around the frame cycle. False: the application drives the keyed-mutex chain with
the keys in D3D11Frame::keyed_mutexes, for example when it copies through a chain of
shared textures.
Implementations§
Source§impl D3D11StreamParams
impl D3D11StreamParams
Sourcepub fn new(device: &ID3D11Device1, context: &ID3D11DeviceContext1) -> Self
pub fn new(device: &ID3D11Device1, context: &ID3D11DeviceContext1) -> Self
The header’s defaults (qar_stream_params_d3d11_default: no bind flags, the library
drives the keyed mutexes) for device and its immediate context. Takes a reference
on both, which every sender created with these parameters keeps.
Sourcepub unsafe fn from_raw(
device: *mut ID3D11Device1,
context: *mut ID3D11DeviceContext1,
) -> Option<Self>
pub unsafe fn from_raw( device: *mut ID3D11Device1, context: *mut ID3D11DeviceContext1, ) -> Option<Self>
The header’s defaults for a device and context given as raw pointers, from another
D3D11 binding or a test. None when either is null. No reference is taken.
§Safety
device is an ID3D11Device1 and context its immediate ID3D11DeviceContext1, and
both stay valid for as long as a sender created with these parameters may use them:
until its session is dropped, and for a creation started with
crate::Session::start_d3d11_render_sender as described there.
Sourcepub fn device_raw(&self) -> *mut ID3D11Device1
pub fn device_raw(&self) -> *mut ID3D11Device1
The device pointer handed to QAROS.
Sourcepub fn context_raw(&self) -> *mut ID3D11DeviceContext1
pub fn context_raw(&self) -> *mut ID3D11DeviceContext1
The immediate context pointer handed to QAROS.