VirtualBox

Ignore:
Timestamp:
Jun 5, 2013 3:20:56 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: more debugging

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  
    416416get_keys = num_get_values.keys() + extensions_num_get_values.keys()
    417417get_keys.sort()
    418 
    419 print "struct nv_struct { GLenum pname; unsigned int num_values; } num_values_array[] = {"
     418max_keyvalues = 0
     419
     420print """
     421struct nv_struct { GLenum pname; unsigned int num_values;
     422#ifdef VBOX_WITH_CRDUMPER
     423const char* pszName;
     424#endif
     425} num_values_array[] = {
     426"""
    420427for key in get_keys:
    421428    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)
    423439    except KeyError:
    424440        (nv, ifdef) = extensions_num_get_values[key]
     441        if max_keyvalues < nv:
     442            max_keyvalues = nv
    425443        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)
    427451        print '#endif /* %s */' % ifdef
    428452print "\t{ 0, 0 }"
    429453print "};"
     454print "#define CR_MAX_GET_VALUES %d" % max_keyvalues
    430455
    431456print """
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h

    r46368 r46395  
    395395void crServerDumpProgram(GLint id);
    396396void crServerDumpCurrentProgram();
     397void crServerDumpCurrentProgramUniforms();
    397398void crServerDumpFramesCheck();
    398 
     399void crServerDumpState();
     400
     401extern unsigned long g_CrDbgDumpEnabled;
    399402extern unsigned long g_CrDbgDumpDraw;
    400403extern unsigned long g_CrDbgDumpDrawFramesSettings;
    401404extern unsigned long g_CrDbgDumpDrawFramesAppliedSettings;
    402405extern unsigned long g_CrDbgDumpDrawFramesCount;
    403 bool crServerDumpFilter(unsigned long event);
     406
     407bool crServerDumpFilterDmp(unsigned long event, CR_DUMPER *pDumper);
     408bool 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)
    404452
    405453#define CR_SERVER_DUMP_F_DRAW_BUFF_ENTER        0x00000001
     
    409457#define CR_SERVER_DUMP_F_DRAW_PROGRAM_ENTER     0x00000100
    410458#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)
    415477
    416478#define CR_SERVER_DUMP_F_COMPILE_SHADER         0x00001000
     
    419481#define CR_SERVER_DUMP_F_SWAPBUFFERS_LEAVE      0x00020000
    420482
    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)))
    422490
    423491#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; \
    425493            crServerDumpCheckInit(); \
    426494            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); } \
    430500            crDmpStrF(cr_server.Recorder.pDumper, "=================="); \
    431501        } while (0)
    432502
    433503#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; \
    435505            crServerDumpCheckInit(); \
    436506            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(); } \
    440512            crDmpStrF(cr_server.Recorder.pDumper, "=================="); \
    441513        } while (0)
    442514
    443515#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; \
    445517            crServerDumpCheckInit(); \
    446518            crServerDumpShader((_id)); \
     
    448520
    449521#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; \
    451523            crServerDumpCheckInit(); \
    452524            crServerDumpProgram((_id)); \
     
    454526
    455527#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; \
    457529            crServerDumpCheckInit(); \
    458530            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)); } \
    460532            if (g_CrDbgDumpDrawFramesCount) { crServerDumpFramesCheck(); } \
    461533        } while (0)
    462534
    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)
    464539#else /* if !defined VBOX_WITH_CRSERVER_DUMPER */
    465540#define CR_SERVER_DUMP_DRAW_ENTER() do {} while (0)
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.c

    r46368 r46395  
    13261326}
    13271327
     1328GLvoid 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
     1339GLvoid 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
    13281350void SERVER_DISPATCH_APIENTRY
    13291351crServerMakeTmpCtxCurrent( GLint window, GLint nativeWindow, GLint context )
     
    13931415 * 0x22 - dump texture and buffer on exit */
    13941416
    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;
     1417unsigned long g_CrDbgDumpEnabled = 1;
     1418unsigned 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;
    13961427unsigned long g_CrDbgDumpDrawFramesSettings = CR_SERVER_DUMP_F_DRAW_BUFF_ENTER
    13971428        | CR_SERVER_DUMP_F_DRAW_BUFF_LEAVE
     
    14771508}
    14781509
     1510void crServerDumpCurrentProgramUniforms()
     1511{
     1512    CRContext *ctx = crStateGetCurrent();
     1513    crRecDumpCurrentProgramUniforms(&cr_server.Recorder, ctx);
     1514}
     1515
     1516void crServerDumpState()
     1517{
     1518    CRContext *ctx = crStateGetCurrent();
     1519    Assert(0);
     1520    crRecDumpGlGetState(&cr_server.Recorder, ctx);
     1521    crRecDumpGlEnableState(&cr_server.Recorder, ctx);
     1522}
     1523
    14791524void crServerDumpBuffer(int idx)
    14801525{
     
    15331578}
    15341579
    1535 bool crServerDumpFilter(unsigned long event)
     1580static uint32_t g_VDbgCDraws = 0;
     1581static uint32_t g_VDbgCFrames = 0;
     1582static uint32_t g_VDbgDoFrameDump = 0;
     1583static uint32_t g_VDbgInitFrameDump = 0;
     1584
     1585
     1586bool crServerDumpFilterOp(unsigned long event, CR_DUMPER *pDumper)
    15361587{
    15371588    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
     1639bool crServerDumpFilterDmp(unsigned long event, CR_DUMPER *pDumper)
     1640{
     1641    return CR_SERVER_DUMP_DEFAULT_FILTER_DMP(event);
    15421642}
    15431643
     
    15591659        g_CrDbgDumpDrawFramesAppliedSettings = g_CrDbgDumpDrawFramesSettings;
    15601660        g_CrDbgDumpDraw = g_CrDbgDumpDrawFramesSettings;
    1561         g_CrDbgDumpDrawFramesSettings = 0;
    15621661        crDmpStrF(cr_server.Recorder.pDumper, "***Starting draw dump for %d frames, settings(0x%x)", g_CrDbgDumpDrawFramesCount, g_CrDbgDumpDraw);
    15631662        return;
Note: See TracChangeset for help on using the changeset viewer.

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