[cogl/cogl-1.22] Journal: Skip journal dumping when unsupported



commit d6f415d491533b3c6a69becfbbafc2f7592c3eb5
Author: Daniel Stone <daniels collabora com>
Date:   Wed Sep 23 12:20:43 2015 +0100

    Journal: Skip journal dumping when unsupported
    
    GLES2 does not support passing READ to glMapBuffer; attempting to call
    cogl_buffer_map for read on ES2 will bring it down with an assert. Make
    sure COGL_DEBUG=journal doesn't do this when it's not possible.
    
    Signed-off-by: Daniel Stone <daniels collabora com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728355

 cogl/cogl-journal.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/cogl/cogl-journal.c b/cogl/cogl-journal.c
index dff34a0..8ffe25f 100644
--- a/cogl/cogl-journal.c
+++ b/cogl/cogl-journal.c
@@ -650,7 +650,8 @@ _cogl_journal_flush_vbo_offsets_and_entries (CoglJournalEntry *batch_start,
    */
   state->current_vertex = 0;
 
-  if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_JOURNAL)))
+  if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_JOURNAL)) &&
+      cogl_has_feature (ctx, COGL_FEATURE_ID_MAP_BUFFER_FOR_READ))
     {
       uint8_t *verts;
 


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