Changeset 49261 in vbox for trunk/src/VBox/GuestHost/OpenGL/state_tracker/dump.cpp
- Timestamp:
- Oct 23, 2013 4:45:07 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 90174
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/dump.cpp
r49172 r49261 603 603 } 604 604 605 /* Context activation is done by the caller. */ 606 void crRecDumpLog(CR_RECORDER *pRec, GLint hwid) 607 { 608 GLint cbLog = 0; 609 pRec->pDispatch->GetObjectParameterivARB(hwid, GL_OBJECT_INFO_LOG_LENGTH_ARB, &cbLog); 610 611 crDmpStrF(pRec->pDumper, "Log===%d===", hwid); 612 613 if (cbLog > 1) 614 { 615 GLchar *pszLog = (GLchar *) crAlloc(cbLog*sizeof (GLchar)); 616 617 pRec->pDispatch->GetInfoLogARB(hwid, cbLog, NULL, pszLog); 618 619 crRecDumpStrByLine(pRec->pDumper, pszLog, cbLog); 620 621 crFree(pszLog); 622 } 623 crDmpStrF(pRec->pDumper, "End Log======"); 624 } 625 605 626 void crRecDumpShader(CR_RECORDER *pRec, CRContext *ctx, GLint id, GLint hwid) 606 627 { … … 608 629 GLint type = 0; 609 630 GLint compileStatus = 0; 631 632 #ifndef IN_GUEST 610 633 CRGLSLShader *pShad; 611 634 … … 634 657 Assert(pShad->hwid == hwid); 635 658 Assert(pShad->id == id); 659 #else 660 if (!id) 661 id = hwid; 662 else if (!hwid) 663 hwid = id; 664 665 Assert(id); 666 Assert(hwid); 667 Assert(hwid == id); 668 #endif 636 669 637 670 pRec->pDispatch->GetObjectParameterivARB(hwid, GL_OBJECT_SUBTYPE_ARB, &type); 638 671 pRec->pDispatch->GetObjectParameterivARB(hwid, GL_OBJECT_COMPILE_STATUS_ARB, &compileStatus); 639 672 crDmpStrF(pRec->pDumper, "SHADER ctx(%d) id(%d) hwid(%d) type(%s) status(%d):", ctx->id, id, hwid, crRecDumpShaderTypeString(type, pRec->pDumper), compileStatus); 673 674 crRecDumpLog(pRec, hwid); 640 675 641 676 pRec->pDispatch->GetObjectParameterivARB(hwid, GL_OBJECT_SHADER_SOURCE_LENGTH_ARB, &length); … … 692 727 693 728 crDmpStrF(pRec->pDumper, "PROGRAM ctx(%d) id(%d) hwid(%d) status(%d) shaders(%d):", ctx->id, id, hwid, linkStatus, cShaders); 729 730 crRecDumpLog(pRec, hwid); 694 731 695 732 GLhandleARB *pShaders = (GLhandleARB*)crCalloc(cShaders * sizeof (*pShaders)); … … 1586 1623 DECLCALLBACK(void) crDmpDumpStrDbgPrint(struct CR_DUMPER * pDumper, const char*pszStr) 1587 1624 { 1588 OutputDebugStringA(pszStr);1625 crDmpPrint("%s\n", pszStr); 1589 1626 } 1590 1627 #endif
Note:
See TracChangeset
for help on using the changeset viewer.