You're not even calling functions here, and it doesn't make any sense at all to me.  Why would it replace the stencil value if the depth test did not pass?

`DepthTestPassed` just checks the function pointer, I think, right?

-[Unknown]