rt: allow specifying frame_direction

This commit is contained in:
chyyran 2022-12-04 22:36:14 -05:00
parent afe7165707
commit 8935ab28e9
4 changed files with 8 additions and 5 deletions

View file

@ -485,6 +485,7 @@ impl FilterChainD3D11 {
return Ok(());
}
let frame_direction = options.map(|f| f.frame_direction).unwrap_or(1);
let filter = passes[0].config.filter;
let wrap_mode = passes[0].config.wrap_mode;
@ -551,7 +552,7 @@ impl FilterChainD3D11 {
} else {
frame_count
} as u32,
1,
frame_direction,
viewport,
&original,
&source,
@ -581,7 +582,7 @@ impl FilterChainD3D11 {
} else {
frame_count
} as u32,
1,
frame_direction,
viewport,
&original,
&source,

View file

@ -2,6 +2,7 @@
#[derive(Debug, Clone)]
pub struct FrameOptionsD3D11 {
pub clear_history: bool,
pub frame_direction: i32,
}
#[repr(C)]

View file

@ -437,6 +437,7 @@ impl<T: GLInterface> FilterChainImpl<T> {
if passes.is_empty() {
return Ok(());
}
let frame_direction = options.map(|f| f.frame_direction).unwrap_or(1);
// do not need to rebind FBO 0 here since first `draw` will
// bind automatically.
@ -509,8 +510,7 @@ impl<T: GLInterface> FilterChainImpl<T> {
} else {
count
} as u32,
// todo: put this in options
1,
frame_direction,
viewport,
&original,
&source,
@ -536,7 +536,7 @@ impl<T: GLInterface> FilterChainImpl<T> {
} else {
count
} as u32,
1,
frame_direction,
viewport,
&original,
&source,

View file

@ -2,6 +2,7 @@
#[derive(Debug, Clone)]
pub struct FrameOptionsGL {
pub clear_history: bool,
pub frame_direction: i32,
}
#[repr(C)]