summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/present/window_adapt_pass.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-01-22 18:40:50 +0100
committerLiam <byteslice@airmail.cc>2024-02-09 15:20:53 +0100
commit962c82540c304f909957776908aabcd261f2a7ba (patch)
tree707ab34565e8309b5ede21acebf36975da7718e7 /src/video_core/renderer_opengl/present/window_adapt_pass.cpp
parentnvservices: unmap only on last container free (diff)
downloadyuzu-962c82540c304f909957776908aabcd261f2a7ba.tar
yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.gz
yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.bz2
yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.lz
yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.xz
yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.zst
yuzu-962c82540c304f909957776908aabcd261f2a7ba.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/present/window_adapt_pass.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/present/window_adapt_pass.cpp b/src/video_core/renderer_opengl/present/window_adapt_pass.cpp
index 4d681606b..0328abd70 100644
--- a/src/video_core/renderer_opengl/present/window_adapt_pass.cpp
+++ b/src/video_core/renderer_opengl/present/window_adapt_pass.cpp
@@ -92,6 +92,21 @@ void WindowAdaptPass::DrawToFramebuffer(ProgramManager& program_manager, std::li
glClear(GL_COLOR_BUFFER_BIT);
for (size_t i = 0; i < layer_count; i++) {
+ switch (framebuffers[i].blending) {
+ case Tegra::BlendMode::Opaque:
+ default:
+ glDisablei(GL_BLEND, 0);
+ break;
+ case Tegra::BlendMode::Premultiplied:
+ glEnablei(GL_BLEND, 0);
+ glBlendFuncSeparatei(0, GL_ONE, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO);
+ break;
+ case Tegra::BlendMode::Coverage:
+ glEnablei(GL_BLEND, 0);
+ glBlendFuncSeparatei(0, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO);
+ break;
+ }
+
glBindTextureUnit(0, textures[i]);
glProgramUniformMatrix3x2fv(vert.handle, ModelViewMatrixLocation, 1, GL_FALSE,
matrices[i].data());