Texas inmate accused of grabbing deputy's gun, shooting him