I'm developing an all purpose graphic engine for the raspberry Pi and recently I added stencil testing to clip some excess polygons. While the engine normally runs 18216 faces at 60fps, when I set the stencil on for some of the drawing, the fps drops really hard (40fps). The engine is cross-platform, and this issue doesn't happen neither on Android, PC Linux, nor Windows.
Seems like there is some raspberry harware optimizations disabled or something like that wich I might be missing.
I render directly using the Dispman without X, the stencil buffer is 8 bits, the depth 16 and the color buffer is 8+8+8.
Is there something I have to take into account when using the stencil buffer on the raspberry?
Thanks in advance.