Closed Bug 1325835 Opened 8 years ago Closed 8 years ago

DXGL ShSurf fails to Attach on Intel

Categories

(Core :: Graphics: CanvasWebGL, defect, P2)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: jgilbert, Unassigned)

Details

(Whiteboard: gfx-noted)

Attachments

(1 file)

When ANGLE is disabled, we try to use native GL and get fast compositing with DXGI sharing. When we build an FB with this dx_interop2 renderbuffer and a depth RB, we're getting GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE, which causes us to force-lose the webgl context.
I think this is really a bug in Intel's implementation of dx_interop, but they seem excruciatingly technically correct. D3D textures are created with D3D11_TEXTURE2D_DESC. D3D11_TEXTURE2D_DESC::SampleDesc defaults to the "default sampler mode, with no anti-aliasing, has a count of 1 and a quality level of 0."[1] It seems when we register a dx_interop GL_RENDERBUFFER from it, it gets RENDERBUFFER_SAMPLES=1, not 0. In GL, samples=1 is still considered 'multisampled', so we can't attach it to an FB with samples=0, and we can't switch to using samples=1 because BlitFramebuffer forbids its DRAW_FRAMEBUFFER from samples>0. Since I can't think of another way in GL to efficiently get data into a samples>0 resource, we'll have to have a temporary samples=0 GL_TEXTURE to resolve into, and then draw-blit it into our samples=1 dx_interop GL_RENDERBUFFER. [1]: https://msdn.microsoft.com/en-us/library/windows/desktop/bb173072(v=vs.85).aspx { UINT Width; UINT Height; UINT MipLevels; UINT ArraySize; DXGI_FORMAT Format; DXGI_SAMPLE_DESC SampleDesc;
Comment on attachment 8822539 [details] Bug 1325835 - Support dx_interop on Intel. - https://reviewboard.mozilla.org/r/101414/#review106746 ::: gfx/gl/SharedSurfaceD3D11Interop.cpp:320 (Diff revision 1) > + { > + const ScopedBindRenderbuffer bindRB(gl, interopRB); > + gl->fGetRenderbufferParameteriv(LOCAL_GL_RENDERBUFFER, > + LOCAL_GL_RENDERBUFFER_SAMPLES, &samples); > + } > + if (samples > 0) { // Intel Can you add the description of the problem that you give in the bug as a comment here. It would also be good to reach out to Intel and ask them to change what they're doing.
Attachment #8822539 - Flags: review?(jmuizelaar) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: