nv40: track current scissor enable/disable state
authorBen Skeggs <skeggsb@gmail.com>
Sun, 30 Mar 2008 20:35:43 +0000 (06:35 +1000)
committerBen Skeggs <skeggsb@gmail.com>
Sun, 30 Mar 2008 20:39:03 +0000 (06:39 +1000)
Not sure how this was forgotten :)  Anyhow, fixes gearbox/bzflag/xmoto,
probably other things that use scissored clears / hit the nasty
clear-with-quad path.

src/gallium/drivers/nv40/nv40_state_scissor.c

index 9e9eadc511673536335ad4a1a778745e38e9561e..285239ef419f715e257f91e69b5ed0703f4bc56d 100644 (file)
@@ -10,10 +10,11 @@ nv40_state_scissor_validate(struct nv40_context *nv40)
        if (nv40->state.hw[NV40_STATE_SCISSOR] &&
            (rast->scissor == 0 && nv40->state.scissor_enabled == 0))
                return FALSE;
+       nv40->state.scissor_enabled = rast->scissor;
 
        so = so_new(3, 0);
        so_method(so, nv40->screen->curie, NV40TCL_SCISSOR_HORIZ, 2);
-       if (rast->scissor) {
+       if (nv40->state.scissor_enabled) {
                so_data  (so, ((s->maxx - s->minx) << 16) | s->minx);
                so_data  (so, ((s->maxy - s->miny) << 16) | s->miny);
        } else {