Critics fear a new law in Texas will prove discriminatory - but officials say it is vital to combat "adversaries".