VirtualBox

Ignore:
Timestamp:
Jul 5, 2012 3:22:55 PM (13 years ago)
Author:
vboxsync
Message:

wddm/crOpenGL: moreon kernel-based cr commands submission

File:
1 edited

Legend:

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

    r41109 r42028  
    8080};
    8181
     82#if !defined(IN_RING0)
     83# define CR_PACKER_CONTEXT_ARGSINGLEDECL
     84# define CR_PACKER_CONTEXT_ARGDECL
     85# define CR_PACKER_CONTEXT_ARG
     86# define CR_PACKER_CONTEXT_ARGCTX(C)
     87# ifdef CHROMIUM_THREADSAFE
     88extern CRtsd _PackerTSD;
     89#  define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = (CRPackContext *) crGetTSD(&_PackerTSD)
     90#  define CR_LOCK_PACKER_CONTEXT(PC) crLockMutex(&((PC)->mutex))
     91#  define CR_UNLOCK_PACKER_CONTEXT(PC) crUnlockMutex(&((PC)->mutex))
     92# else
     93extern DLLDATA(CRPackContext) cr_packer_globals;
     94#  define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = &cr_packer_globals
     95#  define CR_LOCK_PACKER_CONTEXT(PC)
     96#  define CR_UNLOCK_PACKER_CONTEXT(PC)
     97# endif
     98#else /* if defined IN_RING0 */
     99# define CR_PACKER_CONTEXT_ARGSINGLEDECL CRPackContext *_pCtx
     100# define CR_PACKER_CONTEXT_ARGDECL CR_PACKER_CONTEXT_ARGSINGLEDECL,
     101# define CR_PACKER_CONTEXT_ARG _pCtx,
     102# define CR_PACKER_CONTEXT_ARGCTX(C) C,
     103# define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = _pCtx
     104# define CR_LOCK_PACKER_CONTEXT(PC)
     105# define CR_UNLOCK_PACKER_CONTEXT(PC)
     106#endif
    82107
    83108extern DECLEXPORT(CRPackContext *) crPackNewContext(int swapping);
     
    106131                                GLfloat *xmax, GLfloat *ymax, GLfloat *zmax);
    107132
    108 extern DECLEXPORT(void) crPackAppendBuffer( const CRPackBuffer *buffer );
    109 extern DECLEXPORT(void) crPackAppendBoundedBuffer( const CRPackBuffer *buffer, const CRrecti *bounds );
    110 extern DECLEXPORT(int) crPackCanHoldBuffer( const CRPackBuffer *buffer );
    111 extern DECLEXPORT(int) crPackCanHoldBoundedBuffer( const CRPackBuffer *buffer );
     133extern DECLEXPORT(void) crPackAppendBuffer( CR_PACKER_CONTEXT_ARGDECL const CRPackBuffer *buffer );
     134extern DECLEXPORT(void) crPackAppendBoundedBuffer( CR_PACKER_CONTEXT_ARGDECL const CRPackBuffer *buffer, const CRrecti *bounds );
     135extern DECLEXPORT(int) crPackCanHoldBuffer( CR_PACKER_CONTEXT_ARGDECL const CRPackBuffer *buffer );
     136extern DECLEXPORT(int) crPackCanHoldBoundedBuffer( CR_PACKER_CONTEXT_ARGDECL const CRPackBuffer *buffer );
    112137
    113138#if defined(LINUX) || defined(WINDOWS)
     
    119144extern DECLEXPORT(void) crWriteSwappedDouble( void *buffer, double d );
    120145
    121 extern DECLEXPORT(void) *crPackAlloc( unsigned int len );
    122 extern DECLEXPORT(void) crHugePacket( CROpcode op, void *ptr );
    123 extern DECLEXPORT(void) crPackFree( void *ptr );
     146extern DECLEXPORT(void) *crPackAlloc( CR_PACKER_CONTEXT_ARGDECL unsigned int len );
     147extern DECLEXPORT(void) crHugePacket( CR_PACKER_CONTEXT_ARGDECL CROpcode op, void *ptr );
     148extern DECLEXPORT(void) crPackFree( CR_PACKER_CONTEXT_ARGDECL void *ptr );
    124149extern DECLEXPORT(void) crNetworkPointerWrite( CRNetworkPointer *, void * );
    125150
     
    144169extern DECLEXPORT(void) crPackExpandMultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, CRClientState *c );
    145170extern DECLEXPORT(void) crPackExpandMultiDrawElementsEXTSWAP( GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, CRClientState *c );
    146 
    147 
    148 #ifdef CHROMIUM_THREADSAFE
    149 extern CRtsd _PackerTSD;
    150 #define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = (CRPackContext *) crGetTSD(&_PackerTSD)
    151 #define CR_LOCK_PACKER_CONTEXT(PC) crLockMutex(&((PC)->mutex))
    152 #define CR_UNLOCK_PACKER_CONTEXT(PC) crUnlockMutex(&((PC)->mutex))
    153 #elif !defined IN_RING0
    154 extern DLLDATA(CRPackContext) cr_packer_globals;
    155 #define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = &cr_packer_globals
    156 #define CR_LOCK_PACKER_CONTEXT(PC)
    157 #define CR_UNLOCK_PACKER_CONTEXT(PC)
    158 #endif
    159171
    160172
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