To query the size and number of levels we have to obtain the sampler as source for the size query, but also the index for the emulated level lookup, so default to always obtaining the right sampler, and add a special case for obtaining the sampler index.