diff options
| author | Liam <byteslice@airmail.cc> | 2024-01-15 14:28:03 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2024-01-31 11:27:21 -0500 |
| commit | dd2918efd83b586861ebc463dfee20c35e9d3bb3 (patch) | |
| tree | 7c3e814d9ff1b26741a823dbc285877f49e7e57a /src/video_core/renderer_opengl/present/fsr.h | |
| parent | 2ed9586130a7b1de6aefc2aede464c4d3430d484 (diff) | |
renderer_opengl: move out ownership of FSR resources
Diffstat (limited to 'src/video_core/renderer_opengl/present/fsr.h')
| -rw-r--r-- | src/video_core/renderer_opengl/present/fsr.h | 29 |
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 |
