Changeset 63199 in vbox for trunk/src/VBox
- Timestamp:
- Aug 9, 2016 11:40:19 AM (8 years ago)
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 43 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/chromium.h
r63118 r63199 65 65 #ifndef WINDOWS 66 66 # ifndef RT_OS_WINDOWS /* If we don't need it in ring-3, we probably not need it in ring-0 either (triggers warnings). */ 67 # if 1 68 # pragma GCC diagnostic push 69 # pragma GCC diagnostic ignored "-Wstrict-prototypes" 70 # endif 67 71 #include <GL/glu.h> 72 # if 1 73 # pragma GCC diagnostic pop 74 # endif 68 75 # endif /* !RT_OS_WINDOWS */ 69 76 #endif -
trunk/src/VBox/GuestHost/OpenGL/include/cr_error.h
r56183 r63199 52 52 DECLEXPORT(void) crInfo(const char *format, ... ) PRINTF; 53 53 54 DECLEXPORT(void) crError(const char *format, ... ) NORETURN_PRINTF;54 DECLEXPORT(void) crError(const char *format, ... ) PRINTF /*NORETURN_PRINTF - it returns*/; 55 55 56 56 /* Throw more info while opengl is not stable */ … … 59 59 # include <iprt/assert.h> 60 60 # define CRASSERT Assert 61 / /extern int g_VBoxFbgFBreakDdi;61 /*extern int g_VBoxFbgFBreakDdi;*/ 62 62 # define CR_DDI_PROLOGUE() do { /*if (g_VBoxFbgFBreakDdi) {Assert(0);}*/ } while (0) 63 63 # else -
trunk/src/VBox/GuestHost/OpenGL/include/cr_net.h
r50984 r63199 266 266 267 267 extern DECLEXPORT(void) crNetInit( CRNetReceiveFunc recvFunc, CRNetCloseFunc closeFunc ); 268 extern DECLEXPORT(void) crNetTearDown( );268 extern DECLEXPORT(void) crNetTearDown(void); 269 269 270 270 extern DECLEXPORT(void) *crNetAlloc( CRConnection *conn ); … … 288 288 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 289 289 CRConnection *conn 290 #else 291 void 290 292 #endif 291 293 ); … … 307 309 #endif 308 310 #ifdef IN_GUEST 309 extern DECLEXPORT(uint32_t) crNetHostCapsGet( );311 extern DECLEXPORT(uint32_t) crNetHostCapsGet(void); 310 312 #endif 311 313 extern DECLEXPORT(void) crNetDefaultRecv( CRConnection *conn, CRMessage *msg, unsigned int len ); -
trunk/src/VBox/GuestHost/OpenGL/include/cr_protocol.h
r53802 r63199 100 100 } CRNetworkPointer; 101 101 102 #if 0 / /def DEBUG_misha102 #if 0 /*def DEBUG_misha*/ 103 103 #define CRDBGPTR_SETZ(_p) crMemset((_p), 0, sizeof (CRNetworkPointer)) 104 104 #define CRDBGPTR_CHECKZ(_p) do { \ -
trunk/src/VBox/GuestHost/OpenGL/packer/pack_client.c
r62808 r63199 443 443 } 444 444 } 445 #endif / / CR_EXT_secondary_color445 #endif /* CR_EXT_secondary_color */ 446 446 447 447 … … 459 459 crPackFogCoordfEXT( *((GLfloat *) p) ); 460 460 } 461 #endif / / CR_EXT_fog_coord461 #endif /* CR_EXT_fog_coord */ 462 462 463 463 for (unit = 0 ; unit < CR_MAX_TEXTURE_UNITS ; unit++) … … 803 803 crPackBegin(mode); 804 804 805 / /crDebug("crPackExpandDrawElements mode:0x%x, count:%d, type:0x%x", mode, count, type);805 /*crDebug("crPackExpandDrawElements mode:0x%x, count:%d, type:0x%x", mode, count, type);*/ 806 806 807 807 switch (type) -
trunk/src/VBox/GuestHost/OpenGL/packer/pack_texture.c
r52451 r63199 799 799 } 800 800 801 / /crDebug( "Compressing that shit: %d", level );801 /*crDebug( "Compressing that shit: %d", level );*/ 802 802 803 803 data_ptr = (unsigned char *) crPackAlloc( packet_length ); -
trunk/src/VBox/GuestHost/OpenGL/spu_loader/dispatch.py
r15532 r63199 119 119 if (ptr[i] == NULL) { 120 120 /*printf("!!!!!!!Warning entry[%d] = NULL\n", i);*/ 121 ptr[i] = (void *) NopFunction;121 ptr[i] = (void *)(uintptr_t)NopFunction; 122 122 } 123 123 } -
trunk/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py
r62812 r63199 46 46 #define SYSTEM_GL "libGL.so.1" 47 47 #endif 48 typedef void (*glxfuncptr)( );48 typedef void (*glxfuncptr)(void); 49 49 extern glxfuncptr glxGetProcAddressARB( const GLubyte *name ); 50 50 #else … … 85 85 86 86 #ifndef WINDOWS 87 static int FileExists(char *directory, char *filename)87 /*static int FileExists(char *directory, char *filename) 88 88 { 89 89 FILE *f; … … 102 102 return 0; 103 103 } 104 } 104 }*/ 105 105 #endif 106 106 -
trunk/src/VBox/GuestHost/OpenGL/spu_loader/spuchange.py
r62814 r63199 33 33 keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt") 34 34 for func_name in keys: 35 print '\tif (( void *)table->%s ==orig_func)' % func_name35 print '\tif ((uintptr_t)table->%s == (uintptr_t)orig_func)' % func_name 36 36 print '\t{' 37 print '\t\ttable->%s = (%sFunc_t) new_func;' % (func_name, func_name)37 print '\t\ttable->%s = (%sFunc_t)(uintptr_t)new_func;' % (func_name, func_name) 38 38 print '\t\tfor (temp = table->copyList ; temp ; temp = temp->next)' 39 39 print '\t\t{' … … 65 65 print '\tif (func && ((SPUGenericFunction)dispatch->%s!=func))' % func_name 66 66 print '\t{' 67 print '\t\tcrDebug("%%s changed from %%p to %%p", "gl%s", dispatch->%s,func);' % (func_name, func_name)68 print '\t\tcrSPUChangeInterface(dispatch, (void *) dispatch->%s,func);' % func_name67 print '\t\tcrDebug("%%s changed from %%p to %%p", "gl%s", (void *)(uintptr_t)dispatch->%s, (void *)(uintptr_t)func);' % (func_name, func_name) 68 print '\t\tcrSPUChangeInterface(dispatch, (void *)(uintptr_t)dispatch->%s, (void *)(uintptr_t)func);' % func_name 69 69 print '\t}\n' 70 70 print """ -
trunk/src/VBox/GuestHost/OpenGL/spu_loader/spuinit.c
r33540 r63199 27 27 table->server = NULL; 28 28 } 29 30 #if 0 /* unused */ 29 31 30 32 static int validate_int( const char *response, … … 161 163 return retval; 162 164 } 165 166 #endif /* unused */ 163 167 164 168 /** Use the default values for all the options: -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c
r48491 r63199 974 974 CRContext *fromCtx, CRContext *toCtx) 975 975 { 976 CRBufferObjectState *from = &(fromCtx->bufferobject);977 const CRBufferObjectState *to = &(toCtx->bufferobject); 976 /*CRBufferObjectState *from = &(fromCtx->bufferobject); - unused 977 const CRBufferObjectState *to = &(toCtx->bufferobject); - unused */ 978 978 979 979 if (!HaveBufferObjectExtension()) … … 987 987 CRBufferObject *pBufferObj = (CRBufferObject *) data1; 988 988 CRBufferObjectState *pState = (CRBufferObjectState *) data2; 989 (void)key; 989 990 990 991 if (pBufferObj->id && !pBufferObj->hwid) … … 1020 1021 CRContext *fromCtx, CRContext *toCtx) 1021 1022 { 1022 const CRBufferObjectState *from = &(fromCtx->bufferobject);1023 /*const CRBufferObjectState *from = &(fromCtx->bufferobject); - unused */ 1023 1024 CRBufferObjectState *to = &(toCtx->bufferobject); 1024 1025 int i; -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c
r51319 r63199 1535 1535 /* XXX todo */ 1536 1536 crWarning("crStateVertexArrayRangeNV not implemented"); 1537 (void)length; (void)pointer; 1537 1538 } 1538 1539 … … 1547 1548 #define CRSTATE_IS_SERVER_CP(cp) (!(cp).enabled || !(cp).p || ((cp).buffer && (cp).buffer->id) || ((cp).locked)) 1548 1549 1550 #if defined(DEBUG) && 0 1549 1551 static void crStateDumpClientPointer(CRClientPointer *cp, const char *name, int i) 1550 1552 { … … 1552 1554 { 1553 1555 crDebug("CP(%s): enabled:%d ptr:%p buffer:%p buffer.name:%i locked: %i %s", 1554 name, cp->enabled, cp->p, cp->buffer, cp->buffer ? cp->buffer->id:-1, (int)cp->locked,1556 name, cp->enabled, cp->p, cp->buffer, cp->buffer ? cp->buffer->id : ~(GLuint)0, (int)cp->locked, 1555 1557 CRSTATE_IS_SERVER_CP(*cp) ? "":"!FAIL!"); 1556 1558 } … … 1558 1560 { 1559 1561 crDebug("CP(%s%i): enabled:%d ptr:%p buffer:%p buffer.name:%i locked: %i %s", 1560 name, i, cp->enabled, cp->p, cp->buffer, cp->buffer ? cp->buffer->id:-1, (int)cp->locked,1562 name, i, cp->enabled, cp->p, cp->buffer, cp->buffer ? cp->buffer->id : ~(GLuint)0, (int)cp->locked, 1561 1563 CRSTATE_IS_SERVER_CP(*cp) ? "":"!FAIL!"); 1562 1564 } 1563 1565 } 1566 #endif 1564 1567 1565 1568 #ifdef DEBUG_misha 1566 1569 /* debugging */ 1567 / /# define CR_NO_SERVER_ARRAYS1570 /*# define CR_NO_SERVER_ARRAYS*/ 1568 1571 #endif 1569 1572 -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_current.c
r51313 r63199 366 366 (toCtx->extensions.NV_vertex_program))) { 367 367 const unsigned attribsUsedMask = toCtx->current.attribsUsedMask; 368 int i;369 368 for (i = 1; i < CR_MAX_VERTEX_ATTRIBS; i++) { /* skip zero */ 370 369 if ((attribsUsedMask & (1 << i)) -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_enable.c
r44326 r63199 389 389 case GL_MAP1_VERTEX_ATTRIB15_4_NV: 390 390 { 391 const GLint i = cap - GL_MAP1_VERTEX_ATTRIB0_4_NV;392 g->eval.enableAttrib1D[i ] = val;393 DIRTY(sb->program.map1AttribArrayEnable[i ], neg_bitid);391 const GLint idx = cap - GL_MAP1_VERTEX_ATTRIB0_4_NV; 392 g->eval.enableAttrib1D[idx] = val; 393 DIRTY(sb->program.map1AttribArrayEnable[idx], neg_bitid); 394 394 DIRTY(sb->program.dirty, neg_bitid); 395 395 } … … 412 412 case GL_MAP2_VERTEX_ATTRIB15_4_NV: 413 413 { 414 const GLint i = cap - GL_MAP2_VERTEX_ATTRIB0_4_NV;415 g->eval.enableAttrib2D[i ] = val;416 DIRTY(sb->program.map2AttribArrayEnable[i ], neg_bitid);414 const GLint idx = cap - GL_MAP2_VERTEX_ATTRIB0_4_NV; 415 g->eval.enableAttrib2D[idx] = val; 416 DIRTY(sb->program.map2AttribArrayEnable[idx], neg_bitid); 417 417 DIRTY(sb->program.dirty, neg_bitid); 418 418 } -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_fence.c
r15532 r63199 13 13 void APIENTRY crStateGenFencesNV(GLsizei n, GLuint *fences) 14 14 { 15 (void)n; (void)fences; 15 16 } 16 17 … … 18 19 void APIENTRY crStateDeleteFencesNV(GLsizei n, const GLuint *fences) 19 20 { 21 (void)n; (void)fences; 20 22 } 21 23 22 24 void APIENTRY crStateSetFenceNV(GLuint fence, GLenum condition) 23 25 { 26 (void)fence; (void)condition; 24 27 } 25 28 26 29 GLboolean APIENTRY crStateTestFenceNV(GLuint fence) 27 30 { 28 return GL_FALSE; 31 (void)fence; 32 return GL_FALSE; 29 33 } 30 34 31 35 void APIENTRY crStateFinishFenceNV(GLuint fence) 32 36 { 37 (void)fence; 33 38 } 34 39 35 40 GLboolean APIENTRY crStateIsFenceNV(GLuint fence) 36 41 { 37 return GL_FALSE; 42 (void)fence; 43 return GL_FALSE; 38 44 } 39 45 40 46 void APIENTRY crStateGetFenceivNV(GLuint fence, GLenum pname, GLint *params) 41 47 { 48 (void)fence; (void)pname; (void)params; 42 49 } 43 50 -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c
r62814 r63199 228 228 { 229 229 CRContext *g = GetCurrentContext(); 230 CRFramebufferObjectState *fbo = &g->framebufferobject;230 /*CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */ 231 231 int i; 232 232 … … 481 481 /*@todo: move this function somewhere else*/ 482 482 /*return floor of base 2 log of x. log(0)==0*/ 483 unsigned int crLog2Floor(unsigned int x)483 static unsigned int crLog2Floor(unsigned int x) 484 484 { 485 485 x |= (x >> 1); … … 614 614 { 615 615 CRContext *g = GetCurrentContext(); 616 CRFramebufferObjectState *fbo = &g->framebufferobject;616 /*CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */ 617 617 CRFBOAttachmentPoint *aap[2]; 618 618 GLuint cap, i; … … 648 648 { 649 649 CRContext *g = GetCurrentContext(); 650 CRFramebufferObjectState *fbo = &g->framebufferobject;650 /* CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */ 651 651 CRFBOAttachmentPoint *aap[2]; 652 652 GLuint cap, i; … … 686 686 { 687 687 CRContext *g = GetCurrentContext(); 688 CRFramebufferObjectState *fbo = &g->framebufferobject;688 /* CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */ 689 689 CRFBOAttachmentPoint *aap[2]; 690 690 GLuint cap, i; … … 727 727 CRFBOAttachmentPoint *aap[2]; 728 728 CRRenderbufferObject *rb; 729 (void)renderbuffertarget; 729 730 730 731 CRSTATE_CHECKERR(g->current.inBeginEnd, GL_INVALID_OPERATION, "called in begin/end"); … … 872 873 crStateGenerateMipmapEXT(GLenum target) 873 874 { 875 (void)target; 874 876 /*@todo*/ 875 877 } … … 878 880 { 879 881 CRRenderbufferObject *pRBO = (CRRenderbufferObject*) data1; 882 (void)key; (void)data2; 880 883 881 884 diff_api.GenRenderbuffersEXT(1, &pRBO->hwid); … … 943 946 CRContext *ctx = (CRContext*) data2; 944 947 GLint i; 948 (void)key; 945 949 946 950 diff_api.GenFramebuffersEXT(1, &pFBO->hwid); … … 1089 1093 CRContext *g = GetCurrentContext(); 1090 1094 CRFramebufferObject *pFBO = (CRFramebufferObject*) crHashtableSearch(g->shared->fbTable, id); 1091 #if 0 / /def DEBUG_misha1095 #if 0 /*def DEBUG_misha*/ 1092 1096 crDebug("FB id(%d) hw(%d)", id, pFBO ? pFBO->hwid : 0); 1093 1097 #endif -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_glsl.c
r62492 r63199 136 136 CRContext *ctx = (CRContext*) data2; 137 137 CRGLSLShader *pRealShader; 138 (void) key; 138 (void) key; (void)ctx; 139 139 140 140 pRealShader = crStateGetShaderObj(pShader->id); … … 406 406 static void crStateDbgCheckNoProgramOfId(void *data) 407 407 { 408 (void)data; 408 409 crError("Unexpected Program id"); 409 410 } … … 849 850 } 850 851 851 if (cbData< sizeof(GLsizei))852 if (cbData<(GLsizei)sizeof(GLsizei)) 852 853 { 853 854 crWarning("crStateGLSLProgramCacheUniforms: data too short"); … … 859 860 cbRead = sizeof(GLsizei); 860 861 861 / /crDebug("crStateGLSLProgramCacheUniforms: %i active uniforms", pProgram->cUniforms);862 /*crDebug("crStateGLSLProgramCacheUniforms: %i active uniforms", pProgram->cUniforms);*/ 862 863 863 864 if (pProgram->cUniforms) … … 896 897 pCurrent += cbName; 897 898 898 / /crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%d, %s", i, pProgram->pUniforms[i].location, pProgram->pUniforms[i].name);899 /*crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%d, %s", i, pProgram->pUniforms[i].location, pProgram->pUniforms[i].name);*/ 899 900 } 900 901 … … 925 926 } 926 927 927 if (cbData< sizeof(GLsizei))928 if (cbData<(GLsizei)sizeof(GLsizei)) 928 929 { 929 930 WARN(("crStateGLSLProgramCacheAttribs: data too short")); … … 991 992 } 992 993 993 / /crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%s.", location, pName);994 /*crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%s.", location, pName);*/ 994 995 995 996 ((GLint*)*pCurrent)[0] = location; … … 1322 1323 CRGLSLShader *pShader = (CRGLSLShader*) data1; 1323 1324 CRContext *ctx = (CRContext *) data2; 1325 (void)ctx; (void)key; 1324 1326 1325 1327 pShader->hwid = diff_api.CreateShader(pShader->type); … … 1387 1389 CRContext *ctx = (CRContext *) data2; 1388 1390 GLuint i; 1391 (void)key; 1389 1392 1390 1393 pProgram->hwid = diff_api.CreateProgram(); -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_init.c
r57423 r63199 76 76 } 77 77 78 void crStateReleaseTextureInternal(CRSharedState *pS, CRContext *pCtx, CRTextureObj *pObj)78 static void crStateReleaseTextureInternal(CRSharedState *pS, CRContext *pCtx, CRTextureObj *pObj) 79 79 { 80 80 Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj) || pObj->pinned); … … 102 102 } 103 103 104 void crStateReleaseBufferObjectInternal(CRSharedState *pS, CRContext *pCtx, CRBufferObject *pObj)104 static void crStateReleaseBufferObjectInternal(CRSharedState *pS, CRContext *pCtx, CRBufferObject *pObj) 105 105 { 106 106 Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj)); … … 110 110 } 111 111 112 void crStateReleaseFBOInternal(CRSharedState *pS, CRContext *pCtx, CRFramebufferObject *pObj)112 static void crStateReleaseFBOInternal(CRSharedState *pS, CRContext *pCtx, CRFramebufferObject *pObj) 113 113 { 114 114 Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj)); … … 118 118 } 119 119 120 void crStateReleaseRBOInternal(CRSharedState *pS, CRContext *pCtx, CRRenderbufferObject *pObj)120 static void crStateReleaseRBOInternal(CRSharedState *pS, CRContext *pCtx, CRRenderbufferObject *pObj) 121 121 { 122 122 Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj)); … … 130 130 PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2; 131 131 CRTextureObj *pObj = (CRTextureObj *)data1; 132 (void)key; 132 133 crStateReleaseTextureInternal(pData->s, pData->pCtx, pObj); 133 134 } … … 137 138 PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2; 138 139 CRBufferObject *pObj = (CRBufferObject *)data1; 140 (void)key; 139 141 crStateReleaseBufferObjectInternal(pData->s, pData->pCtx, pObj); 140 142 } … … 144 146 PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2; 145 147 CRFramebufferObject *pObj = (CRFramebufferObject *)data1; 148 (void)key; 146 149 crStateReleaseFBOInternal(pData->s, pData->pCtx, pObj); 147 150 } … … 151 154 PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2; 152 155 CRRenderbufferObject *pObj = (CRRenderbufferObject *)data1; 156 (void)key; 153 157 crStateReleaseRBOInternal(pData->s, pData->pCtx, pObj); 154 158 } 159 155 160 156 161 /** 157 162 * Decrement shared state's refcount and delete when it hits zero. 158 163 */ 159 DECLEXPORT(void) 160 crStateFreeShared(CRContext *pContext, CRSharedState *s) 164 #ifndef IN_GUEST 165 DECLEXPORT(void) crStateFreeShared(CRContext *pContext, CRSharedState *s) 166 #else 167 static void crStateFreeShared(CRContext *pContext, CRSharedState *s) 168 #endif 161 169 { 162 170 int32_t refCount = ASMAtomicDecS32(&s->refCount); … … 188 196 } 189 197 190 DECLEXPORT(CRSharedState *) crStateGlobalSharedAcquire() 198 #ifndef IN_GUEST 199 200 DECLEXPORT(CRSharedState *) crStateGlobalSharedAcquire(void) 191 201 { 192 202 if (!gSharedState) … … 199 209 } 200 210 201 DECLEXPORT(void) crStateGlobalSharedRelease( )211 DECLEXPORT(void) crStateGlobalSharedRelease(void) 202 212 { 203 213 crStateFreeShared(NULL, gSharedState); 204 214 } 215 216 #endif /* IN_GUEST */ 205 217 206 218 DECLEXPORT(void) STATE_APIENTRY … … 298 310 */ 299 311 static CRContext * 300 crStateCreateContextId(int i, const CRLimitsState *limits, 301 GLint visBits, CRContext *shareCtx) 312 crStateCreateContextId(int i, const CRLimitsState *limits, GLint visBits, CRContext *shareCtx) 302 313 { 303 314 CRContext *ctx; … … 305 316 int node32 = i >> 5; 306 317 int node = i & 0x1f; 318 (void)limits; 307 319 308 320 if (g_pAvailableContexts[i] != NULL) … … 800 812 { 801 813 /* This no-op function helps smooth code-gen */ 814 (void)target; (void)value; 802 815 } 803 816 … … 806 819 { 807 820 /* This no-op function helps smooth code-gen */ 821 (void)target; (void)value; 808 822 } 809 823 … … 812 826 { 813 827 /* This no-op function helps smooth code-gen */ 828 (void)target; (void)type; (void)count; (void)values; 814 829 } 815 830 … … 818 833 { 819 834 /* This no-op function helps smooth code-gen */ 835 (void)target; (void)index; (void)type; (void)count; (void)values; 820 836 } 821 837 … … 825 841 { 826 842 /* This no-op function helps smooth code-gen */ 827 } 828 829 void crStateVBoxDetachThread() 843 (void)x; (void)y; (void)width; (void)height; (void)format; (void)type; (void)pixels; 844 } 845 846 void crStateVBoxDetachThread(void) 830 847 { 831 848 /* release the context ref so that it can be freed */ … … 834 851 835 852 836 void crStateVBoxAttachThread() 837 { 838 } 853 void crStateVBoxAttachThread(void) 854 { 855 } 856 857 #if 0 /* who's refering to these? */ 839 858 840 859 GLint crStateVBoxCreateContext( GLint con, const char * dpyName, GLint visual, GLint shareCtx ) 841 860 { 861 (void)con; (void)dpyName; (void)visual; (void)shareCtx; 842 862 return 0; 843 863 } … … 845 865 GLint crStateVBoxWindowCreate( GLint con, const char *dpyName, GLint visBits ) 846 866 { 867 (void)con; (void)dpyName; (void)visBits; 847 868 return 0; 848 869 } … … 850 871 void crStateVBoxWindowDestroy( GLint con, GLint window ) 851 872 { 873 (void)con; (void)window; 852 874 } 853 875 854 876 GLint crStateVBoxConCreate(struct VBOXUHGSMI *pHgsmi) 855 877 { 878 (void)pHgsmi; 856 879 return 0; 857 880 } … … 859 882 void crStateVBoxConDestroy(GLint con) 860 883 { 884 (void)con; 861 885 } 862 886 863 887 void crStateVBoxConFlush(GLint con) 864 888 { 865 } 889 (void)con; 890 } 891 892 #endif /* unused? */ -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_lists.c
r52263 r63199 14 14 { 15 15 /* nothing - dlists are in shared state */ 16 (void)ctx; 16 17 } 17 18 … … 31 32 } 32 33 33 / /#define CRSTATE_DEBUG_QUERY_HW_STATE34 /*#define CRSTATE_DEBUG_QUERY_HW_STATE*/ 34 35 35 36 #ifndef CRSTATE_DEBUG_QUERY_HW_STATE … … 173 174 CRContext *g = GetCurrentContext(); 174 175 CRStateBits *sb = GetCurrentBits(); 175 CRbitvalue *bitID=g->bitid,*negbitID=g->neg_bitid;176 CRbitvalue /* *bitID=g->bitid, */ *negbitID=g->neg_bitid; 176 177 177 178 CRASSERT(g_bVBoxEnableDiffOnMakeCurrent); … … 819 820 { 820 821 int i; 821 const int gleval_sizes [] = {4, 1, 3, 1, 2, 3, 4, 3, 4};822 const int gleval_sizes_dup[] = {4, 1, 3, 1, 2, 3, 4, 3, 4}; 822 823 823 824 if (CHECKDIRTY(sb->eval.enable, negbitID)) … … 850 851 if (order>0) 851 852 { 852 coeffs = crAlloc(order * gleval_sizes [i] * sizeof(GLfloat));853 coeffs = crAlloc(order * gleval_sizes_dup[i] * sizeof(GLfloat)); 853 854 if (!coeffs) 854 855 { … … 889 890 if (order[0]>0 && order[1]>0) 890 891 { 891 coeffs = crAlloc(order[0] * order[1] * gleval_sizes [i] * sizeof(GLfloat));892 coeffs = crAlloc(order[0] * order[1] * gleval_sizes_dup[i] * sizeof(GLfloat)); 892 893 if (!coeffs) 893 894 { -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_occlude.c
r15532 r63199 138 138 CRContext *g = GetCurrentContext(); 139 139 CROcclusionState *o = &(g->occlusion); 140 (void)target; 140 141 141 142 FLUSH(); … … 323 324 { 324 325 /* Apparently, no occlusion state differencing needed */ 326 (void)bb; (void)bitID; (void)fromCtx; (void)toCtx; 325 327 } 326 328 … … 336 338 * glEndQuery sequence. 337 339 */ 340 (void)bb; (void)bitID; (void)fromCtx; (void)toCtx; 338 341 CRASSERT(!fromCtx->occlusion.currentQueryObject); 339 342 } -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_polygon.txt
r15532 r63199 15 15 :mode:frontMode:PolygonMode,GL_FRONT 16 16 -:stipple:stipple:*diff_api.PolygonStipple ((GLubyte *) to->stipple); 17 +:stipple:*int j;17 +:stipple:*int iStripple; 18 18 +:stipple:*diff_api.PolygonStipple ((GLubyte *) to->stipple); 19 +:stipple:*for ( j=0; j<32; j++)19 +:stipple:*for (iStripple=0; iStripple<32; iStripple++) 20 20 +:stipple:*{ 21 +:stipple:* from->stipple[ j] = to->stipple[j];21 +:stipple:* from->stipple[iStripple] = to->stipple[iStripple]; 22 22 +:stipple:*} -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c
r48491 r63199 2301 2301 CRProgram *pProgram = (CRProgram *) pProg; 2302 2302 uint32_t i; 2303 (void)key; 2303 2304 2304 2305 if (pProgram->isARBprogram) … … 2348 2349 CRProgram *pOrigVP, *pOrigFP; 2349 2350 2350 (void) bForceUpdate; 2351 (void) bForceUpdate; (void)bitID; 2351 2352 2352 2353 /* save original bindings */ -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_stencil.c
r62814 r63199 102 102 static void crStateStencilBufferFunc(CRContext *g, CRStencilBufferState *s, GLenum func, GLint ref, GLuint mask) 103 103 { 104 (void)g; 104 105 s->func = func; 105 106 s->ref = ref; … … 171 172 static void STATE_APIENTRY crStateStencilBufferOp (CRContext *g, CRStencilBufferState *s, GLenum fail, GLenum zfail, GLenum zpass) 172 173 { 174 (void)g; 173 175 s->fail = fail; 174 176 s->passDepthFail = zfail; -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_texdiff.c
r44947 r63199 1379 1379 struct callback_info *info = (struct callback_info *) cbData; 1380 1380 CRTextureObj *tobj = (CRTextureObj *) texObj; 1381 (void)key; 1382 1381 1383 /* 1382 1384 printf(" Checking %d 0x%x bitid=0x%x\n",tobj->name, tobj->dirty[0], info->bitID[0]); -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_teximage.c
r46235 r63199 575 575 CRContext *g = GetCurrentContext(); 576 576 CRTextureState *t = &(g->texture); 577 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE 577 578 CRClientState *c = &(g->client); 579 #endif 578 580 CRTextureObj *tobj; 579 581 CRTextureLevel *tl; 580 582 CRStateBits *sb = GetCurrentBits(); 581 583 CRTextureBits *tb = &(sb->texture); 584 #ifdef CR_STATE_NO_TEXTURE_IMAGE_STORE 585 (void)pixels; 586 #endif 582 587 583 588 FLUSH(); … … 685 690 CRTextureObj *tobj = NULL; 686 691 CRTextureLevel *tl = NULL; 692 (void)x; (void)y; 687 693 688 694 crStateGetTextureObjectAndImage(g, target, level, &tobj, &tl); … … 727 733 CRContext *g = GetCurrentContext(); 728 734 CRTextureState *t = &(g->texture); 735 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE 729 736 CRClientState *c = &(g->client); 737 #endif 730 738 CRTextureObj *tobj = NULL; 731 739 CRTextureLevel *tl = NULL; … … 864 872 CRContext *g = GetCurrentContext(); 865 873 CRTextureState *t = &(g->texture); 874 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE 866 875 CRClientState *c = &(g->client); 876 #endif 867 877 CRTextureObj *tobj = NULL; 868 878 CRTextureLevel *tl = NULL; 869 879 CRStateBits *sb = GetCurrentBits(); 870 880 CRTextureBits *tb = &(sb->texture); 881 (void)pixels; 871 882 872 883 FLUSH(); … … 959 970 CRContext *g = GetCurrentContext(); 960 971 CRTextureState *t = &(g->texture); 972 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE 961 973 CRClientState *c = &(g->client); 974 #endif 962 975 CRStateBits *sb = GetCurrentBits(); 963 976 CRTextureBits *tb = &(sb->texture); … … 965 978 CRTextureObj *tobj = unit->currentTexture1D; 966 979 CRTextureLevel *tl = tobj->level[0] + level; 980 (void)format; (void)type; (void)pixels; 967 981 968 982 FLUSH(); … … 1010 1024 { 1011 1025 CRContext *g = GetCurrentContext(); 1012 CRClientState *c = &(g->client);1013 1026 CRStateBits *sb = GetCurrentBits(); 1014 1027 CRTextureBits *tb = &(sb->texture); 1015 1028 CRTextureObj *tobj; 1016 1029 CRTextureLevel *tl; 1030 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE 1031 CRClientState *c = &(g->client); 1017 1032 GLubyte *subimg = NULL; 1018 1033 GLubyte *img = NULL; 1019 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE1020 1034 GLubyte *src; 1021 1035 int i; 1022 1036 #endif 1037 (void)format; (void)type; (void)pixels; 1023 1038 1024 1039 FLUSH(); … … 1105 1120 CRContext *g = GetCurrentContext(); 1106 1121 CRTextureState *t = &(g->texture); 1107 CRClientState *c = &(g->client);1108 1122 CRStateBits *sb = GetCurrentBits(); 1109 1123 CRTextureBits *tb = &(sb->texture); … … 1111 1125 CRTextureObj *tobj = unit->currentTexture3D; 1112 1126 CRTextureLevel *tl = tobj->level[0] + level; 1127 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE 1128 CRClientState *c = &(g->client); 1113 1129 GLubyte *subimg = NULL; 1114 1130 GLubyte *img = NULL; 1115 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE1116 1131 GLubyte *src; 1117 1132 int i; 1118 1133 #endif 1134 (void)format; (void)type; (void)pixels; 1119 1135 1120 1136 FLUSH(); … … 1191 1207 CRStateBits *sb = GetCurrentBits(); 1192 1208 CRTextureBits *tb = &(sb->texture); 1209 (void)data; 1193 1210 1194 1211 FLUSH(); … … 1271 1288 CRStateBits *sb = GetCurrentBits(); 1272 1289 CRTextureBits *tb = &(sb->texture); 1290 (void)data; 1273 1291 1274 1292 FLUSH(); … … 1352 1370 CRStateBits *sb = GetCurrentBits(); 1353 1371 CRTextureBits *tb = &(sb->texture); 1372 (void)data; 1354 1373 1355 1374 FLUSH(); … … 1433 1452 CRTextureObj *tobj = unit->currentTexture1D; 1434 1453 CRTextureLevel *tl = tobj->level[0] + level; 1454 (void)format; (void)imageSize; (void)data; 1435 1455 1436 1456 FLUSH(); … … 1490 1510 CRTextureObj *tobj = unit->currentTexture2D; 1491 1511 CRTextureLevel *tl = tobj->level[0] + level; 1512 (void)format; (void)imageSize; (void)data; 1492 1513 1493 1514 FLUSH(); … … 1552 1573 CRTextureObj *tobj = unit->currentTexture3D; 1553 1574 CRTextureLevel *tl = tobj->level[0] + level; 1575 (void)format; (void)imageSize; (void)data; 1554 1576 1555 1577 FLUSH(); … … 1648 1670 { 1649 1671 CRContext *g = GetCurrentContext(); 1672 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE 1650 1673 CRClientState *c = &(g->client); 1674 #endif 1651 1675 CRTextureObj *tobj; 1652 1676 CRTextureLevel *tl; -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_texture.c
r58226 r63199 622 622 { 623 623 GLint i; 624 (void)g; 624 625 for (i = 0; i < n; i++) 625 626 { … … 3390 3391 if (tobj) 3391 3392 { 3392 / / crDebug("tex id(%d), hwid(%d)", tobj->id, tobj->hwid);3393 /* crDebug("tex id(%d), hwid(%d)", tobj->id, tobj->hwid);*/ 3393 3394 } 3394 3395 #endif … … 3407 3408 CRASSERT(diff_api.GenTextures); 3408 3409 diff_api.GenTextures(1, &tobj->hwid); 3409 #if 0 / /def DEBUG_misha3410 #if 0 /*def DEBUG_misha*/ 3410 3411 crDebug("tex id(%d), hwid(%d)", tobj->id, tobj->hwid); 3411 3412 #endif -
trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp
r62814 r63199 82 82 83 83 RTRECT Intersection; 84 const RTPOINT ZeroPoint = {0, 0};84 /*const RTPOINT ZeroPoint = {0, 0}; - unused */ 85 85 86 86 for (uint32_t i = 0; i < cRects; ++i) … … 573 573 DECLINLINE(GLint*) crBltVtRectTF(const RTRECT *pRect, uint32_t normalX, uint32_t normalY, GLint* pBuff, uint32_t height) 574 574 { 575 (void)normalX; (void)normalY; 576 575 577 /* xLeft yTop */ 576 578 pBuff[0] = pRect->xLeft; … … 1115 1117 VBOXBLITTERDECL(int) CrBltImgGetMural(PCR_BLITTER pBlitter, bool fBb, CR_BLITTER_IMG *pDst) 1116 1118 { 1119 (void)fBb; (void)pDst; 1117 1120 if (!CrBltIsEntered(pBlitter)) 1118 1121 { … … 2030 2033 } 2031 2034 2032 Assert(width == pScaledCache->Tex.width);2033 Assert(height == pScaledCache->Tex.height);2035 Assert(width == (uint32_t)pScaledCache->Tex.width); 2036 Assert(height == (uint32_t)pScaledCache->Tex.height); 2034 2037 2035 2038 if (!pScaledCache->Flags.DataValid) … … 2057 2060 VBOXBLITTERDECL(int) CrTdBltDataAcquireScaled(PCR_TEXDATA pTex, GLenum enmFormat, bool fInverted, uint32_t width, uint32_t height, const CR_BLITTER_IMG**ppImg) 2058 2061 { 2059 if ( pTex->Tex.width == width &&pTex->Tex.height == height)2062 if ((uint32_t)pTex->Tex.width == width && (uint32_t)pTex->Tex.height == height) 2060 2063 return CrTdBltDataAcquire(pTex, enmFormat, fInverted, ppImg); 2061 2064 -
trunk/src/VBox/GuestHost/OpenGL/util/bufpool.c
r53726 r63199 115 115 /* check that the buffer to push isn't already in the pool! */ 116 116 { 117 const Buffer *b ;118 for (b = pool->head; b; b = b->next) {119 CRASSERT(b ->address != buf);117 const Buffer *bd; 118 for (bd = pool->head; bd; bd = bd->next) { 119 CRASSERT(bd->address != buf); 120 120 } 121 121 } -
trunk/src/VBox/GuestHost/OpenGL/util/compositor.cpp
r62492 r63199 105 105 { 106 106 uint32_t* pCounter = (uint32_t*)pvVisitor; 107 (void)pCompositor; (void)pEntry; 108 107 109 Assert(VBoxVrListRectsCount(&pEntry->Vr)); 108 110 *pCounter += VBoxVrListRectsCount(&pEntry->Vr); … … 495 497 CR_TEXDATA *pTex) 496 498 { 499 (void)pCompositor; 500 497 501 if (pEntry->pTex == pTex) 498 502 return VINF_SUCCESS; -
trunk/src/VBox/GuestHost/OpenGL/util/devnull.c
r53726 r63199 82 82 (void) conn; 83 83 (void) port; 84 (void) hostname; 84 85 } 85 86 -
trunk/src/VBox/GuestHost/OpenGL/util/dll.c
r62812 r63199 228 228 return NULL; 229 229 } 230 # endif / / CR_NO_GL_SYSTEM_PATH230 # endif /* CR_NO_GL_SYSTEM_PATH */ 231 231 #endif 232 232 … … 328 328 329 329 #elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1) 330 return (CRDLLFunc) 330 return (CRDLLFunc)(uintptr_t)dlsym( dll->hinstLib, symname ); 331 331 #else 332 332 #error CR DLL ARCHITETECTURE -
trunk/src/VBox/GuestHost/OpenGL/util/error.c
r62814 r63199 33 33 # include "VBox/VBoxGuestLib.h" 34 34 # include "iprt/initterm.h" 35 #else 36 # include "cr_error.h" 35 37 #endif 36 38 … … 77 79 } 78 80 81 #ifdef WINDOWS 79 82 static void logMessage(const char *pszPrefix, const char *pszFormat, ...) 80 83 { … … 85 88 va_end(va); 86 89 } 90 #endif 87 91 88 92 DECLEXPORT(void) crError(const char *pszFormat, ...) -
trunk/src/VBox/GuestHost/OpenGL/util/filenet.c
r53726 r63199 92 92 crFileAccept( CRConnection *conn, const char *hostname, unsigned short port ) 93 93 { 94 (void)hostname; 94 95 conn->file_direction = CR_FILE_READ; 95 96 conn->fd = open( conn->filename, O_RDONLY | O_BINARY ); -
trunk/src/VBox/GuestHost/OpenGL/util/hash.c
r62814 r63199 274 274 } 275 275 276 / / Assert(id != 2);276 /* Assert(id != 2);*/ 277 277 278 278 RTListForEachSafe(&pool->freeList, f, next, FreeElem, Node) -
trunk/src/VBox/GuestHost/OpenGL/util/list.c
r62814 r63199 312 312 } 313 313 314 #endif / / CR_TESTING_LIST314 #endif /* CR_TESTING_LIST */ -
trunk/src/VBox/GuestHost/OpenGL/util/net.c
r53726 r63199 388 388 conn->hostname = crStrdup( filename ); 389 389 390 /* call the protocol-specific init routines */ / / ktd (add)390 /* call the protocol-specific init routines */ /* ktd (add) */ 391 391 InitConnection(conn, protocol_only, mtu 392 392 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 393 393 , NULL 394 394 #endif 395 ); / / ktd (add)395 ); /* ktd (add) */ 396 396 } 397 397 else { … … 513 513 514 514 /* Free up stuff */ 515 void crNetTearDown( )515 void crNetTearDown(void) 516 516 { 517 517 CRNetReceiveFuncList *rfl; … … 1274 1274 1275 1275 #ifdef IN_GUEST 1276 uint32_t crNetHostCapsGet( )1276 uint32_t crNetHostCapsGet(void) 1277 1277 { 1278 1278 #ifdef VBOX_WITH_HGCM … … 1294 1294 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 1295 1295 CRConnection *conn 1296 #else 1297 void 1296 1298 #endif 1297 1299 ) … … 1363 1365 crNetSetContextRange( int low_context, int high_context ) 1364 1366 { 1367 #if !defined(TEAC_SUPPORT) && !defined(TCSCOMM_SUPPORT) 1368 (void)low_context; (void)high_context; 1369 #endif 1365 1370 #ifdef TEAC_SUPPORT 1366 1371 crTeacSetContextRange( low_context, high_context ); … … 1377 1382 crNetSetNodeRange( const char *low_node, const char *high_node ) 1378 1383 { 1384 #if !defined(TEAC_SUPPORT) && !defined(TCSCOMM_SUPPORT) 1385 (void)low_node; (void)high_node; 1386 #endif 1379 1387 #ifdef TEAC_SUPPORT 1380 1388 crTeacSetNodeRange( low_node, high_node ); … … 1393 1401 #ifdef TEAC_SUPPORT 1394 1402 crTeacSetKey( key, keyLength ); 1395 #endif 1396 } 1403 #else 1404 (void)key; (void)keyLength; 1405 #endif 1406 } -
trunk/src/VBox/GuestHost/OpenGL/util/net_internals.h
r53726 r63199 100 100 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 101 101 CRConnection *conn 102 #else 103 void 102 104 #endif 103 105 ); 104 106 #ifdef IN_GUEST 105 extern uint32_t crVBoxHGCMHostCapsGet( );107 extern uint32_t crVBoxHGCMHostCapsGet(void); 106 108 #endif 107 109 extern CRConnection** crVBoxHGCMDump( int *num ); -
trunk/src/VBox/GuestHost/OpenGL/util/pixel.c
r62814 r63199 1596 1596 } 1597 1597 else 1598 / /crDebug("Sending texture, BytesPerRow!=RowStrideBytes");1598 /*crDebug("Sending texture, BytesPerRow!=RowStrideBytes");*/ 1599 1599 for (i = 0; i < height; i++) 1600 1600 { -
trunk/src/VBox/GuestHost/OpenGL/util/process.c
r58583 r63199 229 229 { 230 230 #ifdef WINDOWS 231 / /return _getpid();231 /*return _getpid();*/ 232 232 return GetCurrentProcess(); 233 233 #else -
trunk/src/VBox/GuestHost/OpenGL/util/tcpip.c
r62814 r63199 519 519 char host[NI_MAXHOST]; 520 520 #endif 521 (void)hostname; 521 522 522 523 cr_tcpip.server_sock = CreateListeningSocket(port); … … 1278 1279 if ( conn->tcp_socket < 0 ) 1279 1280 { 1280 int err = crTCPIPErrno( );1281 if (err != EAFNOSUPPORT)1282 crWarning( "socket error: %s, trying another way", crTCPIPErrorString( err ) );1281 int err2 = crTCPIPErrno( ); 1282 if (err2 != EAFNOSUPPORT) 1283 crWarning( "socket error: %s, trying another way", crTCPIPErrorString( err2 ) ); 1283 1284 cur=cur->ai_next; 1284 1285 continue; -
trunk/src/VBox/GuestHost/OpenGL/util/udptcpip.c
r61992 r63199 521 521 else if ( FD_ISSET(conn->udp_socket, &read_fds ) ) 522 522 { 523 CRTCPIPBuffer *buf = ((CRTCPIPBuffer *) crTCPIPAlloc( conn )) - 1;524 unsigned int *seq = ((unsigned int *) (buf + 1)) - 1;525 int len;523 unsigned int *seq; 524 buf = ((CRTCPIPBuffer *) crTCPIPAlloc( conn )) - 1; 525 seq = ((unsigned int *) (buf + 1)) - 1; 526 526 527 527 len = recv( conn->udp_socket, (void *)seq, -
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r63064 r63199 64 64 #define CRASSERT Assert 65 65 #endif 66 / /#define IN_GUEST67 //#if defined(IN_GUEST)68 //#define VBOX_WITH_CRHGSMIPROFILE69 //#endif 66 /*#define IN_GUEST 67 #if defined(IN_GUEST) 68 #define VBOX_WITH_CRHGSMIPROFILE 69 #endif */ 70 70 #ifdef VBOX_WITH_CRHGSMIPROFILE 71 71 #include <iprt/time.h> … … 101 101 { 102 102 uint64_t cStartTime; 103 / / bool bDisable;103 /* bool bDisable;*/ 104 104 } VBOXCRHGSMIPROFILE_SCOPE, *PVBOXCRHGSMIPROFILE_SCOPE; 105 105 … … 131 131 DECLINLINE(void) vboxCrHgsmiProfileScopeEnter(PVBOXCRHGSMIPROFILE_SCOPE pScope) 132 132 { 133 / / pScope->bDisable = false;133 /* pScope->bDisable = false; */ 134 134 pScope->cStartTime = VBOXCRHGSMIPROFILE_GET_TIME_NANO(); 135 135 } … … 137 137 DECLINLINE(void) vboxCrHgsmiProfileScopeExit(PVBOXCRHGSMIPROFILE_SCOPE pScope) 138 138 { 139 / / if (!pScope->bDisable)139 /* if (!pScope->bDisable) */ 140 140 { 141 141 uint64_t cTime = VBOXCRHGSMIPROFILE_GET_TIME_NANO(); … … 522 522 pSubm->fFlags.Value = 0; 523 523 pSubm->fFlags.bDoNotRetire = 1; 524 // pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since 525 // * in case we want completion, 526 // * we will block in _crVBoxHGSMICmdBufferGetRc (when locking the buffer) 527 // * which is needed for getting the result */ 524 # if 0 525 pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since 526 * in case we want completion, 527 * we will block in _crVBoxHGSMICmdBufferGetRc (when locking the buffer) 528 * which is needed for getting the result */ 529 # endif 528 530 } 529 531 #endif … … 549 551 #endif 550 552 553 #ifndef IN_GUEST 551 554 /*@todo get rid of it*/ 552 555 static bool _crVBoxHGCMWriteBytes(CRConnection *conn, const void *buf, uint32_t len) … … 576 579 return TRUE; 577 580 } 581 #endif 578 582 579 583 /** … … 588 592 { 589 593 #ifdef IN_GUEST 590 # if defined(VBOX_WITH_CRHGSMI) 594 # ifndef VBOX_WITH_CRHGSMI 595 RT_NOREF(conn); 596 # else 591 597 PCRVBOXHGSMI_CLIENT pClient = g_crvboxhgcm.bHgsmiOn ? _crVBoxHGSMIClientGet(conn) : NULL; 592 598 if (pClient) … … 681 687 # endif /*#ifdef RT_OS_WINDOWS*/ 682 688 } 683 #else /*#ifdef IN_GUEST*/ 689 690 #else /* IN_GUEST */ 691 RT_NOREF(conn, pvData, cbData); 684 692 crError("crVBoxHGCMCall called on host side!"); 685 693 CRASSERT(FALSE); 686 694 return VERR_NOT_SUPPORTED; 687 #endif 695 #endif /* IN_GUEST */ 688 696 } 689 697 … … 805 813 CRVBOXHGCMREAD parms; 806 814 int rc; 815 RT_NOREF(buf, len); 807 816 808 817 parms.hdr.result = VERR_WRONG_ORDER; … … 811 820 parms.hdr.cParms = SHCRGL_CPARMS_READ; 812 821 813 CRASSERT(!conn->pBuffer); / /make sure there's no data to process822 CRASSERT(!conn->pBuffer); /* make sure there's no data to process */ 814 823 parms.pBuffer.type = VMMDevHGCMParmType_LinAddr_Out; 815 824 parms.pBuffer.u.Pointer.size = conn->cbHostBufferAllocated; … … 829 838 if (parms.cbBuffer.u.value32) 830 839 { 831 / /conn->pBuffer = (uint8_t*) parms.pBuffer.u.Pointer.u.linearAddr;840 /*conn->pBuffer = (uint8_t*) parms.pBuffer.u.Pointer.u.linearAddr; */ 832 841 conn->pBuffer = conn->pHostBuffer; 833 842 conn->cbBuffer = parms.cbBuffer.u.value32; … … 858 867 parms.pBuffer.u.Pointer.u.linearAddr = (uintptr_t) buf; 859 868 860 CRASSERT(!conn->pBuffer); / /make sure there's no data to process869 CRASSERT(!conn->pBuffer); /*make sure there's no data to process*/ 861 870 parms.pWriteback.type = VMMDevHGCMParmType_LinAddr_Out; 862 871 parms.pWriteback.u.Pointer.size = conn->cbHostBufferAllocated; … … 965 974 if (parms.cbWriteback.u.value32) 966 975 { 967 / /conn->pBuffer = (uint8_t*) parms.pWriteback.u.Pointer.u.linearAddr;976 /*conn->pBuffer = (uint8_t*) parms.pWriteback.u.Pointer.u.linearAddr;*/ 968 977 conn->pBuffer = conn->pHostBuffer; 969 978 conn->cbBuffer = parms.cbWriteback.u.value32; … … 987 996 { 988 997 #ifndef IN_GUEST 989 / /@todo remove temp buffer allocation in unpacker998 /**@todo remove temp buffer allocation in unpacker*/ 990 999 /* we're at the host side, so just store data until guest polls us */ 991 1000 _crVBoxHGCMWriteBytes(conn, start, len); … … 1107 1116 #endif 1108 1117 if (g_crvboxhgcm.bufpool) { 1109 / /@todo o'rly?1118 /**@todo o'rly? */ 1110 1119 /* pool may have been deallocated just a bit earlier in response 1111 1120 * to a SIGPIPE (Broken Pipe) signal. … … 1154 1163 if (conn->allow_redir_ptr) 1155 1164 { 1156 #endif //IN_GUEST1165 #endif 1157 1166 CRASSERT(conn->buffer_size >= sizeof(CRMessageRedirPtr)); 1158 1167 … … 1204 1213 cached_type = msg->header.type; 1205 1214 } 1206 #endif / /IN_GUEST1215 #endif /* !IN_GUEST*/ 1207 1216 1208 1217 conn->recv_credits -= len; … … 1242 1251 static void crVBoxHGCMAccept( CRConnection *conn, const char *hostname, unsigned short port ) 1243 1252 { 1253 RT_NOREF(hostname, port); 1244 1254 VBOXCRHGSMIPROFILE_FUNC_PROLOGUE(); 1245 1255 CRASSERT(conn && conn->pHostBuffer); … … 1254 1264 CRVBOXHGCMSETVERSION parms; 1255 1265 int rc; 1266 RT_NOREF(vMajor, vMinor); 1256 1267 1257 1268 parms.hdr.result = VERR_WRONG_ORDER; … … 1616 1627 static void crVBoxHGCMHandleNewMessage( CRConnection *conn, CRMessage *msg, unsigned int len ) 1617 1628 { 1629 RT_NOREF(conn, msg, len); 1618 1630 VBOXCRHGSMIPROFILE_FUNC_PROLOGUE(); 1619 1631 CRASSERT(FALSE); … … 1763 1775 parms->hdr.u32ClientID = conn->u32ClientID; 1764 1776 parms->hdr.u32Function = SHCRGL_GUEST_FN_READ; 1765 / / parms->hdr.u32Reserved = 0;1766 1767 CRASSERT(!conn->pBuffer); / /make sure there's no data to process1777 /* parms->hdr.u32Reserved = 0;*/ 1778 1779 CRASSERT(!conn->pBuffer); /* make sure there's no data to process */ 1768 1780 parms->iBuffer = 1; 1769 1781 parms->cbBuffer = 0; … … 1838 1850 PVBOXUHGSMI_BUFFER pBuf = NULL; 1839 1851 VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags; 1840 / / uint32_t cbBuffer;1852 /* uint32_t cbBuffer;*/ 1841 1853 1842 1854 parms->hdr.result = VERR_WRONG_ORDER; 1843 1855 parms->hdr.u32ClientID = conn->u32ClientID; 1844 1856 parms->hdr.u32Function = SHCRGL_GUEST_FN_WRITE_READ; 1845 / / parms->hdr.u32Reserved = 0;1857 /* parms->hdr.u32Reserved = 0;*/ 1846 1858 1847 1859 parms->iBuffer = 1; 1848 1860 1849 CRASSERT(!conn->pBuffer); / /make sure there's no data to process1861 CRASSERT(!conn->pBuffer); /* make sure there's no data to process */ 1850 1862 parms->iWriteback = 2; 1851 1863 parms->cbWriteback = 0; … … 2016 2028 parms->hdr.u32ClientID = conn->u32ClientID; 2017 2029 parms->hdr.u32Function = SHCRGL_GUEST_FN_INJECT; 2018 / / parms->hdr.u32Reserved = 0;2030 /* parms->hdr.u32Reserved = 0;*/ 2019 2031 2020 2032 parms->u32ClientID = conn->u32InjectClientID; … … 2050 2062 parms->hdr.u32ClientID = conn->u32ClientID; 2051 2063 parms->hdr.u32Function = SHCRGL_GUEST_FN_WRITE; 2052 / / parms->hdr.u32Reserved = 0;2064 /* parms->hdr.u32Reserved = 0; */ 2053 2065 2054 2066 parms->iBuffer = 1; … … 2100 2112 { 2101 2113 #ifndef IN_GUEST 2102 / /@todo remove temp buffer allocation in unpacker2114 /** @todo remove temp buffer allocation in unpacker */ 2103 2115 /* we're at the host side, so just store data until guest polls us */ 2104 2116 _crVBoxHGCMWriteBytes(conn, start, len); … … 2399 2411 2400 2412 /* Callback function used to free buffer pool entries */ 2401 void crVBoxHGCMBufferFree(void *data)2413 static void crVBoxHGCMBufferFree(void *data) 2402 2414 { 2403 2415 CRVBOXHGCMBUFFER *hgcm_buffer = (CRVBOXHGCMBUFFER *) data; … … 2528 2540 conn->allow_redir_ptr = 1; 2529 2541 2530 / /@todo remove this crap at all later2542 /** @todo remove this crap at all later */ 2531 2543 conn->cbHostBufferAllocated = 2*1024; 2532 2544 conn->pHostBuffer = (uint8_t*) crAlloc(conn->cbHostBufferAllocated); … … 2564 2576 2565 2577 #if defined(IN_GUEST) 2566 void _crVBoxHGCMPerformPollHost(CRConnection *conn)2578 static void _crVBoxHGCMPerformPollHost(CRConnection *conn) 2567 2579 { 2568 2580 if (conn->type == CR_NO_CONNECTION ) … … 2586 2598 #endif 2587 2599 2588 void _crVBoxHGCMPerformReceiveMessage(CRConnection *conn)2600 static void _crVBoxHGCMPerformReceiveMessage(CRConnection *conn) 2589 2601 { 2590 2602 if ( conn->type == CR_NO_CONNECTION ) … … 2598 2610 2599 2611 #ifdef IN_GUEST 2600 uint32_t crVBoxHGCMHostCapsGet( )2612 uint32_t crVBoxHGCMHostCapsGet(void) 2601 2613 { 2602 2614 Assert(g_crvboxhgcm.fHostCapsInitialized); … … 2608 2620 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 2609 2621 CRConnection *conn 2622 #else 2623 void 2610 2624 #endif 2611 2625 ) -
trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp
r62814 r63199 401 401 } 402 402 403 #if 0 /* unused */ 403 404 /** 404 405 * @returns Entry to be iterated next. ListHead is returned to break the … … 435 436 } 436 437 } 438 #endif /* unused */ 437 439 438 440 static void vboxVrListJoinRectsHV(PVBOXVR_LIST pList, bool fHorizontal) … … 712 714 } 713 715 716 #if 0 /* unused */ 717 714 718 static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinNonintersectedCb(PVBOXVR_LIST pList1, PVBOXVR_REG pReg1, void *pvContext) 715 719 { … … 730 734 } 731 735 732 #if 0 /* unused */733 736 static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinIntersectedCb(PVBOXVR_LIST pList1, PVBOXVR_REG pReg1, PCRTRECT pRect2, 734 737 void *pvContext, PPRTLISTNODE ppNext) … … 755 758 return &pReg1->ListEntry; 756 759 } 757 #endif 760 761 #endif /* unused */ 758 762 759 763 static int vboxVrListIntersectNoJoin(PVBOXVR_LIST pList, PCVBOXVR_LIST pList2, bool *pfChanged)
Note:
See TracChangeset
for help on using the changeset viewer.