Mesa (master): mesa: fix default_access_mode() result for ES2
Brian Paul
brianp at kemper.freedesktop.org
Thu Aug 2 15:41:43 UTC 2012
Module: Mesa
Branch: master
Commit: 8551635242470b1487b65a9ecf43c385f6fe4134
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8551635242470b1487b65a9ecf43c385f6fe4134
Author: Brian Paul <brianp at vmware.com>
Date: Thu Aug 2 09:40:40 2012 -0600
mesa: fix default_access_mode() result for ES2
The GL_OES_mapbuffer extension is supported by OpenGL ES 1 and ES 2 so return
GL_MAP_WRITE_BIT for both ES versions, not just ES 1.
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/main/bufferobj.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index c7c21fb..48edd89 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -150,7 +150,7 @@ default_access_mode(const struct gl_context *ctx)
* The difference is because GL_OES_mapbuffer only supports mapping buffers
* write-only.
*/
- return (ctx->API == API_OPENGLES)
+ return _mesa_is_gles(ctx)
? GL_MAP_WRITE_BIT : (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT);
}
More information about the mesa-commit
mailing list