u_blitter: add a msaa parameter to util_blitter_clear
[mesa.git] / src / gallium / drivers / svga / svga_state_tss.c
index 63f3c8c8583bfad38902ea6a8380710c44b63db5..95b1a9e952dc5fcb00649b3eeed9445fbcd7b119 100644 (file)
@@ -50,8 +50,8 @@ svga_cleanup_tss_binding(struct svga_context *svga)
       struct svga_hw_view_state *view = &svga->state.hw_draw.views[i];
       if (view) {
          svga_sampler_view_reference(&view->v, NULL);
-         pipe_sampler_view_release(&svga->pipe,
-                                   &svga->curr.sampler_views[shader][i]);
+         pipe_sampler_view_reference(&svga->curr.sampler_views[shader][i],
+                                     NULL);
          pipe_resource_reference(&view->texture, NULL);
          view->dirty = TRUE;
       }
@@ -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];