[Mesa-dev] [PATCH] svga: add null vs pointer check in update_need_pipeline()
Brian Paul
brianp at vmware.com
Fri Mar 9 07:19:26 PST 2012
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.
---
src/gallium/drivers/svga/svga_state_need_swtnl.c | 2 +-
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 32355d1..ce4db8d 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;
}
--
1.7.3.4
More information about the mesa-dev
mailing list