Set stencil ref in clear mode as well based on texture format