[gtk/more-vbo-overflow: 2/2] gsk: Another vbo_size overflow fix




commit f45c0b9609fc991aa59371d08a6cd49444af7305
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 29 15:22:40 2021 -0400

    gsk: Another vbo_size overflow fix
    
    We can overflow vbo_size not just by batching
    too much, but also by producing humongous text
    nodes. Split them up.

 gsk/ngl/gsknglrenderjob.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index d08d45a04f..b876e6e248 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -2889,7 +2889,7 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob     *job,
       if G_UNLIKELY (texture_id == 0)
         continue;
 
-      if G_UNLIKELY (last_texture != texture_id)
+      if G_UNLIKELY (last_texture != texture_id || batch->draw.vbo_count + GSK_NGL_N_VERTICES > 0xffff)
         {
           if G_LIKELY (last_texture != 0)
             {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]