fix sgsr with new variant shit
This commit is contained in:
parent
a6dc55425c
commit
0e0d302e56
|
|
@ -64,9 +64,9 @@ Layer::Layer(const Device& device_, MemoryAllocator& memory_allocator_, Schedule
|
||||||
CreateDescriptorPool();
|
CreateDescriptorPool();
|
||||||
CreateDescriptorSets(layout);
|
CreateDescriptorSets(layout);
|
||||||
if (filters.get_scaling_filter() == Settings::ScalingFilter::Fsr) {
|
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) {
|
} 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,
|
.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);
|
source_image_view = fsr->Draw(scheduler, image_index, source_image, source_image_view, render_extent, crop_rect);
|
||||||
crop_rect = {0, 0, 1, 1};
|
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);
|
source_image_view = sgsr->Draw(scheduler, image_index, source_image, source_image_view, render_extent, crop_rect);
|
||||||
crop_rect = {0, 0, 1, 1};
|
crop_rect = {0, 0, 1, 1};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
#include "video_core/host1x/gpu_device_memory_manager.h"
|
#include "video_core/host1x/gpu_device_memory_manager.h"
|
||||||
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
||||||
#include "video_core/renderer_vulkan/present/fsr.h"
|
#include "video_core/renderer_vulkan/present/fsr.h"
|
||||||
|
#include "video_core/renderer_vulkan/present/sgsr.h"
|
||||||
#include "video_core/renderer_vulkan/present/fxaa.h"
|
#include "video_core/renderer_vulkan/present/fxaa.h"
|
||||||
#include "video_core/renderer_vulkan/present/smaa.h"
|
#include "video_core/renderer_vulkan/present/smaa.h"
|
||||||
|
|
||||||
|
|
@ -95,8 +96,7 @@ private:
|
||||||
|
|
||||||
Settings::AntiAliasing anti_alias_setting{};
|
Settings::AntiAliasing anti_alias_setting{};
|
||||||
std::variant<std::monostate, FXAA, SMAA> anti_alias{};
|
std::variant<std::monostate, FXAA, SMAA> anti_alias{};
|
||||||
std::optional<FSR> fsr{};
|
std::variant<std::monostate, SGSR, FSR> sr_filter{};
|
||||||
std::unique_ptr<SGSR> sgsr{};
|
|
||||||
std::vector<u64> resource_ticks{};
|
std::vector<u64> resource_ticks{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue