Skip to content

Commit

Permalink
UB
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Aug 27, 2024
1 parent ca7b68d commit 759f82b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions wgpu-hal/src/dx12/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,12 +757,21 @@ impl crate::CommandEncoder for super::CommandEncoder {
if let Some(ds_view) = ds_view {
if flags != Direct3D12::D3D12_CLEAR_FLAGS::default() {
unsafe {
list.ClearDepthStencilView(
ds_view,
// list.ClearDepthStencilView(
// ds_view,
// flags,
// ds.clear_value.0,
// ds.clear_value.1 as u8,
// &[], // TODO: Pass None when https://github.com/microsoft/win32metadata/pull/1971 is in windows-rs
// )
(windows_core::Interface::vtable(list).ClearDepthStencilView)(
windows_core::Interface::as_raw(list),
mem::transmute(ds_view),
flags,
ds.clear_value.0,
ds.clear_value.1 as u8,
&[], // TODO: Pass None when https://github.com/microsoft/win32metadata/pull/1971 is in windows-rs
0,
std::ptr::null(),
)
}
}
Expand Down

0 comments on commit 759f82b

Please sign in to comment.