VirtualBox

Changeset 42528 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 2, 2012 11:32:51 AM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: context-connection: avoid unnecessary connection on packer init

Location:
trunk/src/VBox
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c

    r42520 r42528  
    3636
    3737#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    38     /* this is not true for packSPUInit, but will be fixed shortly */
    39 //    CRASSERT(!CRPACKSPU_IS_WDDM_CRHGSMI() == !pHgsmi);
     38    CRASSERT(!CRPACKSPU_IS_WDDM_CRHGSMI() == !pHgsmi);
    4039#endif
    4140
     
    7574    else {
    7675        /* a new pthread */
    77         crNetNewClient(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn, &(thread->netServer)
     76        crNetNewClient(&(thread->netServer)
    7877#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    7978                , pHgsmi
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py

    r42499 r42528  
    9393        if (func_name in easy_swaps.keys() and easy_swaps[func_name] != '0') or func_name in simple_funcs or func_name in hard_funcs.keys():
    9494            print '\tunsigned int i;'
    95         print '\tif (!(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))'
     95        print '\tif (!CRPACKSPU_IS_WDDM_CRHGSMI() && !(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))'
    9696        print '\t{'
    9797        print '\t\tcrError( "packspu_%s doesn\'t work when there\'s no actual network involved!\\nTry using the simplequery SPU in your chain!" );' % func_name
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c

    r42499 r42528  
    2929    int writeback = 1;
    3030    GLuint return_val = (GLuint) 0;
    31     if (!(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
     31    if (!CRPACKSPU_IS_WDDM_CRHGSMI() && !(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
    3232    {
    3333        crError("packspu_CreateProgram doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!");
     
    5858    int writeback = 1;
    5959    GLint return_val = (GLint) 0;
    60     if (!(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
     60    if (!CRPACKSPU_IS_WDDM_CRHGSMI() && !(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
    6161    {
    6262        crError("packspu_GetUniformLocation doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!");
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_init.c

    r42499 r42528  
    5151#endif
    5252
    53     /* This connects to the server, sets up the packer, etc. */
    54     thread = packspuNewThread(
     53    if (!CRPACKSPU_IS_WDDM_CRHGSMI())
     54    {
     55        /* This connects to the server, sets up the packer, etc. */
     56        thread = packspuNewThread(
    5557#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    5658            NULL
    5759#endif
    58              );
     60                 );
    5961
    60     if (!thread) {
    61         return NULL;
     62        if (!thread) {
     63            return NULL;
     64        }
     65        CRASSERT( thread == &(pack_spu.thread[0]) );
     66        pack_spu.idxThreadInUse = 0;
    6267    }
    63     CRASSERT( thread == &(pack_spu.thread[0]) );
    64     pack_spu.idxThreadInUse = 0;
    6568
    6669    packspuCreateFunctions();
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c

    r42523 r42528  
    7676{
    7777    GET_THREAD(thread);
    78     GLint writeback = pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network;
     78    GLint writeback = CRPACKSPU_IS_WDDM_CRHGSMI() ? 1 : pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network;
    7979
    8080    if (pack_spu.swap)
     
    182182    GET_THREAD(thread);
    183183    static int num_calls = 0;
    184     int writeback = pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network;
     184    int writeback = CRPACKSPU_IS_WDDM_CRHGSMI() ? 1 : pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network;
    185185    GLint return_val = (GLint) 0;
    186186    ThreadInfo *curThread = thread;
     
    264264    GLsizei i;
    265265
    266     if (!(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
     266    if (!CRPACKSPU_IS_WDDM_CRHGSMI() && !(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
    267267    {
    268268        crError( "packspu_AreTexturesResident doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
     
    304304    GLsizei i;
    305305
    306     if (!(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
     306    if (!CRPACKSPU_IS_WDDM_CRHGSMI() && !(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
    307307    {
    308308        crError( "packspu_AreProgramsResidentNV doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
     
    467467    crLockMutex(&_PackMutex);
    468468    {
    469         CRASSERT((pack_spu.numThreads>0) && (pack_spu.numThreads<MAX_THREADS));
    470 
     469        CRASSERT(CRPACKSPU_IS_WDDM_CRHGSMI() || (pack_spu.numThreads>0));
     470        CRASSERT(pack_spu.numThreads<MAX_THREADS);
    471471        for (i=0; i<MAX_THREADS; ++i)
    472472        {
     
    490490        thread->netServer.buffer_size = 64 * 1024;
    491491
    492         crNetNewClient(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn, &(thread->netServer)
     492        crNetNewClient(&(thread->netServer)
    493493#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    494494                , pHgsmi
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_netserver.h

    r42499 r42528  
    2727#endif
    2828                );
    29 DECLEXPORT(void) crNetNewClient( CRConnection *conn, CRNetServer *ns
     29DECLEXPORT(void) crNetNewClient( CRNetServer *ns
    3030#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    3131                , struct VBOXUHGSMI *pHgsmi
  • trunk/src/VBox/GuestHost/OpenGL/util/net.c

    r42499 r42528  
    305305 * We send a CR_MESSAGE_NEWCLIENT packet, then call crNetServerConnect.
    306306 */
    307 void crNetNewClient( CRConnection *conn, CRNetServer *ns
     307void crNetNewClient( CRNetServer *ns
    308308#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    309309                , struct VBOXUHGSMI *pHgsmi
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