aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c4
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c21
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c1
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c1
7 files changed, 27 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index 96d09ca9472..f22ebbd7ac2 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -380,6 +380,7 @@ void
intelInitDriverFunctions(struct dd_function_table *functions)
{
_mesa_init_driver_functions(functions);
+ _tnl_init_driver_draw_function(functions);
functions->Flush = intel_glFlush;
functions->Finish = intelFinish;
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 5f52404bd6e..4caaadd560d 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -969,8 +969,8 @@ brw_draw_prims(struct gl_context *ctx,
_mesa_enum_to_string(ctx->RenderMode));
_swsetup_Wakeup(ctx);
_tnl_wakeup(ctx);
- _tnl_draw_prims(ctx, prims, nr_prims, ib,
- index_bounds_valid, min_index, max_index, NULL, 0, NULL);
+ _tnl_draw(ctx, prims, nr_prims, ib,
+ index_bounds_valid, min_index, max_index, NULL, 0, NULL);
return;
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 5fab81d8663..93f6ce473a1 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -119,6 +119,7 @@ nouveau_context_init(struct gl_context *ctx, gl_api api,
/* Initialize the function pointers. */
_mesa_init_driver_functions(&functions);
+ _tnl_init_driver_draw_function(&functions);
nouveau_driver_functions_init(&functions);
nouveau_bufferobj_functions_init(&functions);
nouveau_texture_functions_init(&functions);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
index a7b911c50ea..10b5c15e41d 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
@@ -537,6 +537,24 @@ TAG(vbo_check_render_prims)(struct gl_context *ctx,
tfb_vertcount, stream, indirect);
}
+static void
+TAG(vbo_draw)(struct gl_context *ctx,
+ const struct _mesa_prim *prims, GLuint nr_prims,
+ const struct _mesa_index_buffer *ib,
+ GLboolean index_bounds_valid,
+ GLuint min_index, GLuint max_index,
+ struct gl_transform_feedback_object *tfb_vertcount,
+ unsigned stream,
+ struct gl_buffer_object *indirect)
+{
+ /* Borrow and update the inputs list from the tnl context */
+ _tnl_bind_inputs(ctx);
+
+ TAG(vbo_check_render_prims)(ctx, prims, nr_prims, ib,
+ index_bounds_valid, min_index, max_index,
+ tfb_vertcount, stream, indirect);
+}
+
void
TAG(vbo_init)(struct gl_context *ctx)
{
@@ -546,7 +564,8 @@ TAG(vbo_init)(struct gl_context *ctx)
for (i = 0; i < VERT_ATTRIB_MAX; i++)
render->map[i] = -1;
- vbo_set_draw_func(ctx, TAG(vbo_check_render_prims));
+ /* Overwrite our draw function */
+ ctx->Driver.Draw = TAG(vbo_draw);
vbo_use_buffer_objects(ctx);
}
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index eb7d92f3c60..4524f06d10c 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -227,6 +227,7 @@ GLboolean r200CreateContext( gl_api api,
* (the texture functions are especially important)
*/
_mesa_init_driver_functions(&functions);
+ _tnl_init_driver_draw_function(&functions);
r200InitDriverFuncs(&functions);
r200InitIoctlFuncs(&functions);
r200InitStateFuncs(&rmesa->radeon, &functions);
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 8c5c1671996..28ced814e59 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -194,6 +194,7 @@ r100CreateContext( gl_api api,
* (the texture functions are especially important)
*/
_mesa_init_driver_functions( &functions );
+ _tnl_init_driver_draw_function( &functions );
radeonInitTextureFuncs( &rmesa->radeon, &functions );
radeonInitQueryObjFunctions(&functions);
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 8084be64393..ae5874f5927 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -783,6 +783,7 @@ dri_create_context(gl_api api,
/* build table of device driver functions */
_mesa_init_driver_functions(&functions);
swrast_init_driver_functions(&functions);
+ _tnl_init_driver_draw_function(&functions);
if (share) {
sharedCtx = &share->Base;