static void vrend_free_programs(struct vrend_sub_context *sub)
{
   struct vrend_linked_shader_program *ent, *tmp;

   if (!LIST_IS_EMPTY(&sub->cs_programs)) {
      LIST_FOR_EACH_ENTRY_SAFE(ent, tmp, &sub->cs_programs, head)
         vrend_destroy_program(ent);
   }

   for (unsigned i = 0; i < VREND_PROGRAM_NQUEUES; ++i) {
      if (!LIST_IS_EMPTY(&sub->gl_programs[i])) {
         LIST_FOR_EACH_ENTRY_SAFE(ent, tmp, &sub->gl_programs[i], head)
            vrend_destroy_program(ent);
      }
   }
}
static void vrend_free_programs(struct vrend_sub_context *sub)
{
   struct vrend_linked_shader_program *ent, *tmp;

   if (!LIST_IS_EMPTY(&sub->cs_programs)) {
      LIST_FOR_EACH_ENTRY_SAFE(ent, tmp, &sub->cs_programs, head)
         vrend_destroy_program(ent);
   }

   for (unsigned i = 0; i < VREND_PROGRAM_NQUEUES; ++i) {
      if (!LIST_IS_EMPTY(&sub->gl_programs[i])) {
         LIST_FOR_EACH_ENTRY_SAFE(ent, tmp, &sub->gl_programs[i], head)
            vrend_destroy_program(ent);
      }
   }
}