Re: readback + tilesort

Brian Paul <[email protected]>
Newsgroups gmane.comp.graphics.chromium.devel
Message-ID <[email protected]>
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
patch (text/plain, 876 B)
Index: server_context.c
===================================================================
RCS file: /cvsroot/chromium/cr/crserverlib/server_context.c,v
retrieving revision 1.11
diff -c -r1.11 server_context.c
*** server_context.c	7 May 2004 17:02:46 -0000	1.11
--- server_context.c	28 Jul 2004 21:51:53 -0000
***************
*** 158,163 ****
--- 158,172 ----
  		cr_server.firstCallMakeCurrent = GL_FALSE;
  		cr_server.currentWindow = window;
  		cr_server.currentNativeWindow = nativeWindow;
+ 
+ 		/* Set initial raster/window position for this context.
+ 		 * The position has to be biased by the tile origin.
+ 		 */
+ 		{
+ 			GLint x = -mural->extents[0].imagewindow.x1;
+ 			GLint y = -mural->extents[0].imagewindow.y1;
+ 			cr_server.head_spu->dispatch_table.WindowPos2iARB(x, y);
+ 		}
  	}
  
  	/* This used to be earlier, after crStateUpdateColorBits() call */
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.