VirtualBox

Ignore:
Timestamp:
Oct 23, 2013 4:45:07 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90174
Message:

crOpenGL: dumper fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/dump.cpp

    r49172 r49261  
    603603}
    604604
     605/* Context activation is done by the caller. */
     606void 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
    605626void crRecDumpShader(CR_RECORDER *pRec, CRContext *ctx, GLint id, GLint hwid)
    606627{
     
    608629    GLint type = 0;
    609630    GLint compileStatus = 0;
     631
     632#ifndef IN_GUEST
    610633    CRGLSLShader *pShad;
    611634
     
    634657    Assert(pShad->hwid == hwid);
    635658    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
    636669
    637670    pRec->pDispatch->GetObjectParameterivARB(hwid, GL_OBJECT_SUBTYPE_ARB, &type);
    638671    pRec->pDispatch->GetObjectParameterivARB(hwid, GL_OBJECT_COMPILE_STATUS_ARB, &compileStatus);
    639672    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);
    640675
    641676    pRec->pDispatch->GetObjectParameterivARB(hwid, GL_OBJECT_SHADER_SOURCE_LENGTH_ARB, &length);
     
    692727
    693728    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);
    694731
    695732    GLhandleARB *pShaders = (GLhandleARB*)crCalloc(cShaders * sizeof (*pShaders));
     
    15861623DECLCALLBACK(void) crDmpDumpStrDbgPrint(struct CR_DUMPER * pDumper, const char*pszStr)
    15871624{
    1588     OutputDebugStringA(pszStr);
     1625    crDmpPrint("%s\n", pszStr);
    15891626}
    15901627#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette