Compare stencil correctly based on bitdepth.

All sorts of funny rules.  See comments here:
https://github.com/hrydgard/ppsspp/pull/4150