From 4cf2c7a350210162bc7487720e36bf913bcdb0bd Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 27 May 2019 01:36:49 +1000 Subject: [PATCH] [client] check for failure to map pbo memory --- VERSION | 2 +- client/renderers/EGL/texture.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 73136649..f48134e9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-rc2-3-g21b02efb4d+1 \ No newline at end of file +B1-rc2-1-g9b1f5b52a6+1 \ No newline at end of file diff --git a/client/renderers/EGL/texture.c b/client/renderers/EGL/texture.c index 643857fc..a38374aa 100644 --- a/client/renderers/EGL/texture.c +++ b/client/renderers/EGL/texture.c @@ -223,6 +223,12 @@ bool egl_texture_setup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt, size_ GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_BUFFER_BIT ); + + if (!texture->pboMap[i]) + { + DEBUG_ERROR("glMapBufferRange failed for %d of %lu bytes", i, texture->pboBufferSize); + return false; + } } glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); }