|
|
|
@ -64,9 +64,9 @@ Layer::Layer(const Device& device_, MemoryAllocator& memory_allocator_, Schedule |
|
|
|
CreateDescriptorPool(); |
|
|
|
CreateDescriptorSets(layout); |
|
|
|
if (filters.get_scaling_filter() == Settings::ScalingFilter::Fsr) { |
|
|
|
fsr.emplace(device, memory_allocator, image_count, output_size); |
|
|
|
sr_filter.emplace<FSR>(device, memory_allocator, image_count, output_size); |
|
|
|
} else if (filters.get_scaling_filter() == Settings::ScalingFilter::Sgsr) { |
|
|
|
sgsr.emplace(device, memory_allocator, image_count, output_size); |
|
|
|
sr_filter.emplace<SGSR>(device, memory_allocator, image_count, output_size); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -117,10 +117,10 @@ void Layer::ConfigureDraw(PresentPushConstants* out_push_constants, |
|
|
|
.height = scaled_height, |
|
|
|
}; |
|
|
|
|
|
|
|
if (fsr) { |
|
|
|
if (auto* fsr = std::get_if(&sr_filter)) { |
|
|
|
source_image_view = fsr->Draw(scheduler, image_index, source_image, source_image_view, render_extent, crop_rect); |
|
|
|
crop_rect = {0, 0, 1, 1}; |
|
|
|
} else if (sgsr) { |
|
|
|
} else if (auto* sgsr = std::get_if(&sr_filter)) { |
|
|
|
source_image_view = sgsr->Draw(scheduler, image_index, source_image, source_image_view, render_extent, crop_rect); |
|
|
|
crop_rect = {0, 0, 1, 1}; |
|
|
|
} |
|
|
|
|