radeonsi: add a common function for getting the size of gs_ngg_scratch