diff options
author | Liam <byteslice@airmail.cc> | 2024-01-12 06:46:17 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-31 17:27:20 +0100 |
commit | 2b1dd3bef511806aa479ec93e3d9b414db80d4a9 (patch) | |
tree | 24ef32a78ab1c4c13363fbed9d61774724753aa8 /src/video_core/renderer_opengl/renderer_opengl.h | |
parent | video_core: consistently account for resolution scaling when rendering (diff) | |
download | yuzu-2b1dd3bef511806aa479ec93e3d9b414db80d4a9.tar yuzu-2b1dd3bef511806aa479ec93e3d9b414db80d4a9.tar.gz yuzu-2b1dd3bef511806aa479ec93e3d9b414db80d4a9.tar.bz2 yuzu-2b1dd3bef511806aa479ec93e3d9b414db80d4a9.tar.lz yuzu-2b1dd3bef511806aa479ec93e3d9b414db80d4a9.tar.xz yuzu-2b1dd3bef511806aa479ec93e3d9b414db80d4a9.tar.zst yuzu-2b1dd3bef511806aa479ec93e3d9b414db80d4a9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.h | 78 |
1 files changed, 2 insertions, 76 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h index 3a83a9b78..23aff055a 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.h +++ b/src/video_core/renderer_opengl/renderer_opengl.h @@ -25,38 +25,13 @@ namespace Core::Frontend { class EmuWindow; } -namespace Core::Memory { -class Memory; -} - -namespace Layout { -struct FramebufferLayout; -} - namespace Tegra { class GPU; } namespace OpenGL { -/// Structure used for storing information about the textures for the Switch screen -struct TextureInfo { - OGLTexture resource; - GLsizei width; - GLsizei height; - GLenum gl_format; - GLenum gl_type; - Service::android::PixelFormat pixel_format; -}; - -/// Structure used for storing information about the display target for the Switch screen -struct FramebufferTextureInfo { - GLuint display_texture{}; - u32 width; - u32 height; - u32 scaled_width; - u32 scaled_height; -}; +class BlitScreen; class RendererOpenGL final : public VideoCore::RendererBase { public: @@ -77,24 +52,9 @@ public: } private: - /// Initializes the OpenGL state and creates persistent objects. - void InitOpenGLObjects(); - void AddTelemetryFields(); - - void ConfigureFramebufferTexture(const Tegra::FramebufferConfig& framebuffer); - - /// Draws the emulated screens to the emulator window. - void DrawScreen(const Tegra::FramebufferConfig& framebuffer, - const Layout::FramebufferLayout& layout); - void RenderScreenshot(const Tegra::FramebufferConfig& framebuffer); - /// Loads framebuffer from emulated memory into the active OpenGL texture. - FramebufferTextureInfo LoadFBToScreenInfo(const Tegra::FramebufferConfig& framebuffer); - - FramebufferTextureInfo PrepareRenderTarget(const Tegra::FramebufferConfig& framebuffer); - Core::TelemetrySession& telemetry_session; Core::Frontend::EmuWindow& emu_window; Tegra::MaxwellDeviceMemoryManager& device_memory; @@ -104,43 +64,9 @@ private: StateTracker state_tracker; ProgramManager program_manager; RasterizerOpenGL rasterizer; - - // OpenGL object IDs - OGLSampler present_sampler; - OGLSampler present_sampler_nn; - OGLBuffer vertex_buffer; - OGLProgram fxaa_vertex; - OGLProgram fxaa_fragment; - OGLProgram present_vertex; - OGLProgram present_bilinear_fragment; - OGLProgram present_bicubic_fragment; - OGLProgram present_gaussian_fragment; - OGLProgram present_scaleforce_fragment; OGLFramebuffer screenshot_framebuffer; - // GPU address of the vertex buffer - GLuint64EXT vertex_buffer_address = 0; - - /// Display information for Switch screen - TextureInfo framebuffer_texture; - OGLTexture aa_texture; - OGLFramebuffer aa_framebuffer; - - OGLProgram smaa_edge_detection_vert; - OGLProgram smaa_blending_weight_calculation_vert; - OGLProgram smaa_neighborhood_blending_vert; - OGLProgram smaa_edge_detection_frag; - OGLProgram smaa_blending_weight_calculation_frag; - OGLProgram smaa_neighborhood_blending_frag; - OGLTexture smaa_area_tex; - OGLTexture smaa_search_tex; - OGLTexture smaa_edges_tex; - OGLTexture smaa_blend_tex; - - std::unique_ptr<FSR> fsr; - - /// OpenGL framebuffer data - std::vector<u8> gl_framebuffer_data; + std::unique_ptr<BlitScreen> blit_screen; }; } // namespace OpenGL |