Skip to content

Commit

Permalink
Bug 1869569 - Avoid CompositorOGL::BeginFrame's glInvalidateFramebuff…
Browse files Browse the repository at this point in the history
…er optimization on Xclipse 920 GPU. a=RyanVM

In CompositorOGL (used by software webrender on Android) as an
optimization we use glInvalidateFramebuffer rather than glClear for
the color attachment if there is no non-opaque invalid region. This
causes rendering glitches on the Samsung Xclipse 920 GPU. This patch
marks GLfeature::invalidate_framebuffer as unsupported on this GPU,
causing us to fall back to the glClear pach which avoids the glitches.

Original Revision: https://phabricator.services.mozilla.com/D196416

Differential Revision: https://phabricator.services.mozilla.com/D196427
  • Loading branch information
jamienicol committed Dec 14, 2023
1 parent 6d06661 commit c9e4d1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gfx/gl/GLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ bool GLContext::InitImpl() {
"Gallium 0.4 on llvmpipe",
"Intel HD Graphics 3000 OpenGL Engine",
"Microsoft Basic Render Driver",
"Samsung Xclipse 920",
"Unknown"};

mRenderer = GLRenderer::Other;
Expand Down Expand Up @@ -754,6 +755,10 @@ bool GLContext::InitImpl() {
// DrawElementsInstanced hangs the driver.
MarkUnsupported(GLFeature::robust_buffer_access_behavior);
}

if (Renderer() == GLRenderer::SamsungXclipse920) {
MarkUnsupported(GLFeature::invalidate_framebuffer);
}
}

if (IsExtensionSupported(GLContext::ARB_pixel_buffer_object)) {
Expand Down
1 change: 1 addition & 0 deletions gfx/gl/GLContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ enum class GLRenderer {
GalliumLlvmpipe,
IntelHD3000,
MicrosoftBasicRenderDriver,
SamsungXclipse920,
Other
};

Expand Down

0 comments on commit c9e4d1a

Please sign in to comment.