VirtualBox

Ignore:
Timestamp:
Apr 26, 2012 12:17:23 PM (13 years ago)
Author:
vboxsync
Message:

crOpenGL: switch to using ASMBit* for gl resource tracking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_glstate.h

    r41057 r41071  
    5454#ifndef IN_GUEST
    5555# include <VBox/vmm/ssm.h>
     56# include <iprt/asm.h>
     57
     58# define CR_STATE_SHAREDOBJ_USAGE_INIT(_pObj) (crMemset((_pObj)->ctxUsage, 0, sizeof ((_pObj)->ctxUsage)))
     59# define CR_STATE_SHAREDOBJ_USAGE_SET(_pObj, _pCtx) (ASMBitSet((_pObj)->ctxUsage, (_pCtx)->id))
     60# define CR_STATE_SHAREDOBJ_USAGE_CLEAR(_pObj, _pCtx) (ASMBitClear((_pObj)->ctxUsage, (_pCtx)->id))
     61# define CR_STATE_SHAREDOBJ_USAGE_IS_USED(_pObj) (ASMBitFirstSet((_pObj)->ctxUsage, sizeof ((_pObj)->ctxUsage)<<3) >= 0)
    5662#endif
    5763
     
    115121    GLboolean   bFBOResyncNeeded;
    116122} CRSharedState;
    117 
    118 #define CR_STATE_SHAREDOBJ_USAGE_INIT(_pObj) (CLEARBITS((_pObj)->ctxUsage))
    119 #define CR_STATE_SHAREDOBJ_USAGE_SET(_pObj, _pCtx) (SETBIT((_pObj)->ctxUsage, (_pCtx)->id))
    120 #define CR_STATE_SHAREDOBJ_USAGE_CLEAR(_pObj, _pCtx) (CLEARBIT((_pObj)->ctxUsage, (_pCtx)->id))
    121 #define CR_STATE_SHAREDOBJ_USAGE_IS_USED(_pObj) (HASBITS((_pObj)->ctxUsage))
    122123
    123124/**
Note: See TracChangeset for help on using the changeset viewer.

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