Changeset 48615 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Timestamp:
- Sep 20, 2013 4:29:01 PM (11 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
r47628 r48615 478 478 void crServerDumpDrawelv(GLuint idx, const char*pszElFormat, uint32_t cbEl, const void *pvVal, uint32_t cVal); 479 479 480 extern int64_t g_CrDbgDumpPid; 480 481 extern unsigned long g_CrDbgDumpEnabled; 481 482 extern unsigned long g_CrDbgDumpDraw; … … 572 573 #define CR_SERVER_DUMP_DEFAULT_FILTER_DMP(_ev) (((_ev) & g_CrDbgDumpDraw) != 0) 573 574 574 #define CR_SERVER_DUMP_FILTER_OP(_ev, _pDumper) (g_CrDbgDumpEnabled && crServerDumpFilterOp((_ev), (_pDumper))) 575 #define CR_SERVER_DUMP_FILTER_OP(_ev, _pDumper) (g_CrDbgDumpEnabled \ 576 && (!g_CrDbgDumpPid \ 577 || (g_CrDbgDumpPid > 0 && ((uint64_t)g_CrDbgDumpPid) == cr_server.curClient->pid) \ 578 || (g_CrDbgDumpPid < 0 && ((uint64_t)(-g_CrDbgDumpPid)) != cr_server.curClient->pid)) \ 579 && crServerDumpFilterOp((_ev), (_pDumper))) 575 580 #define CR_SERVER_DUMP_FILTER_DMP(_ev, _pDumper) (crServerDumpFilterDmp((_ev), (_pDumper))) 576 581 … … 578 583 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAW_ENTER_ALL, cr_server.Recorder.pDumper)) break; \ 579 584 crServerDumpCheckInit(); \ 580 crDmpStrF(cr_server.Recorder.pDumper, "==ENTER %s==", __FUNCTION__); \585 crDmpStrF(cr_server.Recorder.pDumper, "==ENTER[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 581 586 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_STATE_ENTER, cr_server.Recorder.pDumper)) { crServerDumpState(); } \ 582 587 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgram(); } \ … … 585 590 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_TEX_ENTER, cr_server.Recorder.pDumper)) { crServerDumpTextures(); } \ 586 591 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_BUFF_ENTER, cr_server.Recorder.pDumper)) { crServerDumpBuffer(-1); } \ 587 crDmpStrF(cr_server.Recorder.pDumper, "==Done ENTER %s==", __FUNCTION__); \592 crDmpStrF(cr_server.Recorder.pDumper, "==Done ENTER[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 588 593 } while (0) 589 594 … … 591 596 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAW_LEAVE_ALL, cr_server.Recorder.pDumper)) break; \ 592 597 crServerDumpCheckInit(); \ 593 crDmpStrF(cr_server.Recorder.pDumper, "==LEAVE %s==", __FUNCTION__); \598 crDmpStrF(cr_server.Recorder.pDumper, "==LEAVE[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 594 599 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_TEX_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpTextures(); } \ 595 600 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpBuffer(-1); } \ … … 598 603 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgram(); } \ 599 604 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_STATE_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpState(); } \ 600 crDmpStrF(cr_server.Recorder.pDumper, "==Done LEAVE %s==", __FUNCTION__); \605 crDmpStrF(cr_server.Recorder.pDumper, "==Done LEAVE[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 601 606 } while (0) 602 607 … … 604 609 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_COMPILE_SHADER, cr_server.Recorder.pDumper)) break; \ 605 610 crServerDumpCheckInit(); \ 606 crDmpStrF(cr_server.Recorder.pDumper, "== %s", __FUNCTION__); \611 crDmpStrF(cr_server.Recorder.pDumper, "==[%d] %s", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 607 612 crServerDumpShader((_id)); \ 608 crDmpStrF(cr_server.Recorder.pDumper, "== ==="); \613 crDmpStrF(cr_server.Recorder.pDumper, "==Done[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 609 614 } while (0) 610 615 … … 612 617 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_SHADER_SOURCE, cr_server.Recorder.pDumper)) break; \ 613 618 crServerDumpCheckInit(); \ 614 crDmpStrF(cr_server.Recorder.pDumper, "== %s==", __FUNCTION__); \619 crDmpStrF(cr_server.Recorder.pDumper, "==[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 615 620 crServerDumpShader((_id)); \ 616 crDmpStrF(cr_server.Recorder.pDumper, "==Done %s==", __FUNCTION__); \621 crDmpStrF(cr_server.Recorder.pDumper, "==Done[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 617 622 } while (0) 618 623 … … 620 625 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_LINK_PROGRAM, cr_server.Recorder.pDumper)) break; \ 621 626 crServerDumpCheckInit(); \ 622 crDmpStrF(cr_server.Recorder.pDumper, "== %s==", __FUNCTION__); \627 crDmpStrF(cr_server.Recorder.pDumper, "==[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 623 628 crServerDumpProgram((_id)); \ 624 crDmpStrF(cr_server.Recorder.pDumper, "==Done %s==", __FUNCTION__); \629 crDmpStrF(cr_server.Recorder.pDumper, "==Done[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 625 630 } while (0) 626 631 … … 628 633 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER, cr_server.Recorder.pDumper)) break; \ 629 634 crServerDumpCheckInit(); \ 630 crDmpStrF(cr_server.Recorder.pDumper, "==ENTER %s==", __FUNCTION__); \635 crDmpStrF(cr_server.Recorder.pDumper, "==ENTER[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 631 636 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)); } \ 632 637 if (g_CrDbgDumpDrawFramesCount) { crServerDumpFramesCheck(); } \ 633 crDmpStrF(cr_server.Recorder.pDumper, "==Done ENTER %s==", __FUNCTION__); \638 crDmpStrF(cr_server.Recorder.pDumper, "==Done ENTER[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 634 639 } while (0) 635 640 636 641 #define CR_SERVER_DUMP_SWAPBUFFERS_LEAVE() do { \ 637 642 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_SWAPBUFFERS_LEAVE, cr_server.Recorder.pDumper)) break; \ 638 crDmpStrF(cr_server.Recorder.pDumper, "==LEAVE %s==", __FUNCTION__); \643 crDmpStrF(cr_server.Recorder.pDumper, "==LEAVE[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 639 644 crServerDumpCheckInit(); \ 640 crDmpStrF(cr_server.Recorder.pDumper, "==Done LEAVE %s==", __FUNCTION__); \645 crDmpStrF(cr_server.Recorder.pDumper, "==Done LEAVE[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 641 646 } while (0) 642 647 … … 644 649 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAWEL, cr_server.Recorder.pDumper)) break; \ 645 650 crServerDumpCheckInit(); \ 646 crDmpStrF(cr_server.Recorder.pDumper, "== %s==", __FUNCTION__); \651 crDmpStrF(cr_server.Recorder.pDumper, "==[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 647 652 crServerDumpDrawel _msg; \ 648 653 } while (0) … … 651 656 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAWEL, cr_server.Recorder.pDumper)) break; \ 652 657 crServerDumpCheckInit(); \ 653 crDmpStrF(cr_server.Recorder.pDumper, "== %s==", __FUNCTION__); \658 crDmpStrF(cr_server.Recorder.pDumper, "==[%d] %s==", (uint32_t)cr_server.curClient->pid, __FUNCTION__); \ 654 659 crServerDumpDrawelv((_index), (_pszElFormat), (_cbEl), (_pvVal), (_cVal)); \ 655 660 } while (0) -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.c
r48275 r48615 1396 1396 * 0x22 - dump texture and buffer on exit */ 1397 1397 1398 unsigned long g_CrDbgDumpEnabled = 1; 1398 int64_t g_CrDbgDumpPid = 0; 1399 unsigned long g_CrDbgDumpEnabled = 0; 1399 1400 unsigned long g_CrDbgDumpDraw = CR_SERVER_DUMP_F_COMPILE_SHADER 1400 1401 | CR_SERVER_DUMP_F_LINK_PROGRAM
Note:
See TracChangeset
for help on using the changeset viewer.