nv40: use num_cbufs
authorBen Skeggs <skeggsb@gmail.com>
Fri, 21 Mar 2008 10:17:57 +0000 (21:17 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Fri, 21 Mar 2008 10:18:16 +0000 (21:18 +1100)
src/gallium/drivers/nv40/nv40_state_fb.c

index 107b4400283aea5579d2756a2e2f0423018dfe38..93b79377c92100f907ff50bf3a22750e46d771ad 100644 (file)
@@ -13,10 +13,7 @@ nv40_state_framebuffer_validate(struct nv40_context *nv40)
        unsigned h = fb->height;
 
        rt_enable = 0;
-       for (i = 0; i < 4; i++) {
-               if (!fb->cbufs[i])
-                       continue;
-
+       for (i = 0; i < fb->num_cbufs; i++) {
                if (colour_format) {
                        assert(colour_format == fb->cbufs[i]->format);
                } else {