vk_blit_screen: Minor refactor of filter pipeline selection
This commit is contained in:
parent
75c4aec8ab
commit
b387a26f30
@ -391,28 +391,23 @@ VkSemaphore VKBlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer,
|
|||||||
.offset = {0, 0},
|
.offset = {0, 0},
|
||||||
.extent = size,
|
.extent = size,
|
||||||
};
|
};
|
||||||
const auto filter = Settings::values.scaling_filter.GetValue();
|
|
||||||
cmdbuf.BeginRenderPass(renderpass_bi, VK_SUBPASS_CONTENTS_INLINE);
|
cmdbuf.BeginRenderPass(renderpass_bi, VK_SUBPASS_CONTENTS_INLINE);
|
||||||
switch (filter) {
|
auto graphics_pipeline = [this]() {
|
||||||
case Settings::ScalingFilter::NearestNeighbor:
|
switch (Settings::values.scaling_filter.GetValue()) {
|
||||||
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, *bilinear_pipeline);
|
case Settings::ScalingFilter::NearestNeighbor:
|
||||||
break;
|
case Settings::ScalingFilter::Bilinear:
|
||||||
case Settings::ScalingFilter::Bilinear:
|
return *bilinear_pipeline;
|
||||||
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, *bilinear_pipeline);
|
case Settings::ScalingFilter::Bicubic:
|
||||||
break;
|
return *bicubic_pipeline;
|
||||||
case Settings::ScalingFilter::Bicubic:
|
case Settings::ScalingFilter::Gaussian:
|
||||||
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, *bicubic_pipeline);
|
return *gaussian_pipeline;
|
||||||
break;
|
case Settings::ScalingFilter::ScaleForce:
|
||||||
case Settings::ScalingFilter::Gaussian:
|
return *scaleforce_pipeline;
|
||||||
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, *gaussian_pipeline);
|
default:
|
||||||
break;
|
return *bilinear_pipeline;
|
||||||
case Settings::ScalingFilter::ScaleForce:
|
}
|
||||||
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, *scaleforce_pipeline);
|
}();
|
||||||
break;
|
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, graphics_pipeline);
|
||||||
default:
|
|
||||||
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, *bilinear_pipeline);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
cmdbuf.SetViewport(0, viewport);
|
cmdbuf.SetViewport(0, viewport);
|
||||||
cmdbuf.SetScissor(0, scissor);
|
cmdbuf.SetScissor(0, scissor);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user