mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Bug 1636517 - When detaching a webgl fb attachment, reset params to defaults. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D77177
This commit is contained in:
parent
bcc33f9b49
commit
aa48742190
@ -340,6 +340,9 @@ void WebGLContext::FramebufferAttach(const GLenum target,
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto safeToAttach = toAttach;
|
auto safeToAttach = toAttach;
|
||||||
|
if (!toAttach.rb && !toAttach.tex) {
|
||||||
|
safeToAttach = {};
|
||||||
|
}
|
||||||
if (!IsWebGL2() &&
|
if (!IsWebGL2() &&
|
||||||
!IsExtensionEnabled(WebGLExtensionID::OES_fbo_render_mipmap)) {
|
!IsExtensionEnabled(WebGLExtensionID::OES_fbo_render_mipmap)) {
|
||||||
safeToAttach.mipLevel = 0;
|
safeToAttach.mipLevel = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user