DRI2: check for swapAvailable before using swap interval protocol
[mesa.git] / src / gallium / drivers / nv30 / nv30_state_scissor.c
index 1db9bc1795547d063ea0b1e0282d1a46ec446881..ba61a9e24a478cf2298d5afc7282a18ec03094c3 100644 (file)
@@ -12,7 +12,7 @@ nv30_state_scissor_validate(struct nv30_context *nv30)
                return FALSE;
        nv30->state.scissor_enabled = rast->scissor;
 
-       so = so_new(3, 0);
+       so = so_new(1, 2, 0);
        so_method(so, nv30->screen->rankine, NV34TCL_SCISSOR_HORIZ, 2);
        if (nv30->state.scissor_enabled) {
                so_data  (so, ((s->maxx - s->minx) << 16) | s->minx);
@@ -23,6 +23,7 @@ nv30_state_scissor_validate(struct nv30_context *nv30)
        }
 
        so_ref(so, &nv30->state.hw[NV30_STATE_SCISSOR]);
+       so_ref(NULL, &so);
        return TRUE;
 }