summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_state_sampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_state_sampler.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_state_sampler.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state_sampler.c b/src/mesa/pipe/softpipe/sp_state_sampler.c
index 6b422acfb6c..060e2c8c987 100644
--- a/src/mesa/pipe/softpipe/sp_state_sampler.c
+++ b/src/mesa/pipe/softpipe/sp_state_sampler.c
@@ -43,7 +43,22 @@ softpipe_set_sampler_state(struct pipe_context *pipe,
{
struct softpipe_context *softpipe = softpipe_context(pipe);
+ assert(unit < PIPE_MAX_SAMPLERS);
softpipe->sampler[unit] = *sampler;
softpipe->dirty |= G_NEW_SAMPLER;
}
+
+
+void
+softpipe_set_texture_state(struct pipe_context *pipe,
+ GLuint unit,
+ struct pipe_texture_object *texture)
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+
+ assert(unit < PIPE_MAX_SAMPLERS);
+ softpipe->texture[unit] = texture; /* ptr, not struct */
+
+ softpipe->dirty |= G_NEW_TEXTURE;
+}