# Copyright (c) 2001, Stanford University # All rights reserved # # See the file LICENSE.txt for information on redistributing this software. import sys sys.path.append( "../server" ) from mothership import * cr = CR() cr.MTU( 1024*1024 ) TILE_COLS = 3 TILE_ROWS = 3 ACTUAL_COLS=3 ACTUAL_ROWS=3 TILE_WIDTH = 1280 TILE_HEIGHT = 1024 TILES = [ (231, 0, 2048 ), (211, 1280, 2048 ), (121, 2560, 2048 ), (141, 0, 1024 ), (131, 1280, 1024 ), (111, 2560, 1024 ), (232, 0, 0 ), (212, 1280, 0 ), (122, 2560, 0 ), ] tilesortspu = SPU( 'tilesort' ) tilesortspu.Conf( 'bucket_mode', 'Test All Tiles' ) tilesortspu.Conf( 'fake_window_dims', [256, 256] ) clientnode = CRApplicationNode( 'boba142' ) clientnode.ClientDLL( os.path.join(crlibdir,'libcrfaker.so') ) clientnode.SPUDir( crlibdir ) clientnode.SetApplication( sys.argv[1] ) clientnode.AddSPU( tilesortspu ) for row in range(TILE_ROWS): for col in range(TILE_COLS): (machine, x, y) = TILES[row*ACTUAL_COLS + col] node = CRNetworkNode( 'boba%d' % machine ) node.AddTile( x, y, TILE_WIDTH, TILE_HEIGHT ) renderspu = SPU( 'render' ) renderspu.Conf( 'window_geometry', [0, 0, TILE_WIDTH, TILE_HEIGHT] ) node.AddSPU( renderspu ) node.SPUDir( crlibdir ) cr.AddNode( node ) tilesortspu.AddServer( node, protocol='tcpip', port=8007 ) cr.AllSPUConf( 'render', 'stencil_bits', 8,9,10,11 ) cr.AddNode( clientnode ) cr.Go()