--- Leif Delgass <[EMAIL PROTECTED]> wrote: > On Mon, 8 Jul 2002, Leif Delgass wrote: > > > On Mon, 8 Jul 2002, Brian Paul wrote: > > > The driver should assume the second case. swrast->Driver.SetReadBuffer() > > > will get called for the first case, as needed. > > > > I missed this comment before. If we assume the second case, we'd change > > the ReadBuffer (mmesa->readOffset in the driver) whenever > > ctx->Driver.SetDrawBuffer() is called, right? And you're saying that > > swrast->Driver.SetReadBuffer() will be called to change to the real > > ReadBuffer for glReadPixels, right? Would Mesa then call > > ctx->Driver.SetDrawBuffer() again to set the state back to ReadBuffer = > > DrawBuffer for software rendering? > > I just tried making the driver set readOffset/Pitch = drawOffset/Pitch in > SetDrawBuffer and it seems to work so far. If I put a glReadPixels into > Graham's test program after the glDrawBuffer(GL_FRONT), the ReadBuffer is > changed to GL_BACK before the ReadPixels and then changed back to GL_FRONT > afterwards by Mesa! It looks to me like all the DRI drivers should be > doing this. I understand why they don't, because it seems > counter-intuitive. I'll have to do some more testing, but this just might > solve the problem without any changes in Mesa. I think it's just a case > of the hardware drivers not understanding Mesa's assumptions and > behavior here. > > -- > Leif Delgass > http://www.retinalburn.net >
Setting __HAVE_AGP to 0 in s3v.h allowed me to run DRI on my virge. A bit bizarre, it always draws the window contents in the same place, even if the window is moved - to be expected according to README. It didn't show any output for xor in double buffered mode, but in single buffered (rest unchanged) it didn't erase the lines either. So perhaps it shows the same symptoms as mach64 did and might benefit from a similar change. Sounds like you've resolved it though which is great. For Max: Heres a more stable link to my test, http://members.telocity.com/grahamhay/xor_test.c Its a bit difficult to be certain since if I run the single buffered version after glxgears and/or double buffered version I get artifacts left over - think IBM logo with interspersed black lines, repeated, etc.. Like reusing older uncleared memory. But it does show the xor'd lines + no erase. btw, glxgears shows 55 FPS with DRI, 40 FPS without. Occasional black flash /stutter + drop in frame rate. 640x480 root, depth 15, no 2d accel to test. Used s3virge-20020708-linux.i386.tar.bz2 4MB s3virge AGP on K6/266. VGA compatible controller: S3 Inc. ViRGE/GX2 (rev 04) (prog-if 00 [VGA]) Subsystem: Diamond Multimedia Systems Stealth 3D 4000 Cheers, Graham __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Oh, it's good to be a geek. http://thinkgeek.com/sf _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel
