mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
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:
parent
d77373654a
commit
3277c5281c
2 changed files with 36 additions and 5 deletions
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue