mesa: fix default_access_mode() result for ES2
authorBrian Paul <brianp@vmware.com>
Thu, 2 Aug 2012 15:40:40 +0000 (09:40 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 2 Aug 2012 15:40:40 +0000 (09:40 -0600)
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@intel.com>
src/mesa/main/bufferobj.c

index c7c21fb395697b255d487c1a6dcc58b8be9f1fbf..48edd89c93df314289f5c379445618bf13635fad 100644 (file)
@@ -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);
 }