diff options
author | Josh Matthews <josh@joshmatthews.net> | 2018-08-15 14:59:19 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2018-09-10 15:56:16 -0400 |
commit | 944d1d1f291f878cbb472ca77c473076f1d7a1ab (patch) | |
tree | ac618144d9db034d9e13bc1ff2165f33a814d555 /components/script/dom/webglframebuffer.rs | |
parent | 15e2af0fea20a8141ea2eec4774607c434af0929 (diff) | |
download | servo-944d1d1f291f878cbb472ca77c473076f1d7a1ab.tar.gz servo-944d1d1f291f878cbb472ca77c473076f1d7a1ab.zip |
webgl: Check internal format of textures when determining attachment completeness.
Diffstat (limited to 'components/script/dom/webglframebuffer.rs')
-rw-r--r-- | components/script/dom/webglframebuffer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs index 53d72857b54..fa66d61429f 100644 --- a/components/script/dom/webglframebuffer.rs +++ b/components/script/dom/webglframebuffer.rs @@ -128,7 +128,7 @@ impl WebGLFramebuffer { let has_zs = zs.is_some(); let attachments = [&*c, &*z, &*s, &*zs]; let attachment_constraints = [ - &[constants::RGBA4, constants::RGB5_A1, constants::RGB565][..], + &[constants::RGBA4, constants::RGB5_A1, constants::RGB565, constants::RGBA][..], &[constants::DEPTH_COMPONENT16][..], &[constants::STENCIL_INDEX8][..], &[constants::DEPTH_STENCIL][..], @@ -162,7 +162,7 @@ impl WebGLFramebuffer { } Some(WebGLFramebufferAttachment::Texture { texture: ref att_tex, level } ) => { let info = att_tex.image_info_at_face(0, level as u32); - (info.data_type().map(|t| t.as_gl_constant()), + (info.internal_format().map(|t| t.as_gl_constant()), Some((info.width() as i32, info.height() as i32))) } None => (None, None), |