+ if (!setup->fb.cbuf && !setup->fb.zsbuf) {
+ setup->fb.width = 0;
+ setup->fb.height = 0;
+ }
+ else if (!setup->fb.zsbuf) {
+ setup->fb.width = setup->fb.cbuf->width;
+ setup->fb.height = setup->fb.cbuf->height;
+ }
+ else if (!setup->fb.cbuf) {
+ setup->fb.width = setup->fb.zsbuf->width;
+ setup->fb.height = setup->fb.zsbuf->height;
+ }
+ else {
+ /* XXX: not sure what we're really supposed to do for
+ * mis-matched color & depth buffer sizes.
+ */
+ setup->fb.width = MIN2(setup->fb.cbuf->width,
+ setup->fb.zsbuf->width);
+ setup->fb.height = MIN2(setup->fb.cbuf->height,
+ setup->fb.zsbuf->height);
+ }
+
+ setup->tiles_x = align(setup->fb.width, TILESIZE);
+ setup->tiles_y = align(setup->fb.height, TILESIZE);
+