From f18c22a95a18a63b81be8ce88dad235dd30901e1 Mon Sep 17 00:00:00 2001 From: chyyran Date: Thu, 7 Mar 2024 20:56:30 -0500 Subject: [PATCH] capi(d3d11): take ManuallyDrop directly in libra_d3d11_filter_chain_t --- .../src/runtime/d3d11/filter_chain.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/librashader-capi/src/runtime/d3d11/filter_chain.rs b/librashader-capi/src/runtime/d3d11/filter_chain.rs index e83119c..b8879ff 100644 --- a/librashader-capi/src/runtime/d3d11/filter_chain.rs +++ b/librashader-capi/src/runtime/d3d11/filter_chain.rs @@ -17,17 +17,6 @@ use windows::Win32::Graphics::Direct3D11::{ use crate::LIBRASHADER_API_VERSION; use librashader::runtime::{FilterChainParameters, Viewport}; -/// Direct3D 11 parameters for the source image. -#[repr(C)] -pub struct libra_source_image_d3d11_t { - /// A shader resource view into the source image - pub handle: ManuallyDrop, - /// This is currently ignored. - pub width: u32, - /// This is currently ignored. - pub height: u32, -} - /// Options for Direct3D 11 filter chain creation. #[repr(C)] #[derive(Default, Debug, Clone)] @@ -214,7 +203,7 @@ extern_fn! { // so ManuallyDrop> doesn't generate correct bindings. device_context: Option>, frame_count: usize, - image: libra_source_image_d3d11_t, + image: ManuallyDrop, viewport: libra_viewport_t, out: ManuallyDrop, mvp: *const f32, @@ -244,7 +233,7 @@ extern_fn! { let options = options.map(FromUninit::from_uninit); unsafe { - chain.frame(device_context.as_deref(), image.handle.deref(), &viewport, frame_count, options.as_ref())?; + chain.frame(device_context.as_deref(), image.deref(), &viewport, frame_count, options.as_ref())?; } } }