summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-08-09 20:59:43 -0600
committerBrian Paul <[email protected]>2012-08-16 09:01:31 -0600
commitdf87fb59136eb302d72eac4b58fd8ffb25989ed5 (patch)
tree43bb960f0b5cadf1657294c1ea1368793a2de61c /src/gallium/drivers/llvmpipe
parenta8ed00d5f13d7b016bc2ea56f130adc3fa857cc8 (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/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_sampler.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
index 604a42e6cd0..121569ede73 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
@@ -88,13 +88,11 @@ llvmpipe_bind_sampler_states(struct pipe_context *pipe,
llvmpipe->num_samplers[shader] = num;
- /* XXX call draw_set_samplers() here for geometry shaders once
- * draw_set_samplers() is extended to accept a shader argument.
- */
- if (shader == PIPE_SHADER_VERTEX) {
+ if (shader == PIPE_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) {
draw_set_samplers(llvmpipe->draw,
- llvmpipe->samplers[PIPE_SHADER_VERTEX],
- llvmpipe->num_samplers[PIPE_SHADER_VERTEX]);
+ shader,
+ llvmpipe->samplers[shader],
+ llvmpipe->num_samplers[shader]);
}
llvmpipe->dirty |= LP_NEW_SAMPLER;
@@ -150,13 +148,11 @@ llvmpipe_set_sampler_views(struct pipe_context *pipe,
llvmpipe->num_sampler_views[shader] = num;
- /* XXX call draw_set_sampler_views() here for geometry shaders once
- * draw_set_sampler_views() is extended to accept a shader argument.
- */
- if (shader == PIPE_SHADER_VERTEX) {
+ if (shader == PIPE_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) {
draw_set_sampler_views(llvmpipe->draw,
- llvmpipe->sampler_views[PIPE_SHADER_VERTEX],
- llvmpipe->num_sampler_views[PIPE_SHADER_VERTEX]);
+ shader,
+ llvmpipe->sampler_views[shader],
+ llvmpipe->num_sampler_views[shader]);
}
llvmpipe->dirty |= LP_NEW_SAMPLER_VIEW;
@@ -279,6 +275,7 @@ llvmpipe_prepare_vertex_sampling(struct llvmpipe_context *lp,
assert(data[0]);
}
draw_set_mapped_texture(lp->draw,
+ PIPE_SHADER_VERTEX,
i,
tex->width0, tex->height0, tex->depth0,
view->u.tex.first_level, tex->last_level,