Changeset 46395 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Timestamp:
- Jun 5, 2013 3:20:56 PM (12 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/get_sizes.py
r44326 r46395 416 416 get_keys = num_get_values.keys() + extensions_num_get_values.keys() 417 417 get_keys.sort() 418 419 print "struct nv_struct { GLenum pname; unsigned int num_values; } num_values_array[] = {" 418 max_keyvalues = 0 419 420 print """ 421 struct nv_struct { GLenum pname; unsigned int num_values; 422 #ifdef VBOX_WITH_CRDUMPER 423 const char* pszName; 424 #endif 425 } num_values_array[] = { 426 """ 420 427 for key in get_keys: 421 428 try: 422 print '\t{ %s, %d },' % (key, num_get_values[key]) 429 keyvalues = num_get_values[key] 430 if max_keyvalues < keyvalues: 431 max_keyvalues = keyvalues 432 print """ 433 \t{ %s, %d 434 #ifdef VBOX_WITH_CRDUMPER 435 , "%s" 436 #endif 437 }, 438 """ % (key, keyvalues, key) 423 439 except KeyError: 424 440 (nv, ifdef) = extensions_num_get_values[key] 441 if max_keyvalues < nv: 442 max_keyvalues = nv 425 443 print '#ifdef %s' % ifdef 426 print '\t{ %s, %d },' % (key, nv) 444 print """ 445 \t{ %s, %d 446 #ifdef VBOX_WITH_CRDUMPER 447 , "%s" 448 #endif 449 }, 450 """ % (key, nv, key) 427 451 print '#endif /* %s */' % ifdef 428 452 print "\t{ 0, 0 }" 429 453 print "};" 454 print "#define CR_MAX_GET_VALUES %d" % max_keyvalues 430 455 431 456 print """ -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
r46368 r46395 395 395 void crServerDumpProgram(GLint id); 396 396 void crServerDumpCurrentProgram(); 397 void crServerDumpCurrentProgramUniforms(); 397 398 void crServerDumpFramesCheck(); 398 399 void crServerDumpState(); 400 401 extern unsigned long g_CrDbgDumpEnabled; 399 402 extern unsigned long g_CrDbgDumpDraw; 400 403 extern unsigned long g_CrDbgDumpDrawFramesSettings; 401 404 extern unsigned long g_CrDbgDumpDrawFramesAppliedSettings; 402 405 extern unsigned long g_CrDbgDumpDrawFramesCount; 403 bool crServerDumpFilter(unsigned long event); 406 407 bool crServerDumpFilterDmp(unsigned long event, CR_DUMPER *pDumper); 408 bool crServerDumpFilterOp(unsigned long event, CR_DUMPER *pDumper); 409 410 //#define CR_SERVER_DUMP_MASK_OP 0x0000fffc 411 //#define CR_SERVER_DUMP_OFF_OP 2 412 // 413 //#define CR_SERVER_DUMP_MASK_DIR 0x00000003 414 //#define CR_SERVER_DUMP_OFF_DIR 0 415 // 416 //#define CR_SERVER_DUMP_MASK_DMP 0xffff0000 417 //#define CR_SERVER_DUMP_OFF_DMP 16 418 // 419 //#define CR_SERVER_DUMP_MAKE_OP(_v) (1 << ((_v) + CR_SERVER_DUMP_OFF_OP)) 420 //#define CR_SERVER_DUMP_MAKE_DIR(_v) (1 << ((_v) + CR_SERVER_DUMP_OFF_DIR)) 421 //#define CR_SERVER_DUMP_MAKE_DMP(_v) (1 << ((_v) + CR_SERVER_DUMP_OFF_DMP)) 422 // 423 //#define CR_SERVER_DUMP_GET_OP(_v) ((_v) & CR_SERVER_DUMP_MASK_OP) 424 //#define CR_SERVER_DUMP_GET_DMP(_v) ((_v) & CR_SERVER_DUMP_MASK_DMP) 425 //#define CR_SERVER_DUMP_GET_DIR(_v) ((_v) & CR_SERVER_DUMP_MASK_DIR) 426 // 427 //#define CR_SERVER_DUMP_ISANY_OP(_v1, _v2) (!!(CR_SERVER_DUMP_GET_OP(_v1) & CR_SERVER_DUMP_GET_OP(_v2))) 428 //#define CR_SERVER_DUMP_ISANY_DIR(_v1, _v2) (!!(CR_SERVER_DUMP_GET_DIR(_v1) & CR_SERVER_DUMP_GET_DIR(_v2))) 429 //#define CR_SERVER_DUMP_ISANY_DMP(_v1, _v2) (!!(CR_SERVER_DUMP_GET_DMP(_v1) & CR_SERVER_DUMP_GET_DMP(_v2))) 430 // 431 //#define CR_SERVER_DUMP_ISANY_OP(_v1, _v2) ((CR_SERVER_DUMP_GET_OP(_v1) & CR_SERVER_DUMP_GET_OP(_v2)) == CR_SERVER_DUMP_GET_OP(_v2)) 432 //#define CR_SERVER_DUMP_ISANY_DIR(_v1, _v2) ((CR_SERVER_DUMP_GET_DIR(_v1) & CR_SERVER_DUMP_GET_DIR(_v2)) == CR_SERVER_DUMP_GET_DIR(_v2)) 433 //#define CR_SERVER_DUMP_ISANY_DMP(_v1, _v2) ((CR_SERVER_DUMP_GET_DMP(_v1) & CR_SERVER_DUMP_GET_DMP(_v2)) == CR_SERVER_DUMP_GET_DMP(_v2)) 434 // 435 //#define CR_SERVER_DUMP_F_DIR_ENTER CR_SERVER_DUMP_MAKE_DIR(0) 436 //#define CR_SERVER_DUMP_F_DIR_LEAVE CR_SERVER_DUMP_MAKE_DIR(1) 437 // 438 //#define CR_SERVER_DUMP_F_OP_DRAW CR_SERVER_DUMP_MAKE_OP(0) 439 //#define CR_SERVER_DUMP_F_OP_SWAPBUFFERS CR_SERVER_DUMP_MAKE_OP(1) 440 //#define CR_SERVER_DUMP_F_OP_LINK_PROGRAM CR_SERVER_DUMP_MAKE_OP(2) 441 //#define CR_SERVER_DUMP_F_OP_COMPILE_PROGRAM CR_SERVER_DUMP_MAKE_OP(3) 442 // 443 //#define CR_SERVER_DUMP_F_DMP_BUFF CR_SERVER_DUMP_MAKE_DMP(0) 444 //#define CR_SERVER_DUMP_F_DMP_TEX CR_SERVER_DUMP_MAKE_DMP(0) 445 //#define CR_SERVER_DUMP_F_DMP_PROGRAM CR_SERVER_DUMP_MAKE_DMP(0) 446 //#define CR_SERVER_DUMP_F_DMP_PROGRAM_UNIFORMS CR_SERVER_DUMP_MAKE_DMP(0) 447 //#define CR_SERVER_DUMP_F_DMP_STATE CR_SERVER_DUMP_MAKE_DMP(0) 448 // 449 //#define CR_SERVER_DUMP_GET_OP(_v) ((_v) & CR_SERVER_DUMP_MASK_OP) 450 //#define CR_SERVER_DUMP_GET_DMP(_v) ((_v) & CR_SERVER_DUMP_MASK_DMP) 451 //#define CR_SERVER_DUMP_GET_DIR(_v) ((_v) & CR_SERVER_DUMP_MASK_DIR) 404 452 405 453 #define CR_SERVER_DUMP_F_DRAW_BUFF_ENTER 0x00000001 … … 409 457 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER 0x00000100 410 458 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE 0x00000200 411 412 #define CR_SERVER_DUMP_F_DRAW_ALL (CR_SERVER_DUMP_F_DRAW_BUFF_ENTER | CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE \ 413 | CR_SERVER_DUMP_F_DRAW_TEX_ENTER | CR_SERVER_DUMP_F_DRAW_TEX_LEAVE \ 414 | CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER | CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE) 459 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_ENTER 0x00000400 460 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_LEAVE 0x00000800 461 #define CR_SERVER_DUMP_F_DRAW_STATE_ENTER 0x00000004 462 #define CR_SERVER_DUMP_F_DRAW_STATE_LEAVE 0x00000008 463 464 #define CR_SERVER_DUMP_F_DRAW_ENTER_ALL (CR_SERVER_DUMP_F_DRAW_BUFF_ENTER \ 465 | CR_SERVER_DUMP_F_DRAW_TEX_ENTER \ 466 | CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER \ 467 | CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_ENTER \ 468 | CR_SERVER_DUMP_F_DRAW_STATE_ENTER) 469 470 #define CR_SERVER_DUMP_F_DRAW_LEAVE_ALL (CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE \ 471 | CR_SERVER_DUMP_F_DRAW_TEX_LEAVE \ 472 | CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE \ 473 | CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_LEAVE \ 474 | CR_SERVER_DUMP_F_DRAW_STATE_LEAVE) 475 476 #define CR_SERVER_DUMP_F_DRAW_ALL (CR_SERVER_DUMP_F_DRAW_ENTER_ALL | CR_SERVER_DUMP_F_DRAW_LEAVE_ALL) 415 477 416 478 #define CR_SERVER_DUMP_F_COMPILE_SHADER 0x00001000 … … 419 481 #define CR_SERVER_DUMP_F_SWAPBUFFERS_LEAVE 0x00020000 420 482 421 #define CR_SERVER_DUMP_IF_ANY(_ev) ((g_CrDbgDumpDraw & (_ev)) && crServerDumpFilter((_ev))) 483 #define CR_SERVER_DUMP_DEFAULT_FILTER_OP(_ev) ((((_ev) & g_CrDbgDumpDraw) != 0) \ 484 || ((_ev) == CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER && g_CrDbgDumpDrawFramesCount)) 485 486 #define CR_SERVER_DUMP_DEFAULT_FILTER_DMP(_ev) (((_ev) & g_CrDbgDumpDraw) != 0) 487 488 #define CR_SERVER_DUMP_FILTER_OP(_ev, _pDumper) (g_CrDbgDumpEnabled && crServerDumpFilterOp((_ev), (_pDumper))) 489 #define CR_SERVER_DUMP_FILTER_DMP(_ev, _pDumper) (crServerDumpFilterDmp((_ev), (_pDumper))) 422 490 423 491 #define CR_SERVER_DUMP_DRAW_ENTER() do { \ 424 if (!CR_SERVER_DUMP_ IF_ANY(CR_SERVER_DUMP_F_DRAW_BUFF_ENTER | CR_SERVER_DUMP_F_DRAW_TEX_ENTER | CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER)) break; \492 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAW_ENTER_ALL, cr_server.Recorder.pDumper)) break; \ 425 493 crServerDumpCheckInit(); \ 426 494 crDmpStrF(cr_server.Recorder.pDumper, "==> %s", __FUNCTION__); \ 427 if (CR_SERVER_DUMP_IF_ANY(CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER)) { crServerDumpCurrentProgram(); } \ 428 if (CR_SERVER_DUMP_IF_ANY(CR_SERVER_DUMP_F_DRAW_TEX_ENTER)) { crServerDumpTextures(); } \ 429 if (CR_SERVER_DUMP_IF_ANY(CR_SERVER_DUMP_F_DRAW_BUFF_ENTER)) { crServerDumpBuffer(-1); } \ 495 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_STATE_ENTER, cr_server.Recorder.pDumper)) { crServerDumpState(); } \ 496 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgram(); } \ 497 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_ENTER, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgramUniforms(); } \ 498 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_TEX_ENTER, cr_server.Recorder.pDumper)) { crServerDumpTextures(); } \ 499 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_BUFF_ENTER, cr_server.Recorder.pDumper)) { crServerDumpBuffer(-1); } \ 430 500 crDmpStrF(cr_server.Recorder.pDumper, "=================="); \ 431 501 } while (0) 432 502 433 503 #define CR_SERVER_DUMP_DRAW_LEAVE() do { \ 434 if (!CR_SERVER_DUMP_ IF_ANY(CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE | CR_SERVER_DUMP_F_DRAW_TEX_LEAVE | CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE)) break; \504 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAW_LEAVE_ALL, cr_server.Recorder.pDumper)) break; \ 435 505 crServerDumpCheckInit(); \ 436 506 crDmpStrF(cr_server.Recorder.pDumper, "<== %s", __FUNCTION__); \ 437 if (CR_SERVER_DUMP_IF_ANY(CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE)) { crServerDumpBuffer(-1); } \ 438 if (CR_SERVER_DUMP_IF_ANY(CR_SERVER_DUMP_F_DRAW_TEX_LEAVE)) { crServerDumpTextures(); } \ 439 if (CR_SERVER_DUMP_IF_ANY(CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE)) { crServerDumpCurrentProgram(); } \ 507 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpBuffer(-1); } \ 508 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_TEX_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpTextures(); } \ 509 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgramUniforms(); } \ 510 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgram(); } \ 511 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_STATE_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpState(); } \ 440 512 crDmpStrF(cr_server.Recorder.pDumper, "=================="); \ 441 513 } while (0) 442 514 443 515 #define CR_SERVER_DUMP_COMPILE_SHADER(_id) do { \ 444 if (!CR_SERVER_DUMP_ IF_ANY(CR_SERVER_DUMP_F_COMPILE_SHADER)) break; \516 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_COMPILE_SHADER, cr_server.Recorder.pDumper)) break; \ 445 517 crServerDumpCheckInit(); \ 446 518 crServerDumpShader((_id)); \ … … 448 520 449 521 #define CR_SERVER_DUMP_LINK_PROGRAM(_id) do { \ 450 if (!CR_SERVER_DUMP_ IF_ANY(CR_SERVER_DUMP_F_LINK_PROGRAM)) break; \522 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_LINK_PROGRAM, cr_server.Recorder.pDumper)) break; \ 451 523 crServerDumpCheckInit(); \ 452 524 crServerDumpProgram((_id)); \ … … 454 526 455 527 #define CR_SERVER_DUMP_SWAPBUFFERS_ENTER() do { \ 456 if (! g_CrDbgDumpDrawFramesCount && !CR_SERVER_DUMP_IF_ANY(CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER)) break; \528 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER, cr_server.Recorder.pDumper)) break; \ 457 529 crServerDumpCheckInit(); \ 458 530 crDmpStrF(cr_server.Recorder.pDumper, "== %s", __FUNCTION__); \ 459 if (CR_SERVER_DUMP_ IF_ANY(CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER)) { crServerDumpBuffer(CR_SERVER_FBO_BB_IDX(cr_server.currentMural)); } \531 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER, cr_server.Recorder.pDumper)) { crServerDumpBuffer(CR_SERVER_FBO_BB_IDX(cr_server.currentMural)); } \ 460 532 if (g_CrDbgDumpDrawFramesCount) { crServerDumpFramesCheck(); } \ 461 533 } while (0) 462 534 463 #define CR_SERVER_DUMP_SWAPBUFFERS_LEAVE() do {} while (0) 535 #define CR_SERVER_DUMP_SWAPBUFFERS_LEAVE() do { \ 536 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_SWAPBUFFERS_LEAVE, cr_server.Recorder.pDumper)) break; \ 537 crServerDumpCheckInit(); \ 538 } while (0) 464 539 #else /* if !defined VBOX_WITH_CRSERVER_DUMPER */ 465 540 #define CR_SERVER_DUMP_DRAW_ENTER() do {} while (0) -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.c
r46368 r46395 1326 1326 } 1327 1327 1328 GLvoid SERVER_DISPATCH_APIENTRY crServerDispatchDrawArrays(GLenum mode, GLint first, GLsizei count) 1329 { 1330 GLenum status = cr_server.head_spu->dispatch_table.CheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER_EXT); 1331 Assert(GL_FRAMEBUFFER_COMPLETE == status); 1332 while ((status = cr_server.head_spu->dispatch_table.GetError()) != GL_NO_ERROR) {/*Assert(0);*/} 1333 CR_SERVER_DUMP_DRAW_ENTER(); 1334 cr_server.head_spu->dispatch_table.DrawArrays(mode, first, count); 1335 CR_SERVER_DUMP_DRAW_LEAVE(); 1336 while ((status = cr_server.head_spu->dispatch_table.GetError()) != GL_NO_ERROR) {Assert(0);} 1337 } 1338 1339 GLvoid SERVER_DISPATCH_APIENTRY crServerDispatchDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices) 1340 { 1341 GLenum status = cr_server.head_spu->dispatch_table.CheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER_EXT); 1342 Assert(GL_FRAMEBUFFER_COMPLETE == status); 1343 while ((status = cr_server.head_spu->dispatch_table.GetError()) != GL_NO_ERROR) {/*Assert(0);*/} 1344 CR_SERVER_DUMP_DRAW_ENTER(); 1345 cr_server.head_spu->dispatch_table.DrawElements(mode, count, type, indices); 1346 CR_SERVER_DUMP_DRAW_LEAVE(); 1347 while ((status = cr_server.head_spu->dispatch_table.GetError()) != GL_NO_ERROR) {Assert(0);} 1348 } 1349 1328 1350 void SERVER_DISPATCH_APIENTRY 1329 1351 crServerMakeTmpCtxCurrent( GLint window, GLint nativeWindow, GLint context ) … … 1393 1415 * 0x22 - dump texture and buffer on exit */ 1394 1416 1395 unsigned long g_CrDbgDumpDraw = CR_SERVER_DUMP_F_COMPILE_SHADER | CR_SERVER_DUMP_F_LINK_PROGRAM; //CR_SERVER_DUMP_F_DRAW_BUFF_ENTER | CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE; 1417 unsigned long g_CrDbgDumpEnabled = 1; 1418 unsigned long g_CrDbgDumpDraw = CR_SERVER_DUMP_F_COMPILE_SHADER 1419 | CR_SERVER_DUMP_F_LINK_PROGRAM 1420 | CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE 1421 | CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_ENTER 1422 | CR_SERVER_DUMP_F_DRAW_TEX_ENTER 1423 | CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER 1424 | CR_SERVER_DUMP_F_DRAW_STATE_ENTER 1425 | CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER 1426 ; //CR_SERVER_DUMP_F_DRAW_BUFF_ENTER | CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE; 1396 1427 unsigned long g_CrDbgDumpDrawFramesSettings = CR_SERVER_DUMP_F_DRAW_BUFF_ENTER 1397 1428 | CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE … … 1477 1508 } 1478 1509 1510 void crServerDumpCurrentProgramUniforms() 1511 { 1512 CRContext *ctx = crStateGetCurrent(); 1513 crRecDumpCurrentProgramUniforms(&cr_server.Recorder, ctx); 1514 } 1515 1516 void crServerDumpState() 1517 { 1518 CRContext *ctx = crStateGetCurrent(); 1519 Assert(0); 1520 crRecDumpGlGetState(&cr_server.Recorder, ctx); 1521 crRecDumpGlEnableState(&cr_server.Recorder, ctx); 1522 } 1523 1479 1524 void crServerDumpBuffer(int idx) 1480 1525 { … … 1533 1578 } 1534 1579 1535 bool crServerDumpFilter(unsigned long event) 1580 static uint32_t g_VDbgCDraws = 0; 1581 static uint32_t g_VDbgCFrames = 0; 1582 static uint32_t g_VDbgDoFrameDump = 0; 1583 static uint32_t g_VDbgInitFrameDump = 0; 1584 1585 1586 bool crServerDumpFilterOp(unsigned long event, CR_DUMPER *pDumper) 1536 1587 { 1537 1588 CRContext *ctx = crStateGetCurrent(); 1538 if ((event & CR_SERVER_DUMP_F_DRAW_ALL) 1539 && (!ctx->glsl.activeProgram || ctx->glsl.activeProgram->id != 21)) 1540 return false; 1541 return true; 1589 if (event & CR_SERVER_DUMP_F_DRAW_ALL) 1590 { 1591 if(!ctx->glsl.activeProgram || ctx->glsl.activeProgram->id != 21) 1592 return false; 1593 1594 if (event & CR_SERVER_DUMP_F_DRAW_ENTER_ALL) 1595 { 1596 ++g_VDbgCDraws; 1597 // crDmpStrF(cr_server.Recorder.pDumper, "DRAW(%d:%d)", g_VDbgCFrames, g_VDbgCDraws); 1598 } 1599 1600 if (!g_VDbgDoFrameDump) 1601 return false; 1602 1603 #define CR_SERVER_DUMP_MARKER_ENTER_STR "VBox.Cr.DrawEnter" 1604 #define CR_SERVER_DUMP_MARKER_LEAVE_STR "VBox.Cr.DrawLeave" 1605 1606 if (0)//(g_VDbgCFrames == 53 && g_VDbgCDraws == 13) 1607 { 1608 if (event & CR_SERVER_DUMP_F_DRAW_ENTER_ALL) 1609 cr_server.head_spu->dispatch_table.StringMarkerGREMEDY(sizeof (CR_SERVER_DUMP_MARKER_ENTER_STR), CR_SERVER_DUMP_MARKER_ENTER_STR); 1610 else 1611 cr_server.head_spu->dispatch_table.StringMarkerGREMEDY(sizeof (CR_SERVER_DUMP_MARKER_LEAVE_STR), CR_SERVER_DUMP_MARKER_LEAVE_STR); 1612 } 1613 } 1614 else if (event & CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER) 1615 { 1616 bool fSkip = true; 1617 ++g_VDbgCFrames; 1618 // crDmpStrF(cr_server.Recorder.pDumper, "FRAME(%d)", g_VDbgCFrames); 1619 g_VDbgCDraws = 0; 1620 if (g_VDbgDoFrameDump) 1621 { 1622 g_VDbgDoFrameDump = 0; 1623 fSkip = false; 1624 } 1625 1626 if (g_VDbgInitFrameDump) 1627 { 1628 g_VDbgDoFrameDump = 1; 1629 g_VDbgInitFrameDump = 0; 1630 } 1631 1632 if (fSkip) 1633 return false; 1634 } 1635 1636 return CR_SERVER_DUMP_DEFAULT_FILTER_OP(event); 1637 } 1638 1639 bool crServerDumpFilterDmp(unsigned long event, CR_DUMPER *pDumper) 1640 { 1641 return CR_SERVER_DUMP_DEFAULT_FILTER_DMP(event); 1542 1642 } 1543 1643 … … 1559 1659 g_CrDbgDumpDrawFramesAppliedSettings = g_CrDbgDumpDrawFramesSettings; 1560 1660 g_CrDbgDumpDraw = g_CrDbgDumpDrawFramesSettings; 1561 g_CrDbgDumpDrawFramesSettings = 0;1562 1661 crDmpStrF(cr_server.Recorder.pDumper, "***Starting draw dump for %d frames, settings(0x%x)", g_CrDbgDumpDrawFramesCount, g_CrDbgDumpDraw); 1563 1662 return;
Note:
See TracChangeset
for help on using the changeset viewer.