https://bugs.freedesktop.org/show_bug.cgi?id=66067
--- Comment #32 from Nicholas Miell nmiell@gmail.com --- (In reply to Daniel Scharrer from comment #31)
It selects between the 2D and SHADOW2D samplers based on the number of components in the coordinate vector. This matches the documentation [1] which, unlike the tutorial you quoted, makes no mention of the shadow test depending on the texture format or compare mode.
Yeah, my understanding and explanation as recorded in this bug is scattershot, misleading, and wrong.
I've meant to update it with an accurate summary of the problem, but there seemed to be hostility towards the idea of matching nvidia's behavior instead of demanding everybody else change their (technically buggy but in practice perfectly correct) software so I haven't bothered.