gallium: consolidate CSO sampler and sampler_view functions