From 10cf0585180bcf2eab38ebf65dc593fecc4ddf92 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 18 Jan 2024 20:47:50 -0500 Subject: renderer_opengl: implement layer stack composition --- src/video_core/renderer_opengl/gl_blit_screen.h | 38 ++++--------------------- 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_blit_screen.h') diff --git a/src/video_core/renderer_opengl/gl_blit_screen.h b/src/video_core/renderer_opengl/gl_blit_screen.h index f42f89dee..0c3d838f1 100644 --- a/src/video_core/renderer_opengl/gl_blit_screen.h +++ b/src/video_core/renderer_opengl/gl_blit_screen.h @@ -3,8 +3,9 @@ #pragma once +#include #include -#include +#include #include "core/hle/service/nvnflinger/pixel_format.h" #include "video_core/host1x/gpu_device_memory_manager.h" @@ -25,24 +26,12 @@ enum class ScalingFilter : u32; namespace OpenGL { class Device; -class FSR; -class FXAA; +class Layer; class ProgramManager; class RasterizerOpenGL; -class SMAA; class StateTracker; class WindowAdaptPass; -/// 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{}; @@ -60,20 +49,11 @@ public: Device& device); ~BlitScreen(); - void ConfigureFramebufferTexture(const Tegra::FramebufferConfig& framebuffer); - /// Draws the emulated screens to the emulator window. - void DrawScreen(const Tegra::FramebufferConfig& framebuffer, + void DrawScreen(std::span framebuffers, const Layout::FramebufferLayout& layout); - /// Loads framebuffer from emulated memory into the active OpenGL texture. - FramebufferTextureInfo LoadFBToScreenInfo(const Tegra::FramebufferConfig& framebuffer); - - FramebufferTextureInfo PrepareRenderTarget(const Tegra::FramebufferConfig& framebuffer); - private: - void CreateFXAA(); - void CreateSMAA(); void CreateWindowAdapt(); RasterizerOpenGL& rasterizer; @@ -82,18 +62,10 @@ private: ProgramManager& program_manager; Device& device; - /// Display information for Switch screen - TextureInfo framebuffer_texture; - - std::unique_ptr fsr; - std::unique_ptr fxaa; - std::unique_ptr smaa; - Settings::ScalingFilter current_window_adapt{}; std::unique_ptr window_adapt; - /// OpenGL framebuffer data - std::vector gl_framebuffer_data; + std::list layers; }; } // namespace OpenGL -- cgit v1.2.3