summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-02-23 01:16:54 +0100
committerRoland Scheidegger <[email protected]>2013-02-25 20:38:23 +0100
commitc0ba1080df4fa75ba23f254f2f998c97af70764b (patch)
tree97351c207ee53478c5dc02a604875423380629ef /src/gallium/auxiliary/draw
parent20183177a5803317fe69f1f1a8dfae4d18b3702f (diff)
draw: make sure pipeline is revalidated when sampler views or samplers change.
Since with llvm execution parts of sampler view and sampler state is baked into the shader, we need to revalidate otherwise the wrong shader might get used. (Not completely sure but I think this would not be required for non-llvm case, along with everything else in these functions.) This caused bugs in piglit arb_texture_buffer_object-formats, because we never noticed that the view format changed. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 5020081b767..045bb6b2ae8 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -764,6 +764,8 @@ draw_set_sampler_views(struct draw_context *draw,
debug_assert(shader_stage < PIPE_SHADER_TYPES);
debug_assert(num <= PIPE_MAX_SHADER_SAMPLER_VIEWS);
+ draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
+
for (i = 0; i < num; ++i)
draw->sampler_views[shader_stage][i] = views[i];
for (i = num; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; ++i)
@@ -783,6 +785,8 @@ draw_set_samplers(struct draw_context *draw,
debug_assert(shader_stage < PIPE_SHADER_TYPES);
debug_assert(num <= PIPE_MAX_SAMPLERS);
+ draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
+
for (i = 0; i < num; ++i)
draw->samplers[shader_stage][i] = samplers[i];
for (i = num; i < PIPE_MAX_SAMPLERS; ++i)