VirtualBox

Ignore:
Timestamp:
Nov 10, 2011 3:40:22 PM (13 years ago)
Author:
vboxsync
Message:

crOpenGL: flush on glEnd if some begin-end data was sent to host already - fix Win8+WinSAT halt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_pack.h

    r33475 r39265  
    5151typedef void (*CRPackErrorHandlerFunc)(int line, const char *file, GLenum error, const char *info);
    5252
    53 
     53typedef enum
     54{
     55    CRPackBeginEndStateNone = 0, /* not in begin end */
     56    CRPackBeginEndStateStarted,       /* begin issued */
     57    CRPackBeginEndStateFlushDone /* begin issued & buffer flash is done thus part of commands is issued to host */
     58} CRPackBeginEndState;
    5459/**
    5560 * Packer context
     
    6368    CRPackErrorHandlerFunc Error;
    6469    CRCurrentStatePointers current;
     70    CRPackBeginEndState enmBeginEndState;
    6571    GLvectorf bounds_min, bounds_max;
    6672    int updateBBOX;
     
    203209      pc->Flush( pc->flush_arg );                                   \
    204210      CRASSERT(crPackCanHoldOpcode( pc, 1, (len) ) );               \
     211      if (pc->enmBeginEndState == CRPackBeginEndStateStarted) {     \
     212        pc->enmBeginEndState = CRPackBeginEndStateFlushDone;        \
     213      }                                                             \
    205214    }                                                               \
    206215    data_ptr = pc->buffer.data_current;                             \
     
    218227    CRASSERT( pc->currentBuffer );                                  \
    219228    if ( pc->buffer.holds_BeginEnd && !pc->buffer.in_BeginEnd ) {   \
     229      CRASSERT( 0 );  /* should never be here currently */          \
    220230      pc->Flush( pc->flush_arg );                                   \
    221231      pc->buffer.holds_BeginEnd = 0;                                \
     
    231241    CRASSERT( pc->currentBuffer );                                  \
    232242    if ( pc->buffer.holds_BeginEnd && !pc->buffer.in_BeginEnd ) {   \
     243      CRASSERT( 0 );  /* should never be here currently */          \
    233244      pc->Flush( pc->flush_arg );                                   \
    234245      pc->buffer.holds_BeginEnd = 0;                                \
     
    248259      pc->Flush( pc->flush_arg );                       \
    249260      CRASSERT( crPackCanHoldOpcode( pc, 1, (len) ) );  \
     261      if (pc->enmBeginEndState == CRPackBeginEndStateStarted) {     \
     262        pc->enmBeginEndState = CRPackBeginEndStateFlushDone;        \
     263      }                                                             \
    250264    }                                                   \
    251265    data_ptr = pc->buffer.data_current;                 \
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