r300-gallium: Hook up new swtcl vbuf stage.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 18 Feb 2009 03:23:09 +0000 (19:23 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 18 Feb 2009 03:23:09 +0000 (19:23 -0800)
Hold on to your hats.

src/gallium/drivers/r300/r300_swtcl_emit.c

index b745cee63b5e9dd142c5015636a8075d31288b67..c8e7afb81b7e24344db6d6ba4622093073e561fd 100644 (file)
@@ -262,3 +262,26 @@ static struct vbuf_render* r300_swtcl_render_create(struct r300_context* r300)
 
     return &r300render->base;
 }
+
+struct draw_stage* r300_draw_swtcl_stage(struct r300_context* r300)
+{
+    struct vbuf_render* render;
+    struct draw_stage* stage;
+
+    render = r300_swtcl_render_create(r300);
+
+    if (!render) {
+        return NULL;
+    }
+
+    stage = draw_vbuf_stage(r300->draw, render);
+
+    if (!stage) {
+        render->destroy(render);
+        return NULL;
+    }
+
+    draw_set_render(r300->draw, render);
+
+    return stage;
+}