summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-04-21 17:03:37 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-04-21 17:03:37 +0100
commit0d4ece4c5a243dc4b684331bad49f220311e5520 (patch)
tree8678f1241e5b47a6603da13b25a5844c92b8986c /src/gallium/auxiliary/draw/draw_pipe_aapoint.c
parent0cd90a917d289363a3edb5cfa40c391eb07aa97c (diff)
draw: propogate lots of errors
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_aapoint.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aapoint.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
index 6d689c36de..ac0aa4cd7c 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
@@ -783,13 +783,13 @@ aapoint_create_fs_state(struct pipe_context *pipe,
{
struct aapoint_stage *aapoint = aapoint_stage_from_pipe(pipe);
struct aapoint_fragment_shader *aafs = CALLOC_STRUCT(aapoint_fragment_shader);
+ if (aafs == NULL)
+ return NULL;
- if (aafs) {
- aafs->state = *fs;
+ aafs->state = *fs;
- /* pass-through */
- aafs->driver_fs = aapoint->driver_create_fs_state(aapoint->pipe, fs);
- }
+ /* pass-through */
+ aafs->driver_fs = aapoint->driver_create_fs_state(aapoint->pipe, fs);
return aafs;
}
@@ -830,6 +830,7 @@ draw_install_aapoint_stage(struct draw_context *draw,
{
struct aapoint_stage *aapoint;
+ pipe->draw = (void *) draw;
/*
* Create / install AA point drawing / prim stage
@@ -850,9 +851,10 @@ draw_install_aapoint_stage(struct draw_context *draw,
pipe->bind_fs_state = aapoint_bind_fs_state;
pipe->delete_fs_state = aapoint_delete_fs_state;
- pipe->draw = (void *) draw;
draw->pipeline.aapoint = &aapoint->stage;
+ return TRUE;
+
fail:
if (aapoint)
aapoint->stage.destroy( &aapoint->stage );