add some more sanity checks to textureGather

It's nicer to bail out early than to fail sometime later (usually by
trying to use an overload that doesn't exist)

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>