Why my pass can not write Scene Depth?

I set the DepthStencilState as<true, CF_DepthNearOrEqual>,and bind my pass RenderTargets.DepthStencil = BasePassRenderTargets.DepthStencil . Use RDG add MyPass into BasePass to Draw.Finally color buffer,normal buffer … every buffer is correct,except SenceDepth.I don’t know what I did less or did wrong.
Sorry for my bad english.I struggled with this problem for many days,I was expecting some help here.
Thank you.

Are you using this for a scene post process material?
Don’t forget to allow custom depth writes in the post process material

Thanks for your reply. It is using for mesh material.I found I made a mistake:
directly use BasePassRenderTargets.DepthStencil,Although it with DepthPass bind to the same texture,but But thay bind differently DepthStencilAccess.Re-doing the correct binding solved my problem.