summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-02-29 15:38:43 -0700
committerBrian Paul <[email protected]>2008-02-29 15:38:43 -0700
commitc8bca8d8a94b7bce532b40fd5c422063632b26c4 (patch)
tree9529ba5e1fa84cb380e7eb150a783e4ca9319bdd /src/mesa/state_tracker
parent5240cebb23f4862f4f7458a1b397957e4460b527 (diff)
gallium: fix update_textures() bug in pipe_texture binding logic
The 'st' pointer might not have changed, but st->pt might have. The dirtyData flag will indicate when that's happened, so check it.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index a4ac7268160..0e1c396aeb2 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -67,7 +67,9 @@ update_textures(struct st_context *st)
* this table before being deleted, otherwise the pointer
* comparison below could fail.
*/
- if (st->state.sampler_texture[unit] != stObj) {
+ if (st->state.sampler_texture[unit] != stObj ||
+ (stObj && stObj->dirtyData)) {
+ /* should really test if the bound 'pt' is changing */
struct pipe_texture *pt = st_get_stobj_texture(stObj);
st->state.sampler_texture[unit] = stObj;
st->pipe->set_sampler_texture(st->pipe, unit, pt);