RE: readback + tilesort

"Joong Ho \(Johann\) Won" <[email protected]>
Newsgroups gmane.comp.graphics.chromium.devel
Message-ID <[email protected]>
(For dmx-devel subscribers, please refer to the included quotes to know the
history.)

The patch worked. Thanks Brian!
Now I'm trying to move on to DMX.
It somehow renders to the application window, but I doubt if it's working
correctly.
Below is the current configuration:

DMX setup: 1x2 horizontal wall
Test script : modified autodmx.conf
Test app : atlantis

When the window crosses the border, the same portion is rendered to both
displays. It is much like the previous symptom without DMX, but in this case
tile size can be asymmetric.
Most of all, in the crserver debug log, nothing is reported about the tile
size info.
In conventional DMX+CR setup (e.g. autodmx.conf + .crconfig), the log is
updated whenever the window crosses the border.

I attach the test .conf file which I use.
Since it is derived from autodmx.conf, I hope it can be used without
modification on usual DMX configuration.

Thanks in advance.

- johann.

-----Original Message-----
From: Brian Paul [mailto:[email protected]]
Sent: Wednesday, July 28, 2004 2:57 PM
To: Joong Ho (Johann) Won
Cc: [email protected]
Subject: Re: [Chromium-dev] readback + tilesort


Joong Ho (Johann) Won wrote:
> Hi,
>
> I'm testing a combination of readback and tilesort SPUs, of which the
> ultimate purpose is to let sort-last parallel apps be able to render on a
> DMX mural display. I wrote a simple test script for the first step, which
is
> a very simple modification of simplemural.conf.
> Simplemural.conf uses a tilesort SPU to render an app in two seperate
> (possibly remote) windows.
> My intension is just to add a readback SPU on top of the tilesort SPU. At
> this stage, it has nothing to do with DMX.
>
> What should be rendered must be the same as that of the original
> simplemural.conf, but it is not.
> SAME part of the application window is rendered on both of the crserver
> windows, i.e. the left half.
>
> Configuration for readback is the simplest, as will be shown below.
> Mike Houston's guess is that there may be a bug in arguments for
DrawPixels.
> Even worse is that when the 'extract_depth' option is turned on, nothing
is
> drawn at all.
>
> Below is my modified simplemural.conf script. Only a few lines related
with
> readbackSPU are added and without these, everything works fine.
>
> Thanks in advance for any comment.

I found the problem.  On the server side, the initial current raster
position needs to be translated by the origin of the server's tile.
Normally, the first call to glRasterPos/glWindowPos would set it
correctly, but the tilesort SPU's state tracker was filtering out that
state change.

Try applying this patch to crserverlib/server_context.c

-Brian
readback_dmx.conf (application/octet-stream, 3 KB)
# Copyright (c) 2001, Stanford University
# All rights reserved
#
# See the file LICENSE.txt for information on redistributing this software.

#
#  1. The back-end/cluster machines must have the crserver binary in the
#     search path (typically /usr/local/bin or /usr/bin) and a properly
#     set LD_LIBRARY_PATH (you can tweak it below).
#
#  2. ssh to the back-end/cluster machines must work.
#

# Change this line to the location of your Chromium installation.
#crdir = "/home/sourceforge/Chromium-dmx/cr"

import random
import sys
sys.path.append( "../server" )
from mothership import *

Demo = 'atlantis'
program = os.path.join(crbindir, Demo)

cr = CR()
cr.MTU( 10*1024*1024 )

# Call dmx_config to get information about the DMX tile layout.
import os
dmx = os.popen("%s/dmx_config 2>/dev/null"%crbindir).read()
if not dmx:
    print "Chromium mothership error: Chromium does not appear to have"
    print "Chromium mothership error: been compiled with DMX support."
    sys.exit(1)
dmx = eval(dmx)
if not dmx:
    print "Chromium mothership error: DMX does not appear to be running."
    sys.exit(1)

localHostname = os.uname()[1]

# choose random port for server communication
serverPort = random.randint(7000, 7100)

#AUTOSTART = 1
AUTOSTART = 0

WIDTH=512
HEIGHT=200
NODES='tcpip://localhost,tcpip://localhost'
#resizable='1'
resizable='0'

# These values don't really matter!
TILE_WIDTH = 550
TILE_HEIGHT = 550

# Set up first app/client node
appnode1 = CRApplicationNode()
# Set this node as the one to actually call SwapBuffers
appnode1.SetApplication( program )
appnode1.StartDir( crbindir )
spu = SPU('readback')
spu.Conf('window_geometry', [0, 0, WIDTH, HEIGHT])
#spu.Conf('extract_depth', '1')
#spu.Conf('resizable', resizable)
spu.Conf('title', 'readback SPU node 0')
appnode1.AddSPU( spu )
# Tilesort spu
tilesortspu = SPU('tilesort')
tilesortspu.Conf('use_dmx', 1)
tilesortspu.Conf('retile_on_resize', 1)  # the default
tilesortspu.Conf('bucket_mode', 'Non-Uniform Grid')
tilesortspu.Conf('draw_bbox', 0 )
tilesortspu.Conf('bbox_scale', 1.0 )
tilesortspu.Conf('dlist_state_tracking', 0 )
#tilesortspu.Conf('fake_window_dims', [ WIDTH, HEIGHT ] )
appnode1.AddSPU( tilesortspu )


# set up display nodes (tiles)
n=0;
for tile in dmx:
    renderspu = SPU( 'render' )
    host = tile['display'].split(':')[0]
    renderspu.Conf('display_string', tile['display'])
    renderspu.Conf('render_to_app_window', 1)

    servernode = CRNetworkNode( host )
    servernode.AddTile( 0, 0, tile['width'], tile['height'])
    servernode.AddSPU( renderspu )

    # optimize_bucket is of no use w/ DMX.
    servernode.Conf('optimize_bucket', 0)
    servernode.Conf('use_dmx', 1)
    cr.AddNode( servernode )

    if AUTOSTART:
        servernode.AutoStart( ["/usr/bin/ssh", host,
                                "/bin/sh -c 'DISPLAY=:0.0  LD_LIBRARY_PATH=%s %s/crserver -mothership %s:%d'" % (crlibdir, crbindir, localHostname, mothershipPort) ] )

    tilesortspu.AddServer( servernode, protocol='tcpip', port=7010+n )
    n = n + 1

cr.AddNode( appnode1 )
#cr.Go( mothershipPort )
cr.Go()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.