summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-03-09 08:16:26 -0700
committerBrian Paul <brianp@vmware.com>2012-03-09 08:44:06 -0700
commit437ed1faaf6804b4d1c8396b8559c051f1e73aec (patch)
tree5c3d0669ed51e6d2e7cb0f2f1d1f6ce5855795bb
parentfa9efdbab8d605d986748260e1f5ef8066ced327 (diff)
svga: add null vs pointer check in update_need_pipeline()8.0
Based on a patch submitted by Vic Lee. The other part of his patch which checked the fs pointer wasn't needed. This fixes a crash when clear() is called before any VS or FS is set. But this can only happen when the driver is used without the Mesa state tracker. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <jfonseca@vmware.com> (cherry picked from commit 991798822346dbb2d741b1f6d62f4bcb2c889dc8)
-rw-r--r--src/gallium/drivers/svga/svga_state_need_swtnl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c
index 32355d136c..ce4db8da5d 100644
--- a/src/gallium/drivers/svga/svga_state_need_swtnl.c
+++ b/src/gallium/drivers/svga/svga_state_need_swtnl.c
@@ -136,7 +136,7 @@ update_need_pipeline( struct svga_context *svga,
/* EDGEFLAGS
*/
- if (vs->base.info.writes_edgeflag) {
+ if (vs && vs->base.info.writes_edgeflag) {
SVGA_DBG(DEBUG_SWTNL, "%s: edgeflags\n", __FUNCTION__);
need_pipeline = TRUE;
}