diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-08-19 19:11:36 +0100 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-08-19 21:35:06 +0100 |
commit | 9adfc57a4c4deeb86d8f62491b94d6a44586eb1e (patch) | |
tree | 6f41b693efd2b15fcc2de905b4b20b947ba9603c | |
parent | 5f1ef11ad2e3016ac4029489d9429d7f93737fe5 (diff) | |
download | external_mesa3d-9adfc57a4c4deeb86d8f62491b94d6a44586eb1e.zip external_mesa3d-9adfc57a4c4deeb86d8f62491b94d6a44586eb1e.tar.gz external_mesa3d-9adfc57a4c4deeb86d8f62491b94d6a44586eb1e.tar.bz2 |
python: Handle null state.
-rw-r--r-- | src/gallium/state_trackers/python/p_context.i | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i index 535783b..496f738 100644 --- a/src/gallium/state_trackers/python/p_context.i +++ b/src/gallium/state_trackers/python/p_context.i @@ -68,6 +68,11 @@ struct st_context { void set_fragment_shader( const struct pipe_shader_state *state ) { void *fs; + if(!state) { + cso_set_fragment_shader_handle($self->cso, NULL); + return; + } + fs = $self->pipe->create_fs_state($self->pipe, state); if(!fs) return; @@ -82,6 +87,11 @@ struct st_context { void set_vertex_shader( const struct pipe_shader_state *state ) { void *vs; + if(!state) { + cso_set_vertex_shader_handle($self->cso, NULL); + return; + } + vs = $self->pipe->create_vs_state($self->pipe, state); if(!vs) return; |