summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c11
-rw-r--r--src/mesa/drivers/x11/xm_dd.c11
-rw-r--r--src/mesa/main/bufferobj.c12
3 files changed, 12 insertions, 22 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 368e35a989..67d72446b8 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -682,17 +682,6 @@ hook_in_driver_functions( GLcontext *ctx )
ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D;
ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
-#if FEATURE_ARB_vertex_buffer_object
- ctx->Driver.NewBufferObject = _mesa_new_buffer_object;
- ctx->Driver.DeleteBuffer = _mesa_delete_buffer_object;
- ctx->Driver.BindBuffer = NULL;
- ctx->Driver.BufferData = _mesa_buffer_data;
- ctx->Driver.BufferSubData = _mesa_buffer_subdata;
- ctx->Driver.GetBufferSubData = _mesa_buffer_get_subdata;
- ctx->Driver.MapBuffer = _mesa_buffer_map;
- ctx->Driver.UnmapBuffer = NULL;
-#endif
-
swdd->SetBuffer = set_buffer;
/* RGB(A) span/pixel functions */
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index c5e59bc083..28e6154df4 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -1015,17 +1015,6 @@ void xmesa_init_pointers( GLcontext *ctx )
ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D;
ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
-#if FEATURE_ARB_vertex_buffer_object
- ctx->Driver.NewBufferObject = _mesa_new_buffer_object;
- ctx->Driver.DeleteBuffer = _mesa_delete_buffer_object;
- ctx->Driver.BindBuffer = NULL;
- ctx->Driver.BufferData = _mesa_buffer_data;
- ctx->Driver.BufferSubData = _mesa_buffer_subdata;
- ctx->Driver.GetBufferSubData = _mesa_buffer_get_subdata;
- ctx->Driver.MapBuffer = _mesa_buffer_map;
- ctx->Driver.UnmapBuffer = NULL;
-#endif
-
/* Initialize the TNL driver interface:
*/
tnl = TNL_CONTEXT(ctx);
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 17ea49b61f..04107928e3 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -347,6 +347,18 @@ _mesa_init_buffer_objects( GLcontext *ctx )
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
ctx->Array.VertexAttrib[i].BufferObj = ctx->Array.NullBufferObj;
}
+
+ /* Device drivers might override these assignments after the Mesa
+ * context is initialized.
+ */
+ ctx->Driver.NewBufferObject = _mesa_new_buffer_object;
+ ctx->Driver.DeleteBuffer = _mesa_delete_buffer_object;
+ ctx->Driver.BindBuffer = NULL;
+ ctx->Driver.BufferData = _mesa_buffer_data;
+ ctx->Driver.BufferSubData = _mesa_buffer_subdata;
+ ctx->Driver.GetBufferSubData = _mesa_buffer_get_subdata;
+ ctx->Driver.MapBuffer = _mesa_buffer_map;
+ ctx->Driver.UnmapBuffer = NULL;
}