On 07.06.2008 23:42, Dave Airlie wrote: >> Each of the following changes individually fixes the problem: >> >> 1) Do not overwrite the same region of the framebuffer in every iteration; >> instead, use a different framebuffer region for every iteration. >> >> 2) Add a sleep(1) before glReadPixels. >> >> 3) Add a sleep(1) after glReadPixels. >> >> 4) Call wbinvd() in the DRM at the end of radeon_cp_idle() (after the call >> to >> radeon_do_cp_idle), so that radeon_span.c ends up triggering a wbinvd before >> the actual read takes place. > > It sounds like a GPU cache flush is missing, the pixels are probably > sitting in the texture cache, and may not have hit the framebuffer when > you read, the wbinvd is only acting like a sleep in this case. > > Dave.
Hmm, the radeon_cp_idle() should purge the destination cache (and wait for it too, including checking the DC_BUSY bit). At least the r200 driver has a comment in r200SpanRenderStart (including a dodgy workaround) which sure looks like the same issue to me. Roland ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel