diff options
author | Roland Scheidegger <[email protected]> | 2010-03-10 16:53:07 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-03-10 16:53:07 +0100 |
commit | 8c34437deda2ff8659fecdf3ea687820c9e57261 (patch) | |
tree | b3bfa4922b2b6b6dfd215e7e749daa09c2b49ce7 /src/gallium/drivers/cell | |
parent | c47c73293d359c00abb34c39d1163b4c55f531de (diff) |
cell: handle NULL cso vertex_elements state object on bind
drivers need to handle NULL cso vertex elements (and others) objects.
It is possible the cso code saves/restores NULL objects (if no normal
cso object was bound before this was invoked).
This led to segfaults (for example demos/cubemap) for apps which were using
things like creating mipmaps before drawing anything.
Diffstat (limited to 'src/gallium/drivers/cell')
-rw-r--r-- | src/gallium/drivers/cell/ppu/cell_state_vertex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_state_vertex.c b/src/gallium/drivers/cell/ppu/cell_state_vertex.c index d3efb8ecea2..9510ea9ac2b 100644 --- a/src/gallium/drivers/cell/ppu/cell_state_vertex.c +++ b/src/gallium/drivers/cell/ppu/cell_state_vertex.c @@ -62,7 +62,8 @@ cell_bind_vertex_elements_state(struct pipe_context *pipe, cell->dirty |= CELL_NEW_VERTEX; - draw_set_vertex_elements(cell->draw, cell_velems->count, cell_velems->velem); + if (cell_velems) + draw_set_vertex_elements(cell->draw, cell_velems->count, cell_velems->velem); } void |