mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
webgl: Mark zero-sized framebuffers as incomplete attachments.
This commit is contained in:
parent
733552d997
commit
3334e477c1
1 changed files with 5 additions and 1 deletions
|
@ -175,7 +175,11 @@ impl WebGLFramebuffer {
|
|||
self.size.set(fb_size);
|
||||
|
||||
if has_c || has_z || has_zs || has_s {
|
||||
self.status.set(constants::FRAMEBUFFER_COMPLETE);
|
||||
if self.size.get().map_or(false, |(w, h)| w != 0 && h != 0) {
|
||||
self.status.set(constants::FRAMEBUFFER_COMPLETE);
|
||||
} else {
|
||||
self.status.set(constants::FRAMEBUFFER_INCOMPLETE_ATTACHMENT);
|
||||
}
|
||||
} else {
|
||||
self.status.set(constants::FRAMEBUFFER_UNSUPPORTED);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue