diff options
author | Liam <byteslice@airmail.cc> | 2024-01-22 18:40:50 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-31 17:27:21 +0100 |
commit | a595e9e8a7a6a742481b1cd05455d3c639095413 (patch) | |
tree | 03f8dfaec328171c42b090988e93c51e8d726eda /src/video_core/renderer_opengl | |
parent | renderer_opengl: implement layer stack composition (diff) | |
download | yuzu-a595e9e8a7a6a742481b1cd05455d3c639095413.tar yuzu-a595e9e8a7a6a742481b1cd05455d3c639095413.tar.gz yuzu-a595e9e8a7a6a742481b1cd05455d3c639095413.tar.bz2 yuzu-a595e9e8a7a6a742481b1cd05455d3c639095413.tar.lz yuzu-a595e9e8a7a6a742481b1cd05455d3c639095413.tar.xz yuzu-a595e9e8a7a6a742481b1cd05455d3c639095413.tar.zst yuzu-a595e9e8a7a6a742481b1cd05455d3c639095413.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 12 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 10a9f973c..e33a32592 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -125,15 +125,15 @@ RendererOpenGL::RendererOpenGL(Core::TelemetrySession& telemetry_session_, RendererOpenGL::~RendererOpenGL() = default; -void RendererOpenGL::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { - if (!framebuffer) { +void RendererOpenGL::Composite(std::span<const Tegra::FramebufferConfig> framebuffers) { + if (framebuffers.empty()) { return; } - RenderScreenshot(framebuffer); + RenderScreenshot(framebuffers); state_tracker.BindFramebuffer(0); - blit_screen->DrawScreen(std::span(framebuffer, 1), emu_window.GetFramebufferLayout()); + blit_screen->DrawScreen(framebuffers, emu_window.GetFramebufferLayout()); ++m_current_frame; @@ -159,7 +159,7 @@ void RendererOpenGL::AddTelemetryFields() { telemetry_session.AddField(user_system, "GPU_OpenGL_Version", std::string(gl_version)); } -void RendererOpenGL::RenderScreenshot(const Tegra::FramebufferConfig* framebuffer) { +void RendererOpenGL::RenderScreenshot(std::span<const Tegra::FramebufferConfig> framebuffers) { if (!renderer_settings.screenshot_requested) { return; } @@ -181,7 +181,7 @@ void RendererOpenGL::RenderScreenshot(const Tegra::FramebufferConfig* framebuffe glRenderbufferStorage(GL_RENDERBUFFER, GL_SRGB8, layout.width, layout.height); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbuffer); - blit_screen->DrawScreen(std::span(framebuffer, 1), layout); + blit_screen->DrawScreen(framebuffers, layout); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); glPixelStorei(GL_PACK_ROW_LENGTH, 0); diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h index df76d3d05..c4625c96e 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.h +++ b/src/video_core/renderer_opengl/renderer_opengl.h @@ -40,7 +40,7 @@ public: std::unique_ptr<Core::Frontend::GraphicsContext> context_); ~RendererOpenGL() override; - void SwapBuffers(const Tegra::FramebufferConfig* framebuffer) override; + void Composite(std::span<const Tegra::FramebufferConfig> framebuffers) override; VideoCore::RasterizerInterface* ReadRasterizer() override { return &rasterizer; @@ -52,7 +52,7 @@ public: private: void AddTelemetryFields(); - void RenderScreenshot(const Tegra::FramebufferConfig* framebuffer); + void RenderScreenshot(std::span<const Tegra::FramebufferConfig> framebuffers); Core::TelemetrySession& telemetry_session; Core::Frontend::EmuWindow& emu_window; |