summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_derived.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-09-29 12:05:19 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-09-29 14:16:35 +0100
commitfdcc168a16d59bf2b7fd291383f214834c2546f6 (patch)
tree7d2a291fada15ea0174d0524ceb2f0622f94a4c7 /src/gallium/drivers/llvmpipe/lp_state_derived.c
parent4b70fe8421f5132c585ff1dfb8d90229be26e71f (diff)
llvmpipe: Decouple sampler view and sampler state updates.
Fixes glean pbo crash. It would be possible to avoid crashing without decoupling, but given that state trackers give no guarantee that number of views is consistent, that would likely cause too many state updates (or miss some).
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_derived.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_derived.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c
index d2be22d7fc..bb059d0459 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -208,11 +208,14 @@ void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
lp_setup_set_fs_constants(llvmpipe->setup,
llvmpipe->constants[PIPE_SHADER_FRAGMENT][0]);
- if (llvmpipe->dirty & (LP_NEW_SAMPLER_VIEW |
- LP_NEW_SAMPLER))
+ if (llvmpipe->dirty & (LP_NEW_SAMPLER_VIEW))
lp_setup_set_fragment_sampler_views(llvmpipe->setup,
llvmpipe->num_fragment_sampler_views,
- llvmpipe->fragment_sampler_views,
+ llvmpipe->fragment_sampler_views);
+
+ if (llvmpipe->dirty & (LP_NEW_SAMPLER))
+ lp_setup_set_fragment_sampler_state(llvmpipe->setup,
+ llvmpipe->num_samplers,
llvmpipe->sampler);
llvmpipe->dirty = 0;