aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan/blit_image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_vulkan/blit_image.h')
-rw-r--r--src/video_core/renderer_vulkan/blit_image.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/video_core/renderer_vulkan/blit_image.h b/src/video_core/renderer_vulkan/blit_image.h
index 4741f9fe45..a1c802848b 100644
--- a/src/video_core/renderer_vulkan/blit_image.h
+++ b/src/video_core/renderer_vulkan/blit_image.h
@@ -83,11 +83,20 @@ public:
const Region2D& src_region, const Extent3D& src_size);
/// Temporal upscale (temporal_upscale.frag) into dst_framebuffer: the jittered input colour,
- /// accumulated with the history image reprojected along the motion vectors.
+ /// accumulated with the history image reprojected along the motion vectors. The result is also
+ /// stored to next_history (a storage image of the output's size).
void TemporalUpscale(const Framebuffer* dst_framebuffer, const ImageView& input_color,
const ImageView& motion_vectors, VkImageView history,
- const Region2D& dst_region, std::array<f32, 2> jitter,
- std::array<f32, 2> motion_scale, f32 current_weight);
+ VkImageView next_history, const Region2D& dst_region,
+ std::array<f32, 2> jitter,
+ std::array<f32, 2> motion_scale, f32 current_weight,
+ f32 kernel_scale, f32 clip_width, f32 clip_motion,
+ f32 kernel_motion);
+
+ /// RCAS (temporal_sharpen.frag) of source into dst_framebuffer; sharpness in stops as
+ /// FsrRcasCon takes it (0 is the strongest).
+ void TemporalSharpen(const Framebuffer* dst_framebuffer, VkImageView source,
+ const Region2D& dst_region, f32 sharpness);
void BlitColorMSAA(const Framebuffer* dst_framebuffer, const ImageView& src_image_view,
const Region2D& dst_region, const Region2D& src_region);
@@ -179,6 +188,8 @@ private:
[[nodiscard]] VkPipeline FindOrEmplaceTemporalUpscalePipeline(VkRenderPass renderpass);
+ [[nodiscard]] VkPipeline FindOrEmplaceTemporalSharpenPipeline(VkRenderPass renderpass);
+
[[nodiscard]] VkPipeline FindOrEmplaceDepthStencilPipeline(const BlitImagePipelineKey& key);
[[nodiscard]] VkPipeline FindOrEmplaceClearColorPipeline(const BlitImagePipelineKey& key);
@@ -216,19 +227,21 @@ private:
vk::DescriptorSetLayout one_texture_set_layout;
vk::DescriptorSetLayout two_textures_set_layout;
- vk::DescriptorSetLayout three_textures_set_layout;
+ vk::DescriptorSetLayout temporal_upscale_set_layout;
DescriptorAllocator one_texture_descriptor_allocator;
DescriptorAllocator two_textures_descriptor_allocator;
- DescriptorAllocator three_textures_descriptor_allocator;
+ DescriptorAllocator temporal_upscale_descriptor_allocator;
vk::PipelineLayout one_texture_pipeline_layout;
vk::PipelineLayout two_textures_pipeline_layout;
vk::PipelineLayout temporal_upscale_pipeline_layout;
+ vk::PipelineLayout temporal_sharpen_pipeline_layout;
vk::PipelineLayout clear_color_pipeline_layout;
vk::PipelineLayout msaa_copy_pipeline_layout;
vk::PipelineLayout msaa_copy_depth_stencil_pipeline_layout;
vk::ShaderModule full_screen_vert;
vk::ShaderModule blit_color_to_color_frag;
vk::ShaderModule temporal_upscale_frag;
+ vk::ShaderModule temporal_sharpen_frag;
vk::ShaderModule blit_color_srgb_to_linear_frag;
vk::ShaderModule blit_color_msaa_frag;
vk::ShaderModule blit_depth_stencil_frag;
@@ -262,6 +275,8 @@ private:
std::vector<vk::Pipeline> blit_color_pipelines;
std::vector<VkRenderPass> temporal_upscale_keys;
std::vector<vk::Pipeline> temporal_upscale_pipelines;
+ std::vector<VkRenderPass> temporal_sharpen_keys;
+ std::vector<vk::Pipeline> temporal_sharpen_pipelines;
std::vector<BlitImagePipelineKey> blit_depth_stencil_keys;
std::vector<vk::Pipeline> blit_depth_stencil_pipelines;
std::vector<BlitImagePipelineKey> clear_color_keys;