summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/present/fsr.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-01-15 20:28:03 +0100
committerLiam <byteslice@airmail.cc>2024-01-31 17:27:21 +0100
commitdd2918efd83b586861ebc463dfee20c35e9d3bb3 (patch)
tree7c3e814d9ff1b26741a823dbc285877f49e7e57a /src/video_core/renderer_opengl/present/fsr.h
parentrenderer_vulkan: convert FSR to graphics pipeline (diff)
downloadyuzu-dd2918efd83b586861ebc463dfee20c35e9d3bb3.tar
yuzu-dd2918efd83b586861ebc463dfee20c35e9d3bb3.tar.gz
yuzu-dd2918efd83b586861ebc463dfee20c35e9d3bb3.tar.bz2
yuzu-dd2918efd83b586861ebc463dfee20c35e9d3bb3.tar.lz
yuzu-dd2918efd83b586861ebc463dfee20c35e9d3bb3.tar.xz
yuzu-dd2918efd83b586861ebc463dfee20c35e9d3bb3.tar.zst
yuzu-dd2918efd83b586861ebc463dfee20c35e9d3bb3.zip
Diffstat (limited to 'src/video_core/renderer_opengl/present/fsr.h')
-rw-r--r--src/video_core/renderer_opengl/present/fsr.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/video_core/renderer_opengl/present/fsr.h b/src/video_core/renderer_opengl/present/fsr.h
index fa57c6f00..606935a01 100644
--- a/src/video_core/renderer_opengl/present/fsr.h
+++ b/src/video_core/renderer_opengl/present/fsr.h
@@ -16,27 +16,24 @@ class ProgramManager;
class FSR {
public:
- explicit FSR();
+ explicit FSR(u32 output_width, u32 output_height);
~FSR();
- void Draw(ProgramManager& program_manager, const Common::Rectangle<u32>& screen,
- u32 input_image_width, u32 input_image_height,
- const Common::Rectangle<f32>& crop_rect);
+ GLuint Draw(ProgramManager& program_manager, GLuint texture, u32 input_image_width,
+ u32 input_image_height, const Common::Rectangle<f32>& crop_rect);
- void InitBuffers();
-
- void ReleaseBuffers();
-
- [[nodiscard]] const OGLProgram& GetPresentFragmentProgram() const noexcept;
-
- [[nodiscard]] bool AreBuffersInitialized() const noexcept;
+ bool NeedsRecreation(const Common::Rectangle<u32>& screen);
private:
- OGLFramebuffer fsr_framebuffer;
- OGLProgram fsr_vertex;
- OGLProgram fsr_easu_frag;
- OGLProgram fsr_rcas_frag;
- OGLTexture fsr_intermediate_tex;
+ const u32 width;
+ const u32 height;
+ OGLFramebuffer framebuffer;
+ OGLSampler sampler;
+ OGLProgram vert;
+ OGLProgram easu_frag;
+ OGLProgram rcas_frag;
+ OGLTexture easu_tex;
+ OGLTexture rcas_tex;
};
} // namespace OpenGL