[mutter/wip/carlosg/performance-improvements: 3/13] cogl: Mark vertex buffers as dynamic
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/performance-improvements: 3/13] cogl: Mark vertex buffers as dynamic
- Date: Fri, 5 May 2017 13:05:19 +0000 (UTC)
commit 891ae1414136c4c73055b3c881a4aa7055fe32db
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Apr 29 13:24:04 2017 +0200
cogl: Mark vertex buffers as dynamic
Those are cached and reused across runs, which doesn't qualify to mesa
as "static" indeed. Properly marking those as dynamic is more true, and
brings in slight performance benefits just by avoiding the resulting
mesa warning.
cogl/cogl/cogl-journal.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/cogl/cogl/cogl-journal.c b/cogl/cogl/cogl-journal.c
index 9f11e8b..6b64a89 100644
--- a/cogl/cogl/cogl-journal.c
+++ b/cogl/cogl/cogl-journal.c
@@ -1102,7 +1102,7 @@ upload_vertices (CoglJournal *journal,
attribute_buffer = create_attribute_buffer (journal, needed_vbo_len * 4);
buffer = COGL_BUFFER (attribute_buffer);
- cogl_buffer_set_update_hint (buffer, COGL_BUFFER_UPDATE_HINT_STATIC);
+ cogl_buffer_set_update_hint (buffer, COGL_BUFFER_UPDATE_HINT_DYNAMIC);
vout = _cogl_buffer_map_range_for_fill_or_fallback (buffer,
0, /* offset */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]