Re attach texture to re-trigger framebuffer completeness
diff --git a/sparse_strips/vello_hybrid/src/render/webgl.rs b/sparse_strips/vello_hybrid/src/render/webgl.rs index ecf5937..b785a5b 100644 --- a/sparse_strips/vello_hybrid/src/render/webgl.rs +++ b/sparse_strips/vello_hybrid/src/render/webgl.rs
@@ -1043,6 +1043,23 @@ ) .unwrap(); + // Re-attach the texture to the framebuffer after reallocation. Some GPU + // drivers (notably Mali on low-end Android devices, accessed through + // ANGLE) cache framebuffer completeness and don't re-evaluate it when an + // attached texture's storage is reallocated via tex_image_2d while the + // framebuffer is not bound. + gl.bind_framebuffer( + WebGl2RenderingContext::FRAMEBUFFER, + Some(&self.resources.view_framebuffer), + ); + gl.framebuffer_texture_2d( + WebGl2RenderingContext::FRAMEBUFFER, + WebGl2RenderingContext::COLOR_ATTACHMENT0, + WebGl2RenderingContext::TEXTURE_2D, + Some(&self.resources.view_texture), + 0, + ); + self.render_size = new_render_size.clone(); } }