VirtualBox

Ignore:
Timestamp:
Jun 20, 2015 8:10:59 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101192
Message:

Host 3D: Expando SPU, DLM module.

  • DLM module reworked. Now it uses hardware way in order to execute Display List (software approach dropped);
  • Chromium/utils slightly extended with more helper functions needed for Expando/DLM;
  • More testing needed especially for glCallLists() and glListBase();
  • Expando/DLM code now enabed for Mac hosts.
Location:
trunk/src/VBox/GuestHost/OpenGL/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/hash.c

    r55617 r56566  
    433433}
    434434
     435void crFreeHashtableEx(CRHashTable *hash, CRHashtableCallbackEx deleteFunc, void *pData)
     436{
     437    int i;
     438    CRHashNode *entry, *next;
     439
     440    if (!hash) return;
     441
     442#ifdef CHROMIUM_THREADSAFE
     443    crLockMutex(&hash->mutex);
     444#endif
     445
     446    for (i = 0; i < CR_NUM_BUCKETS; i++)
     447    {
     448        entry = hash->buckets[i];
     449        while (entry)
     450        {
     451            next = entry->next;
     452            /* Clear the key in case crHashtableDelete() is called
     453             * from this callback.
     454             */
     455            entry->key = 0;
     456            if (deleteFunc && entry->data)
     457            {
     458                (*deleteFunc)(entry->data, pData);
     459            }
     460            crFree(entry);
     461            entry = next;
     462
     463        }
     464    }
     465    crFreeHashIdPool(hash->idPool);
     466
     467#ifdef CHROMIUM_THREADSAFE
     468    crUnlockMutex(&hash->mutex);
     469    crFreeMutex(&hash->mutex);
     470#endif
     471
     472    crFree(hash);
     473}
     474
     475
    435476void crHashtableLock(CRHashTable *h)
    436477{
     
    585626}
    586627
     628void crHashtableDeleteEx(CRHashTable *h, unsigned long key, CRHashtableCallbackEx deleteFunc, void *pData)
     629{
     630    unsigned int index = crHash( key );
     631    CRHashNode *temp, *beftemp = NULL;
     632
     633#ifdef CHROMIUM_THREADSAFE
     634    crLockMutex(&h->mutex);
     635#endif
     636    for (temp = h->buckets[index]; temp; temp = temp->next)
     637    {
     638        if (temp->key == key)
     639            break;
     640        beftemp = temp;
     641    }
     642    if (temp)
     643    {
     644        if (beftemp)
     645            beftemp->next = temp->next;
     646        else
     647            h->buckets[index] = temp->next;
     648        h->num_elements--;
     649        if (temp->data && deleteFunc) {
     650            (*deleteFunc)(temp->data, pData);
     651        }
     652
     653        crFree(temp);
     654    }
     655
     656    crHashIdPoolFreeBlock(h->idPool, key, 1);
     657#ifdef CHROMIUM_THREADSAFE
     658    crUnlockMutex(&h->mutex);
     659#endif
     660}
     661
     662
    587663void crHashtableDeleteBlock( CRHashTable *h, unsigned long key, GLsizei range, CRHashtableCallback deleteFunc )
    588664{
  • trunk/src/VBox/GuestHost/OpenGL/util/util.def

    r53374 r56566  
    7878crHashtableAdd
    7979crHashtableDelete
     80crHashtableDeleteEx
    8081crHashtableSearch
    8182crHashtableReplace
     
    8788crAllocHashtableEx
    8889crFreeHashtable
     90crFreeHashtableEx
    8991crHashtableGetDataKey
    9092crDetermineEndianness
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette