aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2018-03-25 19:16:54 +0200
committerMathias Fröhlich <[email protected]>2018-03-31 06:32:13 +0200
commit784fdef4e7d6055eafe8a3e8e149a64d3ca5e5f6 (patch)
tree57b649dd517aa7e69a270c09e93cf80fa8a7ee04 /src/mesa/drivers/dri/nouveau
parent7f8db5ca471c1940b0be42f49d37c24af381979a (diff)
tnl: Push down the gl_vertex_array inputs into tnl drivers.
Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c21
2 files changed, 21 insertions, 1 deletions
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);
}