From 89d8577fb3036547ef0b47498cc8dc5c77f886e0 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Mon, 14 Dec 2009 17:11:46 -0500 Subject: gallium: add geometry shader support to gallium --- src/gallium/state_trackers/python/p_context.i | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/gallium/state_trackers/python/p_context.i') diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i index 9728207d9c..3c35e6f745 100644 --- a/src/gallium/state_trackers/python/p_context.i +++ b/src/gallium/state_trackers/python/p_context.i @@ -103,6 +103,25 @@ struct st_context { $self->vs = vs; } + void set_geometry_shader( const struct pipe_shader_state *state ) { + void *gs; + + if(!state) { + cso_set_geometry_shader_handle($self->cso, NULL); + return; + } + + gs = $self->pipe->create_gs_state($self->pipe, state); + if(!gs) + return; + + if(cso_set_geometry_shader_handle($self->cso, gs) != PIPE_OK) + return; + + cso_delete_geometry_shader($self->cso, $self->gs); + $self->gs = gs; + } + /* * Parameter-like state (or properties) */ -- cgit v1.2.3