diff options
author | Brian Paul <[email protected]> | 2017-12-28 09:16:44 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-12-28 09:49:31 -0700 |
commit | e0eaeef3e7b5671a231644373c722ebd09d6765d (patch) | |
tree | 3cff11745690df5652013c5d0ba9eefd2b60c2b5 /src/gallium/drivers/svga/svga_state_sampler.c | |
parent | be5153fbee4925b0e6e46e008f49e36606215dc8 (diff) |
svga: check for null fs pointer in update_samplers()
This can happen when there's no active fragment shader, such as
when using transform feedback. This wasn't hit by any Piglit test
but is hit by Daniel Rákos' Nature demo. VMware bug 2026189.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_sampler.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_state_sampler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_state_sampler.c b/src/gallium/drivers/svga/svga_state_sampler.c index 9bd0d5303bd..11f36e3553b 100644 --- a/src/gallium/drivers/svga/svga_state_sampler.c +++ b/src/gallium/drivers/svga/svga_state_sampler.c @@ -399,7 +399,7 @@ update_samplers(struct svga_context *svga, unsigned dirty ) * for this texture unit, don't enable shadow compare in * the texture sampler state. */ - if (fs->fs_shadow_compare_units & (1 << i)) { + if (fs && (fs->fs_shadow_compare_units & (1 << i))) { fs_shadow = true; } } |