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 <charmainel@vmware.com>
This commit is contained in:
Brian Paul
2017-12-28 09:16:44 -07:00
parent be5153fbee
commit e0eaeef3e7
@@ -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;
}
}