diff options
author | Brian Paul <[email protected]> | 2012-08-10 12:16:10 -0600 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-10-24 11:41:05 -0700 |
commit | 620a1f973be89b35b11fbf074451601a05b621b6 (patch) | |
tree | 20dab3fd532f47cfb93860f0a7e28b7404185843 /src/gallium | |
parent | b28f4a0abd6bf5a5f023a7a37bd1b43dff1995bb (diff) |
softpipe: fix softpipe_delete_fs_state() failed assertion
The var!=softpipe->fs_variant assertion was failing because we weren't
nulling the softpipe->fs_variant pointer when binding a new shader.
Since softpipe->fs_variant depends on the current fs, it's of no use
when a new FS is bound.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53318
Note: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 16c702ef3b9cff320c2adbfa853e00088adbf689)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_shader.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_shader.c b/src/gallium/drivers/softpipe/sp_state_shader.c index 6acb57b3fe6..9551c58c7d9 100644 --- a/src/gallium/drivers/softpipe/sp_state_shader.c +++ b/src/gallium/drivers/softpipe/sp_state_shader.c @@ -158,8 +158,10 @@ softpipe_bind_fs_state(struct pipe_context *pipe, void *fs) softpipe->fs = fs; - if (fs == NULL) - softpipe->fs_variant = NULL; + /* This depends on the current fragment shader and must always be + * re-validated before use. + */ + softpipe->fs_variant = NULL; if (state) draw_bind_fragment_shader(softpipe->draw, |