>From what I remember, fglrx does support different front/back ref/mask values on newer hardware, eg R4XX. We should support this on the hardware that is capable as it gives a nice performance boost for games using stencil shadow volumes such as Doom 3/Quake 4/etc.
I'll try and add a test to Revenge, but I might not be able to get this done before I fly out on Monday. My weekend is pretty packed, heh. :-) On Wed, Jul 16, 2008 at 5:02 PM, Maciej Cencora <[EMAIL PROTECTED]> wrote: > 2008/7/16 Ian Romanick <[EMAIL PROTECTED]>: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Maciej Cencora wrote: >> >> | I tried implementing GL_ATI_separate_stencil in r300 driver, but I >> | faced a problem. With my simple patch http://pastebin.com/m524d1ae7 >> | r300 driver supports 2 stencil extensions (GL_ATI_separate_stencil and >> | GL_EXT_stencil_two_side). Supporting both extensions causes problem in >> >> Are you sure r300 can do the full set of functionality of the EXT >> version? I thought r300 couldn't handle having a different front and >> back "ref" value. This is allowed by the EXT extension and OpenGL 2.0, >> but it is not allowed by the ATI extension. > Yes, r300 can't handle different front and back ref value. Currently > r300 advertises EXT version but falls back to software rendering if > front ref or mask != back ref or mask. >> >> Also, if you intend to support the EXT version, you also need to define >> need_GL_EXT_stencil_two_side. >> >> | _mesa_update_stencil function (main/stencil.c). First condition in >> | that function checks if EXT extension is supported, if so sets up >> | ctx->Stencil._TestTwoSide properly. If both extensions are available >> | and ATI extension is used then ctx->Stencil._TestTwoSide will always >> | be false, and that's not what we want. Possibly other functions are >> | also affected. Any suggestions how to properly fix this? >> >> Both extensions (and the OpenGL 2.0 functionality) can be supported >> together, but I don't think Mesa implements it correctly. Basically, we >> have to maintain two different sets of "back" stencil state. One is set >> via the 2.0 or ATI functions and is used when STENCIL_TEST_TWO_SIDE_EXT >> is disabled and is disabled. The other is set by StencilFunc and >> StencilOp when the active stencil face is set to BACK. The >> EXT_stencil_two_side spec has more details. >> >> http://opengl.org/registry/specs/EXT/stencil_two_side.txt >> >> I believe the Mesa currently only tracks one set of back stencil state. >> >> I think that it is worth supporting the EXT version, when possible, >> because there is GLX protocol for it. There is currently no GLX >> protocol for the OpenGL 2.0 version or the ATI version. This means that >> the EXT version is the only way to get two-sided stencil with indirect >> rendering contexts. >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.9 (GNU/Linux) >> >> iEYEARECAAYFAkh+F2sACgkQX1gOwKyEAw83SACeNLFYJ03YjdE+1VuLfE+lxQ+I >> j+4An1RX1f9U7/YaFX15DYfdcAfgZeWR >> =6M+K >> -----END PGP SIGNATURE----- >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Mesa3d-dev mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/mesa3d-dev >> > > Maciej Cencora > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Mesa3d-dev mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mesa3d-dev > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
