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
This commit is contained in:
Daniel Stone 2015-09-23 12:20:43 +01:00 committed by Emmanuele Bassi
parent 85e0b08459
commit d6f415d491

View File

@ -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;