webgl: Validate that framebuffer attachment sizes match.

This is required by the WebGL spec, and we need to figure out the FB
size like this for validating ReadPixels.
This commit is contained in:
Eric Anholt 2016-10-30 19:02:35 -07:00
parent d77373654a
commit 3277c5281c
2 changed files with 36 additions and 5 deletions

View file

@ -332,7 +332,7 @@ impl WebGLTexture {
self.image_info_at_face(face_index, level)
}
fn image_info_at_face(&self, face: u8, level: u32) -> ImageInfo {
pub fn image_info_at_face(&self, face: u8, level: u32) -> ImageInfo {
let pos = (level * self.face_count.get() as u32) + face as u32;
self.image_info_array.borrow()[pos as usize]
}