Closed Bug 1372083 Opened 4 years ago Closed 4 years ago

Some advanced layers are not rendered on windows

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

(Whiteboard: gfx-noted angle-upstream)

Attachments

(1 file)

Bug 1371557 addressed some rendering problems of webrender on Windows. But even with Bug 1371557, I still saw rendering problems. Some advanced layers seemed not rendered.
Blocks: webrender
Depends on: 1371557
Some ui was still not correctly with a patch of Bug 1371557.
  https://www.youtube.com/watch?v=jhOVibLEDhA

And I often saw a flickering with layout/reftests/border-radius/color-layer-1a.html
(In reply to Sotaro Ikeda [:sotaro] from comment #1)
> 
> And I often saw a flickering with
> layout/reftests/border-radius/color-layer-1a.html

I did not saw the problem only one Tab of the "color-layer-1a.html" was opened. When I opened another tab, I saw the flicker.
Priority: -- → P3
Whiteboard: gfx-noted
See bug 1357734 comment 37 (video in bug 1357734 comment 27). The shadows on the right side of bugzilla are not shown or disappear with scrolling down.
When the problem happen, FramebufferState in ANGLE check failed.

The callstack was the following.

 libGLESv2.dll!gl::FramebufferState::attachmentsHaveSameDimensions() Line 196
 libGLESv2.dll!rx::FramebufferD3D::checkStatus() Line 317
 libGLESv2.dll!gl::Framebuffer::checkStatusImpl(const gl::ContextState & state) Line 710
 libGLESv2.dll!gl::Framebuffer::checkStatus(const gl::ContextState & state) Line 482
 libGLESv2.dll!gl::ValidateClear() Line 1920
 libGLESv2.dll!gl::Clear(unsigned int mask) Line 295
 libGLESv2.dll!glClear(unsigned int mask) Line 97
 xul.dll!gleam::ffi_gles::Gles2::Clear() Line 1525
 xul.dll!gleam::gl::{{impl}}::clear() Line 1213
 xul.dll!webrender::device::Device::clear_target_rect() Line 1943
 xul.dll!webrender::renderer::Renderer::draw_alpha_target() Line 1879
 xul.dll!webrender::renderer::Renderer::draw_tile_frame() Line 2127
 xul.dll!webrender::renderer::{{impl}}::render::{{closure}}(closure) Line 1332
 xul.dll!webrender::profiler::TimeProfileCounter::profile<webrender::device::FrameId,closure>(closure self) Line 154
 xul.dll!webrender::renderer::Renderer::render() Line 1309
 xul.dll!webrender_bindings::bindings::wr_renderer_render() Line 804
 xul.dll!mozilla::wr::RendererOGL::Render() Line 132
 xul.dll!mozilla::wr::RenderThread::UpdateAndRender(WrWindowId aWindowId) Line 242
 xul.dll!mozilla::wr::RenderThread::NewFrameReady(WrWindowId aWindowId) Line 170



"if (hasMismatchedSize(mDepthAttachment))" was failed in FramebufferState::attachmentsHaveSameDimensions().
  https://dxr.mozilla.org/mozilla-central/source/gfx/angle/src/libANGLE/Framebuffer.cpp#194
The attachmentsHaveSameDimensions() failed because dimensions of ColorAttachments and mDepthAttachment were different.

> sizes of mColorAttachments = {width=0x000004f4 height=0x00000400 depth=0x00000002 }
> size of mDepthAttachment = {width=0x000004f4 height=0x00000400 depth=0x00000001 }


They were created in create_fbo_for_texture_if_necessary().
  https://dxr.mozilla.org/mozilla-central/source/gfx/webrender/src/device.rs#1225

When the problem happened, layer_count was 2 in create_fbo_for_texture_if_necessary() and ColorAttachment was created by gl.tex_image_3d() and framebuffer_texture_layer(). Then the depth of ColorAttachment became 2. But depth of mDepthAttachment was i since it was created with gl.renderbuffer_storage().

From it, it seems necessary to create DepthAttachment with gl.tex_image_3d() and framebuffer_texture_layer() like ColorAttachment.
See Also: → 1378883
From the following comment, attachmentsHaveSameDimensions() seems to have a bug.
  https://github.com/servo/webrender/issues/1470#issuecomment-314828465

 > All in all, I'd bet this to be a bug in Angle, which takes the depth of the color texture
 > as opposed to the depth of the color attachment.
I confirmed that the patch addressed the problem locally.
Assignee: nobody → sotaro.ikeda.g
Comment on attachment 8885985 [details] [diff] [review]
patch - Do not compare depth in attachmentsHaveSameDimensions()

:jgilbert, can you feedback to the patch?
Attachment #8885985 - Flags: feedback?(jgilbert)
Attachment #8885985 - Flags: feedback?(jgilbert) → feedback+
Whiteboard: gfx-noted → gfx-noted angle-upstream
Attachment #8885985 - Flags: review?(jgilbert)
Attachment #8885985 - Flags: review?(jgilbert) → review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/81f667d3a504
Do not compare depth in attachmentsHaveSameDimensions() r=jgilbert
https://hg.mozilla.org/mozilla-central/rev/81f667d3a504
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.