VirtualBox

Changeset 52260 in vbox for trunk/src/VBox/GuestHost/OpenGL


Ignore:
Timestamp:
Aug 4, 2014 11:59:46 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95357
Message:

crOpenGL: proper support of GetErr being called from display list, better error handling

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/VBox

  • trunk/src/VBox/GuestHost/OpenGL/include/cr_pack.h

    r51315 r52260  
    252252  } while (0)
    253253
     254#define CR_CMDBLOCK_IS_STARTED( pc, op )  CRPACKBLOCKSTATE_IS_OP_STARTED((pc)->u32CmdBlockState, op)
    254255
    255256#define CR_CMDBLOCK_BEGIN( pc, op )                                 \
     
    257258    CR_LOCK_PACKER_CONTEXT(pc);                                     \
    258259    if (!cr_packer_cmd_blocks_enabled) break;                       \
    259     if (!CRPACKBLOCKSTATE_IS_STARTED(pc->u32CmdBlockState)) {       \
     260    if (!CRPACKBLOCKSTATE_IS_STARTED((pc)->u32CmdBlockState)) {       \
    260261      THREADASSERT( pc );                                           \
    261       CRASSERT( pc->currentBuffer );                                \
    262       if (!crPackBufferIsEmpty(&pc->buffer)) {                      \
    263         if ((*pc->buffer.opcode_start) != CR_NOP_OPCODE) {          \
    264           pc->Flush( pc->flush_arg );                               \
    265           Assert(crPackCanHoldOpcode( pc, 1, 4 ) );                 \
    266           CR_CMDBLOCK_OP( pc, CR_CMDBLOCKBEGIN_OPCODE );            \
     262      CRASSERT( (pc)->currentBuffer );                                \
     263      if (!crPackBufferIsEmpty(&(pc)->buffer)) {                      \
     264        if ((*(pc)->buffer.opcode_start) != CR_NOP_OPCODE) {          \
     265          (pc)->Flush( (pc)->flush_arg );                               \
     266          Assert(crPackCanHoldOpcode( (pc), 1, 4 ) );                 \
     267          CR_CMDBLOCK_OP( (pc), CR_CMDBLOCKBEGIN_OPCODE );            \
    267268        }                                                           \
    268269        else {                                                      \
    269           (*pc->buffer.opcode_start) = CR_CMDBLOCKBEGIN_OPCODE;     \
     270          (*(pc)->buffer.opcode_start) = CR_CMDBLOCKBEGIN_OPCODE;     \
    270271        }                                                           \
    271272      }                                                             \
    272273      else {                                                        \
    273         Assert(crPackCanHoldOpcode( pc, 1, 4 ) );                   \
    274         CR_CMDBLOCK_OP( pc, CR_CMDBLOCKBEGIN_OPCODE );              \
     274        Assert(crPackCanHoldOpcode( (pc), 1, 4 ) );                   \
     275        CR_CMDBLOCK_OP( (pc), CR_CMDBLOCKBEGIN_OPCODE );              \
    275276      }                                                             \
    276277    }                                                               \
    277     CRPACKBLOCKSTATE_OP_START(pc->u32CmdBlockState, op);            \
     278    Assert(!CRPACKBLOCKSTATE_IS_OP_STARTED((pc)->u32CmdBlockState, op)); \
     279    CRPACKBLOCKSTATE_OP_START((pc)->u32CmdBlockState, op);            \
     280    Assert(CRPACKBLOCKSTATE_IS_OP_STARTED((pc)->u32CmdBlockState, op)); \
    278281  } while (0)
    279282
     
    281284  do {                                                              \
    282285    if (!cr_packer_cmd_blocks_enabled) break;                       \
    283     CRPACKBLOCKSTATE_OP_STOP(pc->u32CmdBlockState, op);             \
    284     if (!CRPACKBLOCKSTATE_IS_STARTED(pc->u32CmdBlockState)) {       \
     286    Assert(CRPACKBLOCKSTATE_IS_OP_STARTED((pc)->u32CmdBlockState, op)); \
     287    CRPACKBLOCKSTATE_OP_STOP((pc)->u32CmdBlockState, op);             \
     288    Assert(!CRPACKBLOCKSTATE_IS_OP_STARTED((pc)->u32CmdBlockState, op)); \
     289    if (!CRPACKBLOCKSTATE_IS_STARTED((pc)->u32CmdBlockState)) {     \
    285290      THREADASSERT( pc );                                           \
    286       CRASSERT( pc->currentBuffer );                                \
    287       if (!crPackBufferIsEmpty(&pc->buffer)) {                      \
    288         if ((*pc->buffer.opcode_start) != CR_CMDBLOCKBEGIN_OPCODE) {\
     291      CRASSERT( (pc)->currentBuffer );                              \
     292      if (!crPackBufferIsEmpty(&(pc)->buffer)) {                    \
     293        if ((*(pc)->buffer.opcode_start) != CR_CMDBLOCKBEGIN_OPCODE) {\
    289294          if ( !crPackCanHoldOpcode( pc, 1, 4 ) ) {                 \
    290             pc->Flush( pc->flush_arg );                             \
     295            (pc)->Flush( (pc)->flush_arg );                         \
    291296            Assert(crPackCanHoldOpcode( pc, 1, 4 ) );               \
    292297          }                                                         \
    293298          CR_CMDBLOCK_OP( pc, CR_CMDBLOCKEND_OPCODE );              \
    294           pc->Flush( pc->flush_arg );                               \
     299          (pc)->Flush( (pc)->flush_arg );                           \
    295300        }                                                           \
    296301        else {                                                      \
    297           (*pc->buffer.opcode_start) = CR_NOP_OPCODE;               \
     302          (*(pc)->buffer.opcode_start) = CR_NOP_OPCODE;             \
    298303        }                                                           \
    299304      }                                                             \
     
    301306        Assert(crPackCanHoldOpcode( pc, 1, 4 ) );                   \
    302307        CR_CMDBLOCK_OP( pc, CR_CMDBLOCKEND_OPCODE );                \
    303         pc->Flush( pc->flush_arg );                                 \
     308        (pc)->Flush( pc->flush_arg );                               \
    304309      }                                                             \
    305310    }                                                               \
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h

    r51670 r52260  
    356356
    357357    GLboolean fCrCmdEnabled;
     358
     359    GLboolean fProcessingPendedCommands;
    358360
    359361    int numClients;
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_beginend.c

    r50973 r52260  
    1313    unsigned char *data_ptr;
    1414    (void) pc;
     15
     16    if (CR_CMDBLOCK_IS_STARTED(pc, CRPACKBLOCKSTATE_OP_BEGIN))
     17    {
     18        WARN(("recursive begin?"));
     19        return;
     20    }
    1521
    1622    CR_CMDBLOCK_BEGIN( pc, CRPACKBLOCKSTATE_OP_BEGIN );
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_lists.c

    r50973 r52260  
    6464    unsigned char *data_ptr;
    6565    (void) pc;
     66
     67    if (CR_CMDBLOCK_IS_STARTED(pc, CRPACKBLOCKSTATE_OP_NEWLIST))
     68    {
     69        WARN(("recursive NewList?"));
     70        return;
     71    }
     72
    6673    CR_CMDBLOCK_BEGIN( pc, CRPACKBLOCKSTATE_OP_NEWLIST );
    6774    CR_GET_BUFFERED_POINTER_NO_BEGINEND_FLUSH( pc, 16, GL_FALSE );
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_lists.c

    r45910 r52260  
    174174    CRStateBits *sb = GetCurrentBits();
    175175    CRbitvalue *bitID=g->bitid, *negbitID=g->neg_bitid;
     176
     177    CRASSERT(g_bVBoxEnableDiffOnMakeCurrent);
    176178
    177179    if (CHECKDIRTY(sb->buffer.dirty, negbitID))
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