summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/api_exec.c2
-rw-r--r--src/mesa/main/bufferobj.c9
-rw-r--r--src/mesa/main/bufferobj.h3
3 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index bdef1098373..bb5d17131ca 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -653,7 +653,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
#endif
/* ARB 28. GL_ARB_vertex_buffer_object */
- _mesa_init_bufferobj_dispatch(exec);
+ _mesa_init_bufferobj_dispatch(ctx, exec);
/* ARB 29. GL_ARB_occlusion_query */
_mesa_init_queryobj_dispatch(exec);
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 22d7927bbcb..c50f7acd705 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -2201,7 +2201,7 @@ _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer)
}
void
-_mesa_init_bufferobj_dispatch(struct _glapi_table *disp)
+_mesa_init_bufferobj_dispatch(struct gl_context *ctx, struct _glapi_table *disp)
{
SET_BindBufferARB(disp, _mesa_BindBufferARB);
SET_BufferDataARB(disp, _mesa_BufferDataARB);
@@ -2214,6 +2214,9 @@ _mesa_init_bufferobj_dispatch(struct _glapi_table *disp)
SET_IsBufferARB(disp, _mesa_IsBufferARB);
SET_MapBufferARB(disp, _mesa_MapBufferARB);
SET_UnmapBufferARB(disp, _mesa_UnmapBufferARB);
- SET_BindBufferRangeEXT(disp, _mesa_BindBufferRange);
- SET_BindBufferBaseEXT(disp, _mesa_BindBufferBase);
+
+ if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
+ SET_BindBufferRangeEXT(disp, _mesa_BindBufferRange);
+ SET_BindBufferBaseEXT(disp, _mesa_BindBufferBase);
+ }
}
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index e1d0f7a97e8..15fdb9c305b 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -167,6 +167,7 @@ _mesa_BindBufferRange(GLenum target, GLuint index,
GLuint buffer, GLintptr offset, GLsizeiptr size);
extern void
-_mesa_init_bufferobj_dispatch(struct _glapi_table *disp);
+_mesa_init_bufferobj_dispatch(struct gl_context *ctx,
+ struct _glapi_table *disp);
#endif