summaryrefslogtreecommitdiff
path: root/glamor/glamor.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-12-27 14:03:26 -0800
committerEric Anholt <eric@anholt.net>2014-03-10 11:06:27 -0700
commitbd09292debbb810db06b187d4e61c9416b5e565e (patch)
tree1ecbe4777036652a48c9470f37807ae5ec2af33c /glamor/glamor.c
parentca507d215f54e878055de8da13877bc0225bece1 (diff)
glamor: Add a note about the state of GL_ARB_map_buffer_range.
GLES2 Xephyr is failing due to lack of glMapBuffer() with the read bits set, and I decided to see if we can just switch everything to glMapBufferRange(). I'm undecided, and it largely depends on whether we find people are interested in using glamor for the windows X server. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Markus Wick <markus at selfnet.de>
Diffstat (limited to 'glamor/glamor.c')
-rw-r--r--glamor/glamor.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index fa753bb1a..fe9f76179 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -319,6 +319,19 @@ glamor_init(ScreenPtr screen, unsigned int flags)
gl_version = glamor_gl_get_version();
+ /* We'd like to require GL_ARB_map_buffer_range or
+ * GL_OES_map_buffer_range, since it offers more information to
+ * the driver than plain old glMapBuffer() or glBufferSubData().
+ * It's been supported on Mesa on the desktop since 2009 and on
+ * GLES2 since October 2012. It's supported on Apple's iOS
+ * drivers for SGX535 and A7, but apparently not on most Android
+ * devices (the OES extension spec wasn't released until June
+ * 2012).
+ *
+ * 82% of 0 A.D. players (desktop GL) submitting hardware reports
+ * have support for it, with most of the ones lacking it being on
+ * Windows with Intel 4-series (G45) graphics or older.
+ */
if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
if (gl_version < GLAMOR_GL_VERSION_ENCODE(1, 3)) {
ErrorF("Require OpenGL version 1.3 or later.\n");