mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 02:50:41 -05:00
29983a7e2c
glMapBufferRange is documented to fail with GL_INVALID_OPERATION if GL_MAP_INVALIDATE_BUFFER_BIT is set as well as GL_MAP_READ_BIT. I guess this makes sense when only read access is requested because there would be no point in reading back uninitialised data. However, Clutter requests read/write access with the discard hint when rendering to a CoglBitmap with Cairo. The data is new so the discard hint makes sense but it also needs read access so that it can read back the data it just wrote for blending. This patch works around the GL restriction by skipping the discard hints if read access is requested. If the buffer discard hint is set along with read access it will recreate the buffer store as an alternative way to discard the buffer as it does in the case where the GL_ARB_map_buffer_range extension is not supported. https://bugzilla.gnome.org/show_bug.cgi?id=694164 Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 986675d6043e8701f2d65415cf72ffc91734debd) |
||
---|---|---|
.. | ||
gl | ||
nop |