diff options
author | José Fonseca <[email protected]> | 2010-03-10 07:23:29 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-03-10 07:23:29 +0000 |
commit | eeaa0861bfc98a06ceec269801271b7453c4fcbd (patch) | |
tree | ae685b4727b7f73d004a2b014745cd09720019ae /src/gallium/drivers/llvmpipe | |
parent | ed7f73e161b93b4a83bb6ad6b6aa6cfcb65dc4b0 (diff) |
llvmpipe: Cope with null Vertex element cso.
CSO can often be null.
For example:
1. at initialization
2. using an util module (u_blit) right after initialization (it will push
state and pop the previous null state)
3. at shutdown time (state shouldn't be bound when being destroyed)
Glean was hitting 2.
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_vertex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_vertex.c b/src/gallium/drivers/llvmpipe/lp_state_vertex.c index 2ddd110a5f9..f6427aa908e 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_vertex.c +++ b/src/gallium/drivers/llvmpipe/lp_state_vertex.c @@ -61,7 +61,8 @@ llvmpipe_bind_vertex_elements_state(struct pipe_context *pipe, llvmpipe->dirty |= LP_NEW_VERTEX; - draw_set_vertex_elements(llvmpipe->draw, lp_velems->count, lp_velems->velem); + if (velems) + draw_set_vertex_elements(llvmpipe->draw, lp_velems->count, lp_velems->velem); } void |