summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/softpipe/sp_fs_exec.c11
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_fs.c7
-rw-r--r--src/gallium/drivers/softpipe/sp_state_derived.c6
3 files changed, 10 insertions, 14 deletions
diff --git a/src/gallium/drivers/softpipe/sp_fs_exec.c b/src/gallium/drivers/softpipe/sp_fs_exec.c
index 779b8c4995c..f5344924a1d 100644
--- a/src/gallium/drivers/softpipe/sp_fs_exec.c
+++ b/src/gallium/drivers/softpipe/sp_fs_exec.c
@@ -66,14 +66,11 @@ exec_prepare( const struct sp_fragment_shader_variant *var,
{
/*
* Bind tokens/shader to the interpreter's machine state.
- * Avoid redundant binding.
*/
- if (machine->Tokens != var->tokens) {
- tgsi_exec_machine_bind_shader( machine,
- var->tokens,
- PIPE_MAX_SAMPLERS,
- samplers );
- }
+ tgsi_exec_machine_bind_shader(machine,
+ var->tokens,
+ PIPE_MAX_SAMPLERS,
+ samplers);
}
diff --git a/src/gallium/drivers/softpipe/sp_quad_fs.c b/src/gallium/drivers/softpipe/sp_quad_fs.c
index 892d9c6c11d..f32fe5f4068 100644
--- a/src/gallium/drivers/softpipe/sp_quad_fs.c
+++ b/src/gallium/drivers/softpipe/sp_quad_fs.c
@@ -148,13 +148,6 @@ shade_quads(struct quad_stage *qs,
static void
shade_begin(struct quad_stage *qs)
{
- struct softpipe_context *softpipe = qs->softpipe;
-
- softpipe->fs_variant->prepare( softpipe->fs_variant,
- softpipe->fs_machine,
- (struct tgsi_sampler **)
- softpipe->tgsi.samplers_list[PIPE_SHADER_FRAGMENT] );
-
qs->next->begin(qs->next);
}
diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c
index cb954a17ef6..e4a5a632097 100644
--- a/src/gallium/drivers/softpipe/sp_state_derived.c
+++ b/src/gallium/drivers/softpipe/sp_state_derived.c
@@ -242,6 +242,12 @@ update_fragment_shader(struct softpipe_context *softpipe, unsigned prim)
if (softpipe->fs) {
softpipe->fs_variant = softpipe_find_fs_variant(softpipe,
softpipe->fs, &key);
+
+ /* prepare the TGSI interpreter for FS execution */
+ softpipe->fs_variant->prepare(softpipe->fs_variant,
+ softpipe->fs_machine,
+ (struct tgsi_sampler **) softpipe->
+ tgsi.samplers_list[PIPE_SHADER_FRAGMENT]);
}
else {
softpipe->fs_variant = NULL;