[gtk/more-vbo-overflow: 1/2] gsk: Use the right limit for batch size




commit 9ea162034a8080e56f9da7006b470db646e3fa2c
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 29 15:21:45 2021 -0400

    gsk: Use the right limit for batch size
    
    We use 16 bits, so G_MAXINT16 is one bit short.
    Just make it explicit as 0xffff.

 gsk/ngl/gsknglcommandqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gsk/ngl/gsknglcommandqueue.c b/gsk/ngl/gsknglcommandqueue.c
index 5449fde9af..b731d9d2db 100644
--- a/gsk/ngl/gsknglcommandqueue.c
+++ b/gsk/ngl/gsknglcommandqueue.c
@@ -617,7 +617,7 @@ gsk_ngl_command_queue_end_draw (GskNglCommandQueue *self)
       last_batch->any.viewport.height == batch->any.viewport.height &&
       last_batch->draw.framebuffer == batch->draw.framebuffer &&
       last_batch->draw.vbo_offset + last_batch->draw.vbo_count == batch->draw.vbo_offset &&
-      last_batch->draw.vbo_count + batch->draw.vbo_count < G_MAXINT16 &&
+      last_batch->draw.vbo_count + batch->draw.vbo_count <= 0xffff &&
       snapshots_equal (self, last_batch, batch))
     {
       last_batch->draw.vbo_count += batch->draw.vbo_count;


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