diff options
author | Brian Paul <[email protected]> | 2012-08-09 20:59:43 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-08-16 09:01:31 -0600 |
commit | df87fb59136eb302d72eac4b58fd8ffb25989ed5 (patch) | |
tree | 43bb960f0b5cadf1657294c1ea1368793a2de61c /src/gallium/drivers/softpipe | |
parent | a8ed00d5f13d7b016bc2ea56f130adc3fa857cc8 (diff) |
gallium: add a shader stage/type param to some draw functions
To prepare for geometry shader texture support in the draw module.
Note: we still only handle the vertex shader case.
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_sampler.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c index 93ae9178928..fe33508a332 100644 --- a/src/gallium/drivers/softpipe/sp_state_sampler.c +++ b/src/gallium/drivers/softpipe/sp_state_sampler.c @@ -90,10 +90,11 @@ softpipe_bind_sampler_states(struct pipe_context *pipe, softpipe->num_samplers[shader] = num; - if (shader == PIPE_SHADER_VERTEX) { + if (shader == PIPE_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) { draw_set_samplers(softpipe->draw, - softpipe->samplers[PIPE_SHADER_VERTEX], - softpipe->num_samplers[PIPE_SHADER_VERTEX]); + shader, + softpipe->samplers[shader], + softpipe->num_samplers[shader]); } softpipe->dirty |= SP_NEW_SAMPLER; @@ -183,10 +184,11 @@ softpipe_set_sampler_views(struct pipe_context *pipe, softpipe->num_sampler_views[shader] = num; - if (shader == PIPE_SHADER_VERTEX) { + if (shader == PIPE_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) { draw_set_sampler_views(softpipe->draw, - softpipe->sampler_views[PIPE_SHADER_VERTEX], - softpipe->num_sampler_views[PIPE_SHADER_VERTEX]); + shader, + softpipe->sampler_views[shader], + softpipe->num_sampler_views[shader]); } softpipe->dirty |= SP_NEW_TEXTURE; |