rt(d3d11): remove unneeded transmutes
This commit is contained in:
parent
7cfbca7755
commit
16108838b1
|
@ -240,15 +240,8 @@ impl FilterPass {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
// SAFETY: Niche optimization for Option<NonNull<T>>
|
ctx.PSSetShaderResources(0, Some(&textures));
|
||||||
// Assumes that IUnknown is defined as IUnknown(std::ptr::NonNull<std::ffi::c_void>)
|
ctx.PSSetSamplers(0, Some(&samplers));
|
||||||
const _: () = assert!(
|
|
||||||
std::mem::size_of::<Option<windows::core::IUnknown>>()
|
|
||||||
== std::mem::size_of::<windows::core::IUnknown>()
|
|
||||||
);
|
|
||||||
|
|
||||||
ctx.PSSetShaderResources(0, Some(std::mem::transmute(textures.as_ref())));
|
|
||||||
ctx.PSSetSamplers(0, Some(std::mem::transmute(samplers.as_ref())));
|
|
||||||
|
|
||||||
ctx.OMSetRenderTargets(Some(&[Some(output.output.clone())]), None);
|
ctx.OMSetRenderTargets(Some(&[Some(output.output.clone())]), None);
|
||||||
ctx.RSSetViewports(Some(&[D3D11_VIEWPORT {
|
ctx.RSSetViewports(Some(&[D3D11_VIEWPORT {
|
||||||
|
|
Loading…
Reference in a new issue