Changeset 51313 in vbox for trunk/src/VBox/Additions/common/crOpenGL/pack
- Timestamp:
- May 20, 2014 7:12:20 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 93791
- Location:
- trunk/src/VBox/Additions/common/crOpenGL/pack
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu.h
r51200 r51313 28 28 typedef struct thread_info_t ThreadInfo; 29 29 typedef struct context_info_t ContextInfo; 30 typedef struct zvabuffer_info_t ZvaBufferInfo; 31 32 struct zvabuffer_info_t 33 { 34 /* GL_ARRAY_BUFFER_ARB buffer */ 35 GLuint idBuffer; 36 /* buffer length */ 37 GLuint cbBuffer; 38 /* number of values stored in the buffer currently */ 39 GLuint cValues; 40 /* current buffer value */ 41 union 42 { 43 GLfloat f[4]; 44 GLuint ui[4]; 45 GLubyte ub[4]; 46 GLshort s[4]; 47 GLushort us[4]; 48 } Value; 49 }; 30 50 31 51 struct thread_info_t { … … 48 68 GLint serverCtx; /* context ID returned by server */ 49 69 GLboolean fAutoFlush; 70 GLboolean fCheckZerroVertAttr; 50 71 ThreadInfo *currentThread; 72 ZvaBufferInfo zvaBufferInfo; 51 73 GLubyte glVersion[100]; /* GL_VERSION string */ 52 74 GLubyte pszRealVendor[100]; … … 76 98 #endif 77 99 78 #ifdef VBOX_WITH_CRPACKSPU_DUMPER79 100 SPUDispatchTable self; 80 101 102 #ifdef VBOX_WITH_CRPACKSPU_DUMPER 81 103 CR_RECORDER Recorder; 82 104 CR_DBGPRINT_DUMPER Dumper; -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c
r47079 r51313 9 9 #include "cr_glstate.h" 10 10 #include "packspu_proto.h" 11 #include "cr_mem.h" 11 12 12 13 void PACKSPU_APIENTRY packspu_FogCoordPointerEXT( GLenum type, GLsizei stride, const GLvoid *pointer ) … … 173 174 } 174 175 176 #ifdef DEBUG_misha 177 /* debugging */ 178 //# define CR_FORCE_ZVA_SERVER_ARRAY 179 #endif 180 # define CR_FORCE_ZVA_EXPAND 181 182 183 GLboolean packspuZvaCreate(ContextInfo *pCtx, const GLfloat *pValue, GLuint cValues) 184 { 185 ZvaBufferInfo *pInfo = &pCtx->zvaBufferInfo; 186 GLuint cbValue = 4 * sizeof (*pValue); 187 GLuint cbValues = cValues * cbValue; 188 GLfloat *pBuffer; 189 uint8_t *pu8Buf; 190 GLuint i; 191 192 /* quickly sort out if we can use the current value */ 193 if (pInfo->idBuffer 194 && pInfo->cValues >= cValues 195 && !memcmp(pValue, &pInfo->Value, cbValue)) 196 return GL_FALSE; 197 198 pBuffer = (GLfloat*)crAlloc(cbValues); 199 if (!pBuffer) 200 { 201 WARN(("crAlloc for pBuffer failed")); 202 return GL_FALSE; 203 } 204 205 pu8Buf = (uint8_t *)pBuffer; 206 for (i = 0; i < cValues; ++i) 207 { 208 memcpy(pu8Buf, pValue, cbValue); 209 pu8Buf += cbValue; 210 } 211 212 /* */ 213 if (!pInfo->idBuffer) 214 { 215 pack_spu.self.GenBuffersARB(1, &pInfo->idBuffer); 216 Assert(pInfo->idBuffer); 217 } 218 219 pack_spu.self.BindBufferARB(GL_ARRAY_BUFFER_ARB, pInfo->idBuffer); 220 221 if (pInfo->cbBuffer < cbValues) 222 { 223 pack_spu.self.BufferDataARB(GL_ARRAY_BUFFER_ARB, cbValues, pBuffer, GL_DYNAMIC_DRAW_ARB); 224 pInfo->cbBuffer = cbValues; 225 } 226 else 227 { 228 pack_spu.self.BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, cbValues, pBuffer); 229 } 230 231 pInfo->cValues = cValues; 232 memcpy(&pInfo->Value, pValue, cbValue); 233 234 crFree(pBuffer); 235 236 return GL_TRUE; 237 } 238 239 typedef struct 240 { 241 ContextInfo *pCtx; 242 GLuint idBuffer; 243 CRClientPointer cp; 244 } CR_ZVA_RESTORE_CTX; 245 246 void packspuZvaEnable(ContextInfo *pCtx, const GLfloat *pValue, GLuint cValues, CR_ZVA_RESTORE_CTX *pRestoreCtx) 247 { 248 CRContext *g = pCtx->clientState; 249 250 Assert(0); 251 252 #ifdef DEBUG 253 { 254 CRContext *pCurState = crStateGetCurrent(); 255 256 Assert(g == pCurState); 257 } 258 #endif 259 260 pRestoreCtx->pCtx = pCtx; 261 pRestoreCtx->idBuffer = g->bufferobject.arrayBuffer ? g->bufferobject.arrayBuffer->id : 0; 262 pRestoreCtx->cp = g->client.array.a[0]; 263 264 Assert(!pRestoreCtx->cp.enabled); 265 266 /* buffer ref count mechanism does not work actually atm, 267 * still ensure the buffer does not get destroyed if we fix it in the future */ 268 if (pRestoreCtx->cp.buffer) 269 pRestoreCtx->cp.buffer->refCount++; 270 271 packspuZvaCreate(pCtx, pValue, cValues); 272 273 pack_spu.self.BindBufferARB(GL_ARRAY_BUFFER_ARB, pCtx->zvaBufferInfo.idBuffer); 274 275 pack_spu.self.VertexAttribPointerARB(0, 4, GL_FLOAT, 276 GL_FALSE, /*normalized*/ 277 0, /*stride*/ 278 NULL /*addr*/); 279 280 pack_spu.self.EnableVertexAttribArrayARB(0); 281 } 282 283 void packspuZvaDisable(CR_ZVA_RESTORE_CTX *pRestoreCtx) 284 { 285 if (pRestoreCtx->cp.buffer) 286 pack_spu.self.BindBufferARB(GL_ARRAY_BUFFER_ARB, pRestoreCtx->cp.buffer->id); 287 else 288 pack_spu.self.BindBufferARB(GL_ARRAY_BUFFER_ARB, 0); 289 290 pack_spu.self.VertexAttribPointerARB(0, pRestoreCtx->cp.size, pRestoreCtx->cp.type, 291 pRestoreCtx->cp.normalized, /*normalized*/ 292 pRestoreCtx->cp.stride, /*stride*/ 293 pRestoreCtx->cp.p); 294 295 if (pRestoreCtx->cp.enabled) 296 pack_spu.self.EnableVertexAttribArrayARB(0); 297 else 298 pack_spu.self.DisableVertexAttribArrayARB(0); 299 300 if (pRestoreCtx->cp.buffer) 301 { 302 if (pRestoreCtx->cp.buffer->id != pRestoreCtx->idBuffer) 303 pack_spu.self.BindBufferARB(GL_ARRAY_BUFFER_ARB, pRestoreCtx->idBuffer); 304 305 /* we have increased the refcount above, decrease it back */ 306 pRestoreCtx->cp.buffer->refCount--; 307 } 308 else 309 { 310 if (pRestoreCtx->idBuffer) 311 pack_spu.self.BindBufferARB(GL_ARRAY_BUFFER_ARB, pRestoreCtx->idBuffer); 312 } 313 314 #ifdef DEBUG 315 { 316 CRContext *g = pRestoreCtx->pCtx->clientState; 317 CRContext *pCurState = crStateGetCurrent(); 318 319 Assert(g == pCurState); 320 321 Assert(pRestoreCtx->cp.p == g->client.array.a[0].p); 322 Assert(pRestoreCtx->cp.size == g->client.array.a[0].size); 323 Assert(pRestoreCtx->cp.type == g->client.array.a[0].type); 324 Assert(pRestoreCtx->cp.stride == g->client.array.a[0].stride); 325 Assert(pRestoreCtx->cp.enabled == g->client.array.a[0].enabled); 326 Assert(pRestoreCtx->cp.normalized == g->client.array.a[0].normalized); 327 Assert(pRestoreCtx->cp.bytesPerIndex == g->client.array.a[0].bytesPerIndex); 328 # ifdef CR_ARB_vertex_buffer_object 329 Assert(pRestoreCtx->cp.buffer == g->client.array.a[0].buffer); 330 # endif 331 # ifdef CR_EXT_compiled_vertex_array 332 Assert(pRestoreCtx->cp.locked == g->client.array.a[0].locked); 333 # endif 334 Assert(pRestoreCtx->idBuffer == (g->bufferobject.arrayBuffer ? g->bufferobject.arrayBuffer->id : 0)); 335 } 336 #endif 337 } 175 338 176 339 void PACKSPU_APIENTRY … … 180 343 #if 1 181 344 GLboolean serverArrays = GL_FALSE; 345 GLuint cZvaValues = 0; 346 GLfloat aAttrib[4]; 182 347 183 348 #if CR_ARB_vertex_buffer_object … … 185 350 /*crDebug("packspu_ArrayElement index:%i", index);*/ 186 351 if (ctx->clientState->extensions.ARB_vertex_buffer_object) 352 { 187 353 serverArrays = crStateUseServerArrays(); 188 #endif 189 190 if (serverArrays) { 354 if (ctx->fCheckZerroVertAttr) 355 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib); 356 } 357 #endif 358 359 if (serverArrays 360 #ifdef CR_FORCE_ZVA_EXPAND 361 && !cZvaValues 362 #endif 363 ) { 364 CR_ZVA_RESTORE_CTX RestoreCtx; 191 365 GET_CONTEXT(ctx); 192 366 CRClientState *clientState = &(ctx->clientState->client); 367 368 Assert(cZvaValues < UINT32_MAX/2); 193 369 194 370 /* LockArraysEXT can not be executed between glBegin/glEnd pair, it also … … 198 374 CRASSERT(!clientState->array.locked || clientState->array.synced); 199 375 376 if (cZvaValues) 377 packspuZvaEnable(ctx, aAttrib, cZvaValues, &RestoreCtx); 378 200 379 /* Send the DrawArrays command over the wire */ 201 380 if (pack_spu.swap) … … 203 382 else 204 383 crPackArrayElement( index ); 384 385 if (cZvaValues) 386 packspuZvaDisable(&RestoreCtx); 205 387 } 206 388 else { … … 208 390 GET_CONTEXT(ctx); 209 391 CRClientState *clientState = &(ctx->clientState->client); 210 if (pack_spu.swap) 211 crPackExpandArrayElementSWAP( index, clientState ); 212 else 213 crPackExpandArrayElement( index, clientState ); 392 393 #ifdef CR_FORCE_ZVA_SERVER_ARRAY 394 CR_ZVA_RESTORE_CTX RestoreCtx; 395 396 if (cZvaValues && cZvaValues < UINT32_MAX/2) 397 packspuZvaEnable(ctx, aAttrib, cZvaValues, &RestoreCtx); 398 #endif 399 400 if (pack_spu.swap) 401 crPackExpandArrayElementSWAP( index, clientState, cZvaValues ? aAttrib : NULL ); 402 else 403 crPackExpandArrayElement( index, clientState, cZvaValues ? aAttrib : NULL ); 404 405 #ifdef CR_FORCE_ZVA_SERVER_ARRAY 406 if (cZvaValues && cZvaValues < UINT32_MAX/2) 407 packspuZvaDisable(&RestoreCtx); 408 #endif 214 409 } 215 410 #else 216 411 GET_CONTEXT(ctx); 217 412 CRClientState *clientState = &(ctx->clientState->client); 218 crPackExpandArrayElement(index, clientState );413 crPackExpandArrayElement(index, clientState, NULL); 219 414 #endif 220 415 } 221 416 222 417 /*#define CR_USE_LOCKARRAYS*/ 418 #ifdef CR_USE_LOCKARRAYS 419 # error "check Zero Vertex Attrib hack is supported properly!" 420 #endif 223 421 224 422 void PACKSPU_APIENTRY … … 226 424 { 227 425 GLboolean serverArrays = GL_FALSE; 426 GLuint cZvaValues = 0; 427 GLfloat aAttrib[4]; 228 428 229 429 #if CR_ARB_vertex_buffer_object … … 233 433 /*crDebug("DrawElements count=%d, indices=%p", count, indices);*/ 234 434 if (ctx->clientState->extensions.ARB_vertex_buffer_object) 435 { 235 436 serverArrays = crStateUseServerArrays(); 437 if (ctx->fCheckZerroVertAttr) 438 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib); 439 } 236 440 237 441 # ifdef CR_USE_LOCKARRAYS … … 298 502 #endif 299 503 300 if (serverArrays) { 504 if (serverArrays 505 #ifdef CR_FORCE_ZVA_EXPAND 506 && !cZvaValues 507 #endif 508 ) { 509 CR_ZVA_RESTORE_CTX RestoreCtx; 301 510 GET_CONTEXT(ctx); 302 511 CRClientState *clientState = &(ctx->clientState->client); 303 512 513 Assert(cZvaValues < UINT32_MAX/2); 514 515 if (cZvaValues) 516 packspuZvaEnable(ctx, aAttrib, cZvaValues, &RestoreCtx); 517 304 518 /*Note the comment in packspu_LockArraysEXT*/ 305 519 if (clientState->array.locked && !clientState->array.synced) … … 308 522 clientState->array.synced = GL_TRUE; 309 523 } 524 310 525 /* Send the DrawArrays command over the wire */ 311 526 if (pack_spu.swap) … … 313 528 else 314 529 crPackDrawElements( mode, count, type, indices ); 530 531 if (cZvaValues) 532 packspuZvaDisable(&RestoreCtx); 315 533 } 316 534 else { … … 318 536 GET_CONTEXT(ctx); 319 537 CRClientState *clientState = &(ctx->clientState->client); 320 if (pack_spu.swap) 321 crPackExpandDrawElementsSWAP( mode, count, type, indices, clientState ); 538 539 #ifdef CR_FORCE_ZVA_SERVER_ARRAY 540 CR_ZVA_RESTORE_CTX RestoreCtx; 541 542 if (cZvaValues && cZvaValues < UINT32_MAX/2) 543 packspuZvaEnable(ctx, aAttrib, cZvaValues, &RestoreCtx); 544 #endif 545 546 if (pack_spu.swap) 547 crPackExpandDrawElementsSWAP( mode, count, type, indices, clientState, cZvaValues ? aAttrib : NULL ); 322 548 else 323 549 { 324 550 //packspu_Begin(mode); 325 crPackExpandDrawElements( mode, count, type, indices, clientState );551 crPackExpandDrawElements( mode, count, type, indices, clientState, cZvaValues ? aAttrib : NULL ); 326 552 //packspu_End(); 327 553 } 554 555 #ifdef CR_FORCE_ZVA_SERVER_ARRAY 556 if (cZvaValues && cZvaValues < UINT32_MAX/2) 557 packspuZvaDisable(&RestoreCtx); 558 #endif 328 559 } 329 560 … … 341 572 { 342 573 GLboolean serverArrays = GL_FALSE; 574 GLuint cZvaValues = 0; 575 GLfloat aAttrib[4]; 343 576 344 577 #if CR_ARB_vertex_buffer_object … … 346 579 /*crDebug("DrawRangeElements count=%d", count);*/ 347 580 if (ctx->clientState->extensions.ARB_vertex_buffer_object) 581 { 348 582 serverArrays = crStateUseServerArrays(); 349 #endif 350 351 if (serverArrays) { 583 if (ctx->fCheckZerroVertAttr) 584 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib); 585 } 586 #endif 587 588 if (serverArrays 589 #ifdef CR_FORCE_ZVA_EXPAND 590 && !cZvaValues 591 #endif 592 ) { 593 CR_ZVA_RESTORE_CTX RestoreCtx; 352 594 GET_CONTEXT(ctx); 353 595 CRClientState *clientState = &(ctx->clientState->client); 354 596 597 Assert(cZvaValues < UINT32_MAX/2); 598 599 if (cZvaValues) 600 packspuZvaEnable(ctx, aAttrib, cZvaValues, &RestoreCtx); 601 355 602 /*Note the comment in packspu_LockArraysEXT*/ 356 603 if (clientState->array.locked && !clientState->array.synced) … … 365 612 else 366 613 crPackDrawRangeElements( mode, start, end, count, type, indices ); 614 615 if (cZvaValues) 616 packspuZvaDisable(&RestoreCtx); 367 617 } 368 618 else { … … 370 620 GET_CONTEXT(ctx); 371 621 CRClientState *clientState = &(ctx->clientState->client); 372 if (pack_spu.swap) 373 crPackExpandDrawRangeElementsSWAP( mode, start, end, count, type, indices, clientState ); 374 else 375 { 376 crPackExpandDrawRangeElements( mode, start, end, count, type, indices, clientState ); 377 } 622 #ifdef CR_FORCE_ZVA_SERVER_ARRAY 623 CR_ZVA_RESTORE_CTX RestoreCtx; 624 625 if (cZvaValues && cZvaValues < UINT32_MAX/2) 626 packspuZvaEnable(ctx, aAttrib, cZvaValues, &RestoreCtx); 627 #endif 628 629 if (pack_spu.swap) 630 crPackExpandDrawRangeElementsSWAP( mode, start, end, count, type, indices, clientState, cZvaValues ? aAttrib : NULL ); 631 else 632 { 633 crPackExpandDrawRangeElements( mode, start, end, count, type, indices, clientState, cZvaValues ? aAttrib : NULL ); 634 } 635 636 #ifdef CR_FORCE_ZVA_SERVER_ARRAY 637 if (cZvaValues && cZvaValues < UINT32_MAX/2) 638 packspuZvaDisable(&RestoreCtx); 639 #endif 378 640 } 379 641 } … … 384 646 { 385 647 GLboolean serverArrays = GL_FALSE; 648 GLuint cZvaValues = 0; 649 GLfloat aAttrib[4]; 386 650 387 651 #if CR_ARB_vertex_buffer_object … … 390 654 /*crDebug("DrawArrays count=%d", count);*/ 391 655 if (ctx->clientState->extensions.ARB_vertex_buffer_object) 656 { 392 657 serverArrays = crStateUseServerArrays(); 658 if (ctx->fCheckZerroVertAttr) 659 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib); 660 } 393 661 394 662 # ifdef CR_USE_LOCKARRAYS … … 409 677 #endif 410 678 411 if (serverArrays) 412 { 679 if (serverArrays 680 #ifdef CR_FORCE_ZVA_EXPAND 681 && !cZvaValues 682 #endif 683 ) 684 { 685 CR_ZVA_RESTORE_CTX RestoreCtx; 413 686 GET_CONTEXT(ctx); 414 687 CRClientState *clientState = &(ctx->clientState->client); 415 688 689 Assert(cZvaValues < UINT32_MAX/2); 690 691 if (cZvaValues) 692 packspuZvaEnable(ctx, aAttrib, cZvaValues, &RestoreCtx); 693 416 694 /*Note the comment in packspu_LockArraysEXT*/ 417 695 if (clientState->array.locked && !clientState->array.synced) … … 426 704 else 427 705 crPackDrawArrays( mode, first, count ); 706 707 if (cZvaValues) 708 packspuZvaDisable(&RestoreCtx); 428 709 } 429 710 else … … 432 713 GET_CONTEXT(ctx); 433 714 CRClientState *clientState = &(ctx->clientState->client); 434 if (pack_spu.swap) 435 crPackExpandDrawArraysSWAP( mode, first, count, clientState ); 436 else 437 crPackExpandDrawArrays( mode, first, count, clientState ); 715 #ifdef CR_FORCE_ZVA_SERVER_ARRAY 716 CR_ZVA_RESTORE_CTX RestoreCtx; 717 718 if (cZvaValues && cZvaValues < UINT32_MAX/2) 719 packspuZvaEnable(ctx, aAttrib, cZvaValues, &RestoreCtx); 720 #endif 721 722 if (pack_spu.swap) 723 crPackExpandDrawArraysSWAP( mode, first, count, clientState, cZvaValues ? aAttrib : NULL ); 724 else 725 crPackExpandDrawArrays( mode, first, count, clientState, cZvaValues ? aAttrib : NULL ); 726 727 #ifdef CR_FORCE_ZVA_SERVER_ARRAY 728 if (cZvaValues && cZvaValues < UINT32_MAX/2) 729 packspuZvaDisable(&RestoreCtx); 730 #endif 731 438 732 } 439 733 -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c
r49260 r51313 419 419 context->serverCtx = 0; 420 420 context->currentThread = NULL; 421 422 memset (&context->zvaBufferInfo, 0, sizeof (context->zvaBufferInfo)); 421 423 422 424 if (curContext == context) … … 500 502 } 501 503 504 if (thread->currentContext && newCtx != thread->currentContext && thread->currentContext->fCheckZerroVertAttr) 505 { 506 crStateCurrentRecoverNew(thread->currentContext->clientState, &thread->packer->current); 507 crStateResetCurrentPointers(&thread->packer->current); 508 } 502 509 thread->currentContext = newCtx; 503 510 crPackSetContext( thread->packer ); -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py
r51202 r51313 58 58 simple_funcs = [ 'GetIntegerv', 'GetFloatv', 'GetDoublev', 'GetBooleanv' ] 59 59 simple_swaps = [ 'SWAP32', 'SWAPFLOAT', 'SWAPDOUBLE', '(GLboolean) SWAP32' ] 60 61 vertattr_get_funcs = [ 'GetVertexAttribdv' 'GetVertexAttribfv' 'GetVertexAttribiv' ] 60 62 61 63 hard_funcs = { … … 122 124 || pname == GL_DRAW_FRAMEBUFFER_BINDING_EXT 123 125 #endif 126 || pname == GL_ARRAY_BUFFER_BINDING 127 || pname == GL_ELEMENT_ARRAY_BUFFER_BINDING 128 || pname == GL_PIXEL_PACK_BUFFER_BINDING 129 || pname == GL_PIXEL_UNPACK_BUFFER_BINDING 124 130 ) 125 131 { … … 157 163 } 158 164 """ % (params[-1][1], params[-1][1], func_name, func_name, apiutil.MakeCallString(params), func_name, func_name) 165 166 if func_name in vertattr_get_funcs: 167 print """ 168 if (pname != GL_CURRENT_VERTEX_ATTRIB_ARB) 169 { 170 #ifdef DEBUG 171 %s localparams; 172 localparams = (%s) crAlloc(__numValues(pname) * sizeof(*localparams)); 173 crState%s(index, pname, localparams); 174 crPack%s(index, %s, &writeback); 175 packspuFlush( (void *) thread ); 176 CRPACKSPU_WRITEBACK_WAIT(thread, writeback); 177 for (i=0; i<crStateHlpComponentsCount(pname); ++i) 178 { 179 if (localparams[i] != params[i]) 180 { 181 crWarning("Incorrect local state in %s for %%x param %%i", pname, i); 182 crWarning("Expected %%i but got %%i", (int)localparams[i], (int)params[i]); 183 } 184 } 185 crFree(localparams); 186 #else 187 crState%s(pname, params); 188 #endif 189 return; 190 } 191 """ % (params[-1][1], params[-1][1], func_name, func_name, apiutil.MakeCallString(params), func_name, func_name) 192 159 193 params.append( ("&writeback", "foo", 0) ) 160 194 print '\tif (pack_spu.swap)' -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_init.c
r49264 r51313 80 80 packSPUSelfDispatch(SPUDispatchTable *self) 81 81 { 82 #ifdef VBOX_WITH_CRPACKSPU_DUMPER83 82 crSPUInitDispatchTable( &(pack_spu.self) ); 84 83 crSPUCopyDispatchTable( &(pack_spu.self), self ); 85 #else86 (void)self;87 #endif88 84 } 89 85 -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c
r50095 r51313 435 435 } 436 436 437 static void packspuCheckZerroVertAttr(GLboolean fEnable) 438 { 439 GET_THREAD(thread); 440 441 thread->currentContext->fCheckZerroVertAttr = fEnable; 442 } 443 437 444 void PACKSPU_APIENTRY packspu_ChromiumParameteriCR(GLenum target, GLint value) 438 445 { … … 442 449 /* this is a pure packspu state, don't propagate it any further */ 443 450 packspuFluchOnThreadSwitch(value); 451 return; 452 case GL_CHECK_ZERO_VERT_ARRT: 453 packspuCheckZerroVertAttr(value); 444 454 return; 445 455 case GL_SHARE_CONTEXT_RESOURCES_CR: -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c
r51200 r51313 131 131 CRASSERT(buf); 132 132 133 if (ctx && ctx->fCheckZerroVertAttr) 134 { 135 crStateCurrentRecoverNew(ctx->clientState, &thread->packer->current); 136 crStateResetCurrentPointers(&thread->packer->current); 137 } 138 133 139 /* We're done packing into the current buffer, unbind it */ 134 140 crPackReleaseBuffer( thread->packer );
Note:
See TracChangeset
for help on using the changeset viewer.