rt(d3d9): accept input image by reference
This commit is contained in:
parent
b0df631651
commit
3888b56c83
|
@ -7,6 +7,7 @@ use librashader::runtime::d3d9::{FilterChain, FilterChainOptions, FrameOptions};
|
|||
use std::ffi::c_char;
|
||||
use std::ffi::CStr;
|
||||
use std::mem::{ManuallyDrop, MaybeUninit};
|
||||
use std::ops::Deref;
|
||||
use std::ptr::NonNull;
|
||||
use std::slice;
|
||||
use windows::Win32::Graphics::Direct3D9::{IDirect3DDevice9, IDirect3DSurface9, IDirect3DTexture9};
|
||||
|
@ -179,7 +180,7 @@ extern_fn! {
|
|||
|
||||
|
||||
unsafe {
|
||||
chain.frame(ManuallyDrop::into_inner(image.clone()), &viewport, frame_count, options.as_ref())?;
|
||||
chain.frame(image.deref(), &viewport, frame_count, options.as_ref())?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ use array_concat::concat_arrays;
|
|||
use bytemuck::offset_of;
|
||||
use librashader_runtime::quad::{QuadType, VertexInput};
|
||||
|
||||
use windows::Win32::Foundation::{FALSE, TRUE};
|
||||
use windows::Win32::Foundation::FALSE;
|
||||
|
||||
use windows::Win32::Graphics::Direct3D9::{
|
||||
IDirect3DDevice9, IDirect3DVertexBuffer9, IDirect3DVertexDeclaration9, D3DCMP_ALWAYS,
|
||||
|
|
|
@ -23,7 +23,7 @@ use librashader_reflect::reflect::semantics::ShaderSemantics;
|
|||
use librashader_reflect::reflect::ReflectShader;
|
||||
use librashader_runtime::binding::{BindingUtil, TextureInput};
|
||||
use librashader_runtime::framebuffer::FramebufferInit;
|
||||
use librashader_runtime::image::{Image, ImageError, UVDirection, ARGB8, BGRA8};
|
||||
use librashader_runtime::image::{Image, ImageError, UVDirection, BGRA8};
|
||||
use librashader_runtime::quad::QuadType;
|
||||
use librashader_runtime::render_target::RenderTarget;
|
||||
use librashader_runtime::scaling::ScaleFramebuffer;
|
||||
|
@ -288,7 +288,7 @@ impl FilterChainD3D9 {
|
|||
/// * `input` must be in `D3DPOOL_DEFAULT`.
|
||||
pub unsafe fn frame(
|
||||
&mut self,
|
||||
input: IDirect3DTexture9,
|
||||
input: &IDirect3DTexture9,
|
||||
viewport: &Viewport<IDirect3DSurface9>,
|
||||
frame_count: usize,
|
||||
options: Option<&FrameOptionsD3D9>,
|
||||
|
|
|
@ -3,7 +3,7 @@ use crate::error::assume_d3d_init;
|
|||
use crate::texture::D3D9InputTexture;
|
||||
|
||||
use librashader_presets::TextureConfig;
|
||||
use librashader_runtime::image::{Image, ARGB8, BGRA8};
|
||||
use librashader_runtime::image::{Image, BGRA8};
|
||||
|
||||
use windows::Win32::Graphics::Direct3D9::{
|
||||
IDirect3DDevice9, D3DFMT_A8R8G8B8, D3DLOCKED_RECT, D3DPOOL_MANAGED,
|
||||
|
|
Loading…
Reference in a new issue