Module: Mesa
Branch: master
Commit: e4ca1d64565b4d665bcaf5d08922bfbe1d920e7a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4ca1d64565b4d665bcaf5d08922bfbe1d920e7a

Author: Neha Bhende <bhen...@vmware.com>
Date:   Mon Jan 22 15:01:20 2018 -0800

svga: Check rasterization state object before checking poly_stipple_enable

Sometimes rasterization state object could be empty. This is causing
segfault on hw8,9,10 for some traces.

This patch fixes enemy_territory_quake_wars_high,
enemy_territory_quake_wars_low, etqw-demo, lightsmark2008, quake1
glretrace crashes on hw 8,9,10.

Tested with mtt-glretrace and mtt-piglit.

Reviewed-by: Charmaine Lee <charmai...@vmware.com>
Reviewed-by: Brian Paul <bri...@vmware.com>

---

 src/gallium/drivers/svga/svga_state_tss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_state_tss.c 
b/src/gallium/drivers/svga/svga_state_tss.c
index 63f3c8c858..d598d23c4e 100644
--- a/src/gallium/drivers/svga/svga_state_tss.c
+++ b/src/gallium/drivers/svga/svga_state_tss.c
@@ -256,7 +256,7 @@ svga_reemit_tss_bindings(struct svga_context *svga)
    }
 
    /* Polygon stipple */
-   if (svga->curr.rast->templ.poly_stipple_enable) {
+   if (svga->curr.rast && svga->curr.rast->templ.poly_stipple_enable) {
       const unsigned unit = svga->state.hw_draw.fs->pstipple_sampler_unit;
       struct svga_hw_view_state *view = &svga->state.hw_draw.views[unit];
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to