vk/gl: properly handling mipmap settings
This commit is contained in:
parent
05ec73a11c
commit
fdb5bb0e51
|
@ -490,15 +490,20 @@ impl<T: GLInterface> FilterChainImpl<T> {
|
|||
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::<T::FramebufferInterface>(
|
||||
pass.config.scaling.clone(),
|
||||
pass.get_format(),
|
||||
viewport,
|
||||
&original,
|
||||
&source,
|
||||
pass.config.mipmap_input,
|
||||
should_mipmap,
|
||||
)?;
|
||||
|
||||
self.feedback_framebuffers[index].scale::<T::FramebufferInterface>(
|
||||
|
@ -507,7 +512,7 @@ impl<T: GLInterface> FilterChainImpl<T> {
|
|||
viewport,
|
||||
&original,
|
||||
&source,
|
||||
pass.config.mipmap_input,
|
||||
should_mipmap,
|
||||
)?;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
)?;
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -22,7 +22,6 @@ impl LutTexture {
|
|||
image: Image<BGRA8>,
|
||||
config: &TextureConfig,
|
||||
) -> error::Result<LutTexture> {
|
||||
// todo: might need to use bgra8
|
||||
let image_info = vk::ImageCreateInfo::builder()
|
||||
.image_type(vk::ImageType::TYPE_2D)
|
||||
.format(vk::Format::B8G8R8A8_UNORM)
|
||||
|
|
Loading…
Reference in a new issue