Changeset 46515 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Timestamp:
- Jun 12, 2013 10:47:50 PM (12 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
r46454 r46515 395 395 void crServerDumpProgram(GLint id); 396 396 void crServerDumpCurrentProgram(); 397 void crServerDumpRecompileDumpCurrentProgram(); 398 void crServerRecompileCurrentProgram(); 397 399 void crServerDumpCurrentProgramUniforms(); 400 void crServerDumpCurrentProgramAttribs(); 398 401 void crServerDumpFramesCheck(); 399 402 void crServerDumpState(); … … 456 459 #define CR_SERVER_DUMP_F_DRAW_BUFF_ENTER 0x00000001 457 460 #define CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE 0x00000002 461 #define CR_SERVER_DUMP_F_DRAW_STATE_ENTER 0x00000004 462 #define CR_SERVER_DUMP_F_DRAW_STATE_LEAVE 0x00000008 458 463 #define CR_SERVER_DUMP_F_DRAW_TEX_ENTER 0x00000010 459 464 #define CR_SERVER_DUMP_F_DRAW_TEX_LEAVE 0x00000020 460 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER 0x00000100 461 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE 0x00000200 462 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_ENTER 0x00000400 463 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_LEAVE 0x00000800 464 #define CR_SERVER_DUMP_F_DRAW_STATE_ENTER 0x00000004 465 #define CR_SERVER_DUMP_F_DRAW_STATE_LEAVE 0x00000008 465 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER 0x00000040 466 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE 0x00000080 467 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_ENTER 0x00000100 468 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_LEAVE 0x00000200 469 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_ATTRIBS_ENTER 0x00000400 470 #define CR_SERVER_DUMP_F_DRAW_PROGRAM_ATTRIBS_LEAVE 0x00000800 471 466 472 #define CR_SERVER_DUMP_F_DRAW_ENTER_ALL (CR_SERVER_DUMP_F_DRAW_BUFF_ENTER \ 467 473 | CR_SERVER_DUMP_F_DRAW_TEX_ENTER \ 468 474 | CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER \ 469 475 | CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_ENTER \ 470 | CR_SERVER_DUMP_F_DRAW_STATE_ENTER) 476 | CR_SERVER_DUMP_F_DRAW_STATE_ENTER \ 477 | CR_SERVER_DUMP_F_DRAW_PROGRAM_ATTRIBS_ENTER) 471 478 472 479 #define CR_SERVER_DUMP_F_DRAW_LEAVE_ALL (CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE \ … … 474 481 | CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE \ 475 482 | CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_LEAVE \ 476 | CR_SERVER_DUMP_F_DRAW_STATE_LEAVE) 483 | CR_SERVER_DUMP_F_DRAW_STATE_LEAVE \ 484 | CR_SERVER_DUMP_F_DRAW_PROGRAM_ATTRIBS_LEAVE) 477 485 478 486 #define CR_SERVER_DUMP_F_DRAW_ALL (CR_SERVER_DUMP_F_DRAW_ENTER_ALL | CR_SERVER_DUMP_F_DRAW_LEAVE_ALL) 479 487 480 #define CR_SERVER_DUMP_F_COMPILE_SHADER 0x00001000481 #define CR_SERVER_DUMP_F_SHADER_SOURCE 0x00002000482 #define CR_SERVER_DUMP_F_LINK_PROGRAM 0x00004000483 488 #define CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER 0x00010000 484 489 #define CR_SERVER_DUMP_F_SWAPBUFFERS_LEAVE 0x00020000 485 490 #define CR_SERVER_DUMP_F_DRAWEL 0x00100000 491 #define CR_SERVER_DUMP_F_COMPILE_SHADER 0x01000000 492 #define CR_SERVER_DUMP_F_SHADER_SOURCE 0x02000000 493 #define CR_SERVER_DUMP_F_LINK_PROGRAM 0x04000000 486 494 487 495 … … 497 505 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAW_ENTER_ALL, cr_server.Recorder.pDumper)) break; \ 498 506 crServerDumpCheckInit(); \ 499 crDmpStrF(cr_server.Recorder.pDumper, "== > %s", __FUNCTION__); \507 crDmpStrF(cr_server.Recorder.pDumper, "==ENTER %s==", __FUNCTION__); \ 500 508 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_STATE_ENTER, cr_server.Recorder.pDumper)) { crServerDumpState(); } \ 501 509 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgram(); } \ 502 510 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_ENTER, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgramUniforms(); } \ 511 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_ATTRIBS_ENTER, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgramAttribs(); } \ 503 512 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_TEX_ENTER, cr_server.Recorder.pDumper)) { crServerDumpTextures(); } \ 504 513 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_BUFF_ENTER, cr_server.Recorder.pDumper)) { crServerDumpBuffer(-1); } \ 505 crDmpStrF(cr_server.Recorder.pDumper, "== ================"); \514 crDmpStrF(cr_server.Recorder.pDumper, "==Done ENTER %s==", __FUNCTION__); \ 506 515 } while (0) 507 516 … … 509 518 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAW_LEAVE_ALL, cr_server.Recorder.pDumper)) break; \ 510 519 crServerDumpCheckInit(); \ 511 crDmpStrF(cr_server.Recorder.pDumper, " <== %s", __FUNCTION__); \520 crDmpStrF(cr_server.Recorder.pDumper, "==LEAVE %s==", __FUNCTION__); \ 512 521 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_TEX_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpTextures(); } \ 513 522 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpBuffer(-1); } \ 514 523 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgramUniforms(); } \ 524 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_ATTRIBS_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgramAttribs(); } \ 515 525 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_PROGRAM_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpCurrentProgram(); } \ 516 526 if (CR_SERVER_DUMP_FILTER_DMP(CR_SERVER_DUMP_F_DRAW_STATE_LEAVE, cr_server.Recorder.pDumper)) { crServerDumpState(); } \ 517 crDmpStrF(cr_server.Recorder.pDumper, "== ================"); \527 crDmpStrF(cr_server.Recorder.pDumper, "==Done LEAVE %s==", __FUNCTION__); \ 518 528 } while (0) 519 529 … … 529 539 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_SHADER_SOURCE, cr_server.Recorder.pDumper)) break; \ 530 540 crServerDumpCheckInit(); \ 531 crDmpStrF(cr_server.Recorder.pDumper, "== %s", __FUNCTION__); \541 crDmpStrF(cr_server.Recorder.pDumper, "==%s==", __FUNCTION__); \ 532 542 crServerDumpShader((_id)); \ 533 crDmpStrF(cr_server.Recorder.pDumper, "== ==="); \543 crDmpStrF(cr_server.Recorder.pDumper, "==Done %s==", __FUNCTION__); \ 534 544 } while (0) 535 545 … … 537 547 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_LINK_PROGRAM, cr_server.Recorder.pDumper)) break; \ 538 548 crServerDumpCheckInit(); \ 539 crDmpStrF(cr_server.Recorder.pDumper, "== %s", __FUNCTION__); \549 crDmpStrF(cr_server.Recorder.pDumper, "==%s==", __FUNCTION__); \ 540 550 crServerDumpProgram((_id)); \ 541 crDmpStrF(cr_server.Recorder.pDumper, "== ==="); \551 crDmpStrF(cr_server.Recorder.pDumper, "==Done %s==", __FUNCTION__); \ 542 552 } while (0) 543 553 … … 545 555 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER, cr_server.Recorder.pDumper)) break; \ 546 556 crServerDumpCheckInit(); \ 547 crDmpStrF(cr_server.Recorder.pDumper, "== %s", __FUNCTION__); \557 crDmpStrF(cr_server.Recorder.pDumper, "==ENTER %s==", __FUNCTION__); \ 548 558 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)); } \ 549 559 if (g_CrDbgDumpDrawFramesCount) { crServerDumpFramesCheck(); } \ 560 crDmpStrF(cr_server.Recorder.pDumper, "==Done ENTER %s==", __FUNCTION__); \ 550 561 } while (0) 551 562 552 563 #define CR_SERVER_DUMP_SWAPBUFFERS_LEAVE() do { \ 553 564 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_SWAPBUFFERS_LEAVE, cr_server.Recorder.pDumper)) break; \ 554 crServerDumpCheckInit(); \ 555 crDmpStrF(cr_server.Recorder.pDumper, "== %s", __FUNCTION__); \ 565 crDmpStrF(cr_server.Recorder.pDumper, "==LEAVE %s==", __FUNCTION__); \ 566 crServerDumpCheckInit(); \ 567 crDmpStrF(cr_server.Recorder.pDumper, "==Done LEAVE %s==", __FUNCTION__); \ 556 568 } while (0) 557 569 … … 559 571 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAWEL, cr_server.Recorder.pDumper)) break; \ 560 572 crServerDumpCheckInit(); \ 561 crDmpStrF(cr_server.Recorder.pDumper, "== %s", __FUNCTION__); \573 crDmpStrF(cr_server.Recorder.pDumper, "==%s==", __FUNCTION__); \ 562 574 crServerDumpDrawel _msg; \ 563 575 } while (0) … … 566 578 if (!CR_SERVER_DUMP_FILTER_OP(CR_SERVER_DUMP_F_DRAWEL, cr_server.Recorder.pDumper)) break; \ 567 579 crServerDumpCheckInit(); \ 568 crDmpStrF(cr_server.Recorder.pDumper, "== %s", __FUNCTION__); \580 crDmpStrF(cr_server.Recorder.pDumper, "==%s==", __FUNCTION__); \ 569 581 crServerDumpDrawelv((_index), (_pszElFormat), (_cbEl), (_pvVal), (_cVal)); \ 570 582 } while (0) -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.c
r46453 r46515 1396 1396 unsigned long g_CrDbgDumpDraw = CR_SERVER_DUMP_F_COMPILE_SHADER 1397 1397 | CR_SERVER_DUMP_F_LINK_PROGRAM 1398 | CR_SERVER_DUMP_F_DRAW_BUFF_ENTER 1398 1399 | CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE 1399 1400 | CR_SERVER_DUMP_F_DRAW_PROGRAM_UNIFORMS_ENTER 1400 | CR_SERVER_DUMP_F_DRAW_TEX_LEAVE 1401 | CR_SERVER_DUMP_F_DRAW_PROGRAM_ATTRIBS_ENTER 1402 | CR_SERVER_DUMP_F_DRAW_TEX_ENTER 1401 1403 | CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER 1402 1404 | CR_SERVER_DUMP_F_DRAW_STATE_ENTER 1403 1405 | CR_SERVER_DUMP_F_SWAPBUFFERS_ENTER 1404 1406 | CR_SERVER_DUMP_F_DRAWEL 1407 | CR_SERVER_DUMP_F_SHADER_SOURCE 1405 1408 ; //CR_SERVER_DUMP_F_DRAW_BUFF_ENTER | CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE; 1406 1409 unsigned long g_CrDbgDumpDrawFramesSettings = CR_SERVER_DUMP_F_DRAW_BUFF_ENTER … … 1487 1490 } 1488 1491 1492 void crServerDumpRecompileDumpCurrentProgram() 1493 { 1494 crDmpStrF(cr_server.Recorder.pDumper, "==Dump(1)=="); 1495 crServerRecompileCurrentProgram(); 1496 crServerDumpCurrentProgramUniforms(); 1497 crServerDumpCurrentProgramAttribs(); 1498 crDmpStrF(cr_server.Recorder.pDumper, "Done Dump(1)"); 1499 crServerRecompileCurrentProgram(); 1500 crDmpStrF(cr_server.Recorder.pDumper, "Dump(2)"); 1501 crServerRecompileCurrentProgram(); 1502 crServerDumpCurrentProgramUniforms(); 1503 crServerDumpCurrentProgramAttribs(); 1504 crDmpStrF(cr_server.Recorder.pDumper, "Done Dump(2)"); 1505 } 1506 1507 void crServerRecompileCurrentProgram() 1508 { 1509 CRContext *ctx = crStateGetCurrent(); 1510 crRecRecompileCurrentProgram(&cr_server.Recorder, ctx); 1511 } 1512 1489 1513 void crServerDumpCurrentProgramUniforms() 1490 1514 { 1491 1515 CRContext *ctx = crStateGetCurrent(); 1516 crDmpStrF(cr_server.Recorder.pDumper, "==Uniforms=="); 1492 1517 crRecDumpCurrentProgramUniforms(&cr_server.Recorder, ctx); 1518 crDmpStrF(cr_server.Recorder.pDumper, "==Done Uniforms=="); 1519 } 1520 1521 void crServerDumpCurrentProgramAttribs() 1522 { 1523 CRContext *ctx = crStateGetCurrent(); 1524 crDmpStrF(cr_server.Recorder.pDumper, "==Attribs=="); 1525 crRecDumpCurrentProgramAttribs(&cr_server.Recorder, ctx); 1526 crDmpStrF(cr_server.Recorder.pDumper, "==Done Attribs=="); 1493 1527 } 1494 1528
Note:
See TracChangeset
for help on using the changeset viewer.