From 14abb0362bcd5d01a70c91df0f67845ef53da82a Mon Sep 17 00:00:00 2001 From: chyyran Date: Fri, 2 Aug 2024 00:26:52 -0400 Subject: [PATCH] capi(d3d12): set output in libra_output_image_d3d12_t, not viewport --- librashader-capi/src/runtime/d3d12/filter_chain.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/librashader-capi/src/runtime/d3d12/filter_chain.rs b/librashader-capi/src/runtime/d3d12/filter_chain.rs index f3d9d33..e1a81cb 100644 --- a/librashader-capi/src/runtime/d3d12/filter_chain.rs +++ b/librashader-capi/src/runtime/d3d12/filter_chain.rs @@ -35,6 +35,10 @@ pub struct libra_output_image_d3d12_t { pub descriptor: D3D12_CPU_DESCRIPTOR_HANDLE, /// The format of the image. pub format: DXGI_FORMAT, + /// The width of the output image. + pub width: u32, + /// The height of the output image. + pub height: u32, } /// Options for each Direct3D 12 shader frame. @@ -252,7 +256,7 @@ extern_fn! { let viewport = Viewport { x: viewport.x, y: viewport.y, - output: unsafe { D3D12OutputView::new_from_raw(out.descriptor, Size::new(viewport.width, viewport.height), out.format) }, + output: unsafe { D3D12OutputView::new_from_raw(out.descriptor, Size::new(out.width, out.height), out.format) }, mvp, };