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.
This commit is contained in:
Brian Paul
2012-08-09 20:59:43 -06:00
parent a8ed00d5f1
commit df87fb5913
5 changed files with 51 additions and 37 deletions

View File

@@ -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;