summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2010-02-22 22:02:58 -0500
committerZack Rusin <zackr@vmware.com>2010-02-22 22:02:58 -0500
commitc5c5cd7132e18f4aad8e73d8ee879f8823c4c1e7 (patch)
treef36680fba5d44945075e4b6f7d4269154b3c1e7d /src/gallium/auxiliary/draw/draw_context.c
parent902ccfcb40f21e1a5fca2f1bec1cbbabb053d8cf (diff)
gallium/draw: initial code to properly support llvm in the draw module
code generate big chunks of the vertex pipeline in order to speed up software vertex processing.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index d5ddc4a6a9..6fa73ad56b 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -44,6 +44,18 @@ struct draw_context *draw_create( void )
if (draw == NULL)
goto fail;
+ if (!draw_init(draw))
+ goto fail;
+
+ return draw;
+
+fail:
+ draw_destroy( draw );
+ return NULL;
+}
+
+boolean draw_init(struct draw_context *draw)
+{
ASSIGN_4V( draw->plane[0], -1, 0, 0, 1 );
ASSIGN_4V( draw->plane[1], 1, 0, 0, 1 );
ASSIGN_4V( draw->plane[2], 0, -1, 0, 1 );
@@ -57,22 +69,18 @@ struct draw_context *draw_create( void )
if (!draw_pipeline_init( draw ))
- goto fail;
+ return FALSE;
if (!draw_pt_init( draw ))
- goto fail;
+ return FALSE;
if (!draw_vs_init( draw ))
- goto fail;
+ return FALSE;
if (!draw_gs_init( draw ))
- goto fail;
+ return FALSE;
- return draw;
-
-fail:
- draw_destroy( draw );
- return NULL;
+ return TRUE;
}