diff --git a/librashader-runtime-gl/src/filter_chain/filter_impl.rs b/librashader-runtime-gl/src/filter_chain/filter_impl.rs index 6bc946b..1356af9 100644 --- a/librashader-runtime-gl/src/filter_chain/filter_impl.rs +++ b/librashader-runtime-gl/src/filter_chain/filter_impl.rs @@ -490,15 +490,20 @@ impl FilterChainImpl { let mut source = original; // rescale render buffers to ensure all bindings are valid. - for (index, pass) in passes.iter_mut().enumerate() { - // todo: properly check **next** pass for mipmap. + let mut iterator = passes.iter_mut().enumerate().peekable(); + while let Some((index, pass)) = iterator.next() { + let should_mipmap = iterator + .peek() + .map(|(_, p)| p.config.mipmap_input) + .unwrap_or(false); + self.output_framebuffers[index].scale::( pass.config.scaling.clone(), pass.get_format(), viewport, &original, &source, - pass.config.mipmap_input, + should_mipmap, )?; self.feedback_framebuffers[index].scale::( @@ -507,7 +512,7 @@ impl FilterChainImpl { viewport, &original, &source, - pass.config.mipmap_input, + should_mipmap, )?; } diff --git a/librashader-runtime-vk/src/filter_chain.rs b/librashader-runtime-vk/src/filter_chain.rs index 8a8293e..0ffbae0 100644 --- a/librashader-runtime-vk/src/filter_chain.rs +++ b/librashader-runtime-vk/src/filter_chain.rs @@ -666,15 +666,20 @@ impl FilterChainVulkan { ); // rescale render buffers to ensure all bindings are valid. - for (index, pass) in passes.iter_mut().enumerate() { + let mut iterator = passes.iter_mut().enumerate().peekable(); + while let Some((index, pass)) = iterator.next() { + let should_mipmap = iterator + .peek() + .map(|(_, p)| p.config.mipmap_input) + .unwrap_or(false); + self.output_framebuffers[index].scale( pass.config.scaling.clone(), pass.get_format(), &viewport.output.size, &original, source, - // todo: need to check **next** - pass.config.mipmap_input, + should_mipmap, None, )?; @@ -684,8 +689,7 @@ impl FilterChainVulkan { &viewport.output.size, &original, source, - // todo: need to check **next** - pass.config.mipmap_input, + should_mipmap, None, )?; diff --git a/librashader-runtime-vk/src/filter_pass.rs b/librashader-runtime-vk/src/filter_pass.rs index 643e0df..24c1773 100644 --- a/librashader-runtime-vk/src/filter_pass.rs +++ b/librashader-runtime-vk/src/filter_pass.rs @@ -172,7 +172,6 @@ impl FilterPass { self.graphics_pipeline.pipeline, ); - // todo: allow frames in flight. parent.device.cmd_bind_descriptor_sets( cmd, vk::PipelineBindPoint::GRAPHICS, diff --git a/librashader-runtime-vk/src/framebuffer.rs b/librashader-runtime-vk/src/framebuffer.rs index 324ffa9..2f049e9 100644 --- a/librashader-runtime-vk/src/framebuffer.rs +++ b/librashader-runtime-vk/src/framebuffer.rs @@ -68,7 +68,6 @@ impl OutputImage { } pub fn end_pass(&self, cmd: vk::CommandBuffer) { - // todo: generate mips unsafe { util::vulkan_image_layout_transition_levels( &self.device, diff --git a/librashader-runtime-vk/src/luts.rs b/librashader-runtime-vk/src/luts.rs index 837b6b6..d219d5d 100644 --- a/librashader-runtime-vk/src/luts.rs +++ b/librashader-runtime-vk/src/luts.rs @@ -22,7 +22,6 @@ impl LutTexture { image: Image, config: &TextureConfig, ) -> error::Result { - // todo: might need to use bgra8 let image_info = vk::ImageCreateInfo::builder() .image_type(vk::ImageType::TYPE_2D) .format(vk::Format::B8G8R8A8_UNORM)