On 16.07.2008 16:55, Maciej Cencora wrote: > Hi, > > 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 > _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?
Those two extensions are mutually exclusive. I'd suggest you ditch EXT_stencil_two_side, which is mutually exclusive with OGL 2.0 (nvidia manages to support both, I suspect they are switching driver behaviour depending if an app uses one of the new functions of EXT_stencil_two_side or one of the new stencil functions in OGL 2.0, if you do both behaviour is not predictable - I doubt such hacks are appropriate for mesa). >From a functionality point of view, EXT_stencil_two_side offers the same functionality as OGL 2.0, whereas ATI_separate_stencil only offers a subset (which iirc is the same subset the d3d two-sided stencil functionality offers). I thought though this subset is a perfect match for r300... Roland ------------------------------------------------------------------------- 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
