mesa: Move buffer object dispatch setup to bufferobj.c.
authorEric Anholt <eric@anholt.net>
Thu, 14 Jun 2012 23:47:39 +0000 (16:47 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 21 Jun 2012 17:57:58 +0000 (10:57 -0700)
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/api_exec.c
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h

index 15b9f6974d757b351d2782826e8a244a672d8676..19e7f9807c625d6430ebf36ebbca55730e6ebcbf 100644 (file)
@@ -579,17 +579,7 @@ _mesa_create_exec_table(void)
 #endif
 
    /* ARB 28. GL_ARB_vertex_buffer_object */
-   SET_BindBufferARB(exec, _mesa_BindBufferARB);
-   SET_BufferDataARB(exec, _mesa_BufferDataARB);
-   SET_BufferSubDataARB(exec, _mesa_BufferSubDataARB);
-   SET_DeleteBuffersARB(exec, _mesa_DeleteBuffersARB);
-   SET_GenBuffersARB(exec, _mesa_GenBuffersARB);
-   SET_GetBufferParameterivARB(exec, _mesa_GetBufferParameterivARB);
-   SET_GetBufferPointervARB(exec, _mesa_GetBufferPointervARB);
-   SET_GetBufferSubDataARB(exec, _mesa_GetBufferSubDataARB);
-   SET_IsBufferARB(exec, _mesa_IsBufferARB);
-   SET_MapBufferARB(exec, _mesa_MapBufferARB);
-   SET_UnmapBufferARB(exec, _mesa_UnmapBufferARB);
+   _mesa_init_bufferobj_dispatch(exec);
 
    /* ARB 29. GL_ARB_occlusion_query */
    _mesa_init_queryobj_dispatch(exec);
index 3fc2908620416955316a4ce7d0f4b0c8518d4252..11af09998ac942395e4c5bb420e9c64d61e9fd86 100644 (file)
@@ -43,6 +43,7 @@
 #include "mtypes.h"
 #include "texobj.h"
 #include "transformfeedback.h"
+#include "dispatch.h"
 
 
 /* Debug flags */
@@ -1992,3 +1993,19 @@ _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname,
 }
 
 #endif /* FEATURE_APPLE_object_purgeable */
+
+void
+_mesa_init_bufferobj_dispatch(struct _glapi_table *disp)
+{
+   SET_BindBufferARB(disp, _mesa_BindBufferARB);
+   SET_BufferDataARB(disp, _mesa_BufferDataARB);
+   SET_BufferSubDataARB(disp, _mesa_BufferSubDataARB);
+   SET_DeleteBuffersARB(disp, _mesa_DeleteBuffersARB);
+   SET_GenBuffersARB(disp, _mesa_GenBuffersARB);
+   SET_GetBufferParameterivARB(disp, _mesa_GetBufferParameterivARB);
+   SET_GetBufferPointervARB(disp, _mesa_GetBufferPointervARB);
+   SET_GetBufferSubDataARB(disp, _mesa_GetBufferSubDataARB);
+   SET_IsBufferARB(disp, _mesa_IsBufferARB);
+   SET_MapBufferARB(disp, _mesa_MapBufferARB);
+   SET_UnmapBufferARB(disp, _mesa_UnmapBufferARB);
+}
index 66343c3cd4495716a8974c2ce91adc6fb3293ab7..819ca2573ef2bd6c16b0f817e03102b5f4ff705c 100644 (file)
@@ -159,4 +159,7 @@ extern void GLAPIENTRY
 _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint* params);
 #endif
 
+extern void
+_mesa_init_bufferobj_dispatch(struct _glapi_table *disp);
+
 #endif