static void bind_ssbo_locs(struct vrend_linked_shader_program *sprog,
                           int id)
{
   int i;
   char name[32];
   if (!has_feature(feat_ssbo))
      return;
   if (sprog->ss[id]->sel->sinfo.ssbo_used_mask) {
      const char *prefix = pipe_shader_to_prefix(id);
      uint32_t mask = sprog->ss[id]->sel->sinfo.ssbo_used_mask;
      sprog->ssbo_locs[id] = calloc(util_last_bit(mask), sizeof(uint32_t));

      while (mask) {
         i = u_bit_scan(&mask);
         snprintf(name, 32, "%sssbo%d", prefix, i);
         sprog->ssbo_locs[id][i] = glGetProgramResourceIndex(sprog->id, GL_SHADER_STORAGE_BLOCK, name);
      }
   } else
      sprog->ssbo_locs[id] = NULL;
   sprog->ssbo_used_mask[id] = sprog->ss[id]->sel->sinfo.ssbo_used_mask;
}
static void bind_ssbo_locs(struct vrend_linked_shader_program *sprog,
                           int id)
{
   int i;
   char name[32];
   if (!has_feature(feat_ssbo))
      return;
   if (sprog->ss[id]->sel->sinfo.ssbo_used_mask) {
      const char *prefix = pipe_shader_to_prefix(id);
      uint32_t mask = sprog->ss[id]->sel->sinfo.ssbo_used_mask;
      sprog->ssbo_locs[id] = calloc(util_last_bit(mask), sizeof(uint32_t));

      while (mask) {
         i = u_bit_scan(&mask);
         snprintf(name, 32, "%sssbo%d", prefix, i);
         sprog->ssbo_locs[id][i] = glGetProgramResourceIndex(sprog->id, GL_SHADER_STORAGE_BLOCK, name);
      }
   } else
      sprog->ssbo_locs[id] = NULL;
   sprog->ssbo_used_mask[id] = sprog->ss[id]->sel->sinfo.ssbo_used_mask;
}