diff options
author | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-05-28 12:42:42 +0200 |
---|---|---|
committer | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-05-28 12:42:42 +0200 |
commit | 938d9d596324e411fde5312f2bb65b444c502c37 (patch) | |
tree | f32087f7c61f0827980278a5dae2b32edf534b72 /src/gallium/drivers/softpipe/sp_context.c | |
parent | 5d90f97f48f8ba231d52bb1a4758dd37f81ec8d6 (diff) | |
parent | 7b85ea19de09d4e7e077ca147528e90e52683690 (diff) |
Merge branch 'gallium-vertex-linear' into gallium-0.1
Conflicts:
src/gallium/auxiliary/draw/draw_pt_varray.c
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_context.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 2af0db3714..531bd76963 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -88,7 +88,8 @@ static void softpipe_destroy( struct pipe_context *pipe ) struct pipe_winsys *ws = pipe->winsys; uint i; - draw_destroy( softpipe->draw ); + if (softpipe->draw) + draw_destroy( softpipe->draw ); softpipe->quad.polygon_stipple->destroy( softpipe->quad.polygon_stipple ); softpipe->quad.earlyz->destroy( softpipe->quad.earlyz ); @@ -216,8 +217,12 @@ softpipe_create( struct pipe_screen *screen, * Create drawing context and plug our rendering stage into it. */ softpipe->draw = draw_create(); - assert(softpipe->draw); + if (!softpipe->draw) + goto fail; + softpipe->setup = sp_draw_render_stage(softpipe); + if (!softpipe->setup) + goto fail; if (GETENV( "SP_NO_RAST" ) != NULL) softpipe->no_rast = TRUE; @@ -241,4 +246,8 @@ softpipe_create( struct pipe_screen *screen, sp_init_surface_functions(softpipe); return &softpipe->pipe; + + fail: + softpipe_destroy(&softpipe->pipe); + return NULL; } |