[gtk/wip/chergert/glproto] batch draws if snapshots are comparable
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto] batch draws if snapshots are comparable
- Date: Wed, 17 Feb 2021 01:54:43 +0000 (UTC)
commit 9ff0dfbcdf40e186c9e633eaf8a3544cf9aa565a
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 16 17:53:10 2021 -0800
batch draws if snapshots are comparable
gsk/next/gskglcommandqueue.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 3b6c2861cb..687d823409 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -573,17 +573,14 @@ gsk_gl_command_queue_end_draw (GskGLCommandQueue *self)
last_batch = NULL;
/* Do simple chaining of draw to last batch. */
- /* TODO: Use merging capabilities for out-or-order batching */
-#if 0
- if (batch->draw.uniform_count == 0 &&
- batch->draw.bind_count == 0 &&
- last_batch != NULL &&
+ if (last_batch != NULL &&
last_batch->any.kind == GSK_GL_COMMAND_KIND_DRAW &&
last_batch->any.program == batch->any.program &&
last_batch->any.viewport.width == batch->any.viewport.width &&
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_offset + last_batch->draw.vbo_count == batch->draw.vbo_offset &&
+ snapshots_equal (self, last_batch, batch))
{
last_batch->draw.vbo_count += batch->draw.vbo_count;
discard_batch (self);
@@ -592,9 +589,6 @@ gsk_gl_command_queue_end_draw (GskGLCommandQueue *self)
{
enqueue_batch (self);
}
-#else
- enqueue_batch (self);
-#endif
self->in_draw = FALSE;
self->program_info = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]