Framebuffer read coherency (r3xx)

2008-06-07 Thread Nicolai Hähnle
Hi, I'm currently trying to figure out why glean/texCube reproducably fails on my R420. That test basically has a number of sections that look like this loop(..) { render(); loop(..) { glReadPixels(..); check_values(); } } The outer loop continuously overwrites the

Re: Framebuffer read coherency (r3xx)

2008-06-07 Thread Dave Airlie
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)

Re: Framebuffer read coherency (r3xx)

2008-06-07 Thread Roland Scheidegger
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

Re: Framebuffer read coherency (r3xx)

2008-06-07 Thread Dave Airlie
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. We may purge the cache but not