summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i915/i915_state.c3
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_sampler.c21
-rw-r--r--src/gallium/drivers/softpipe/sp_state_sampler.c14
3 files changed, 20 insertions, 18 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index c5ec0c6c076..8af26fa9dc5 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -325,6 +325,7 @@ i915_bind_vertex_sampler_states(struct pipe_context *pipe,
i915->num_vertex_samplers = num_samplers;
draw_set_samplers(i915->draw,
+ PIPE_SHADER_VERTEX,
i915->vertex_samplers,
i915->num_vertex_samplers);
}
@@ -405,6 +406,7 @@ i915_prepare_vertex_sampling(struct i915_context *i915)
}
draw_set_mapped_texture(i915->draw,
+ PIPE_SHADER_VERTEX,
i,
tex->width0, tex->height0, tex->depth0,
view->u.tex.first_level, tex->last_level,
@@ -792,6 +794,7 @@ i915_set_vertex_sampler_views(struct pipe_context *pipe,
i915->num_vertex_sampler_views = num;
draw_set_sampler_views(i915->draw,
+ PIPE_SHADER_VERTEX,
i915->vertex_sampler_views,
i915->num_vertex_sampler_views);
}
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,
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;