[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] blitFramebuffer behaviour

Hi all,

I just reported a bug to the Firefox devs about blitFramebuffer causing the browser tab to crash: https://bugzilla.mozilla.org/show_bug.cgi?id=1506840

Essentially, if the read fbo has colour and depth attachments, while the draw fbo has only a color attachement, and the mask is COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT, the tab will crash in Firefox. Minimal example: https://github.com/tsherif/webgl2bugs/blob/master/firefox/ff-blit-bug.html

Chrome ignores the depth buffer in this case, but I'm not sure that behaviour is correct. The spec suggests it should be an INVALID_OPERATION error (section 4.3.3): "Calling BlitFramebuffer will result in an INVALID_OPERATION error if mask includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, and the source and destination depth and stencil buffer formats do not match."

I don't mind either way, as long as the behaviour is consistent across both browsers.