Esempio n. 1
0
void cso_cache_delete(struct cso_cache *sc)
{
   assert(sc);

   if (!sc)
      return;

   /* delete driver data */
   cso_for_each_state(sc, CSO_BLEND, delete_blend_state, 0);
   cso_for_each_state(sc, CSO_DEPTH_STENCIL_ALPHA, delete_depth_stencil_state, 0);
   cso_for_each_state(sc, CSO_FRAGMENT_SHADER, delete_fs_state, 0);
   cso_for_each_state(sc, CSO_VERTEX_SHADER, delete_vs_state, 0);
   cso_for_each_state(sc, CSO_RASTERIZER, delete_rasterizer_state, 0);
   cso_for_each_state(sc, CSO_SAMPLER, delete_sampler_state, 0);
   cso_for_each_state(sc, CSO_VELEMENTS, delete_velements, 0);

   cso_hash_delete(sc->blend_hash);
   cso_hash_delete(sc->sampler_hash);
   cso_hash_delete(sc->depth_stencil_hash);
   cso_hash_delete(sc->rasterizer_hash);
   cso_hash_delete(sc->fs_hash);
   cso_hash_delete(sc->vs_hash);
   cso_hash_delete(sc->velements_hash);
   FREE(sc);
}
Esempio n. 2
0
void cso_cache_delete(struct cso_cache *sc)
{
   int i;
   assert(sc);

   if (!sc)
      return;

   /* delete driver data */
   cso_for_each_state(sc, CSO_BLEND, delete_blend_state, 0);
   cso_for_each_state(sc, CSO_DEPTH_STENCIL_ALPHA, delete_depth_stencil_state, 0);
   cso_for_each_state(sc, CSO_RASTERIZER, delete_rasterizer_state, 0);
   cso_for_each_state(sc, CSO_SAMPLER, delete_sampler_state, 0);
   cso_for_each_state(sc, CSO_VELEMENTS, delete_velements, 0);

   for (i = 0; i < CSO_CACHE_MAX; i++)
      cso_hash_delete(sc->hashes[i]);

   FREE(sc);
}