Initial implementation of D3D12

This commit is contained in:
Charlton Rodda
2023-12-01 09:14:47 +00:00
parent f63081906d
commit 2f89242f32
6 changed files with 545 additions and 29 deletions

View File

@@ -212,19 +212,21 @@ fn xr_skip_frame(
environment_blend_mode: Res<XrEnvironmentBlendMode>,
) {
let swapchain: &Swapchain = &xr_swapchain;
match swapchain {
Swapchain::Vulkan(swap) => {
swap.stream
.lock()
.unwrap()
.end(
xr_frame_state.predicted_display_time,
**environment_blend_mode,
&[],
)
.unwrap();
}
}
let stream = match swapchain {
#[cfg(feature = "vulkan")]
Swapchain::Vulkan(swap) => &swap.stream,
#[cfg(feature = "d3d12")]
Swapchain::D3D12(swap) => &swap.stream,
};
stream
.lock()
.unwrap()
.end(
xr_frame_state.predicted_display_time,
**environment_blend_mode,
&[],
)
.unwrap();
}
pub struct DefaultXrPlugins {