Keith Whitwell wrote:
Roland Scheidegger wrote:

This is a new version of the hyperz patch. It should have a better
 chance of running on all cards.


I get the feeling that hyperz was designed with a private z-buffer in
 mind. It would be interesting to see if the X server can dynamically
 un-hyperz the backbuffer when it detects a second context being
created - have a look at the TransitionTo/From functions in
radeon_dri.c - currently they are mainly concerned with page
flipping.
In fact, that was already discussed briefly at irc. For now it just seemed more important to get it working on more cards and fix the rendering problems than to worry about "minor" issues like multiple rendering apps :). I did get clearing only the needed tiles working (minus some off-by-one issues currently) though at least on my rv250 (with a 32x8 z pixel granularity however - for clearing the hardware seems to work on 8x2 4x4 "macro tiles", it looks like it might be even possible to get granularity down to 4x4 for clearing, at least on my card).

Typically this is resolved by clearing by drawing two big triangles
to cover the area, enabling only depth or stencil drawing as
required.
That's what I was thinking too, but I'd certainly avoid it if possible - that's just basically switching hyperz off (well at least fast z-clear, z-buffer compression ought to be still possible). I just don't know if the hardware (could even be different for rv cards?) can do it or not. And even with the latest fglrx driver I was unsuccesful in measuring clear performance with clearspd, I've even converted it to SDL instead of GLUT (due to fullscreen problems) and fglrx still obviously never used fast z-clear - dri is now 80 times faster than fglrx, isn't that nice ;).
Though some optimization could be done in the driver (i.e. if only stencil buffer is cleared, but between the last z-buffer clear and this clear the z-buffer was never enabled for writing, then still hyperz clear could be used, though care would have to be taken so the right z clear value is still used and similar issues). It probably means that z/stencil clear can only be done with hyperz clear if the stencil write mask contains all stencil bits too. That's lots of possibilities for clear fallbacks...


Roland


------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to