r300: respect radeon common code fallbacks
[mesa.git] / src / gallium / drivers / nv40 / nv40_state_scissor.c
index 285239ef419f715e257f91e69b5ed0703f4bc56d..753a505e934b13881a903960d4a10abeac4a9790 100644 (file)
@@ -12,7 +12,7 @@ nv40_state_scissor_validate(struct nv40_context *nv40)
                return FALSE;
        nv40->state.scissor_enabled = rast->scissor;
 
-       so = so_new(3, 0);
+       so = so_new(1, 2, 0);
        so_method(so, nv40->screen->curie, NV40TCL_SCISSOR_HORIZ, 2);
        if (nv40->state.scissor_enabled) {
                so_data  (so, ((s->maxx - s->minx) << 16) | s->minx);
@@ -23,6 +23,7 @@ nv40_state_scissor_validate(struct nv40_context *nv40)
        }
 
        so_ref(so, &nv40->state.hw[NV40_STATE_SCISSOR]);
+       so_ref(NULL, &so);
        return TRUE;
 }