nouveau: rewrite nouveau_stateobj to use BEGIN_RING properly
[mesa.git] / src / gallium / drivers / nv30 / nv30_state_stipple.c
index 41b42813b496c505aafb1a1271976f3c6c68bbea..ed520a4f439cc5dc33174378bd53653b0991210b 100644 (file)
@@ -14,19 +14,20 @@ nv30_state_stipple_validate(struct nv30_context *nv30)
        if (rast->poly_stipple_enable) {
                unsigned i;
 
-               so = so_new(35, 0);
+               so = so_new(2, 33, 0);
                so_method(so, rankine, NV34TCL_POLYGON_STIPPLE_ENABLE, 1);
                so_data  (so, 1);
                so_method(so, rankine, NV34TCL_POLYGON_STIPPLE_PATTERN(0), 32);
                for (i = 0; i < 32; i++)
                        so_data(so, nv30->stipple[i]);
        } else {
-               so = so_new(2, 0);
+               so = so_new(1, 1, 0);
                so_method(so, rankine, NV34TCL_POLYGON_STIPPLE_ENABLE, 1);
                so_data  (so, 0);
        }
 
        so_ref(so, &nv30->state.hw[NV30_STATE_STIPPLE]);
+       so_ref(NULL, &so);
        return TRUE;
 }