VirtualBox

Ignore:
Timestamp:
Apr 18, 2019 12:07:07 AM (6 years ago)
Author:
vboxsync
Message:

Merge first stage of the Chromium cleanup from the branch:

  • r129818 (Remove VBOX_WITH_CR_DISPLAY_LISTS and accompanying code as it was disabled since r108676 and was never brought back (see ​bugref:3456 and ​bugref:8485))
  • r129819 (HostServices/SharedOpenGL: Remove unused main entry point from upstream server process based implementation)
  • r129820 (HostServices/SharedOpenGL: Started eliminating all backends other than HGCM. They are not used and probably wouldn't work anymore anyway)
  • r129821 (HostServices/SharedOpenGL,GuestHost/OpenGLAdditions/common/crOpenGL: Kill crTimer* API as it is not used anywhere)
  • r129822 (HostServices/SharedOpenGL,GuestHost/OpenGLAdditions/common/crOpenGL: Kill most from cr_process.h apart from two used methods)
  • r129823 (HostServices/SharedOpenGL,GuestHost/OpenGLAdditions/common/crOpenGL: Kill crList* API as it is unused)
  • r129824 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill crHullInteriorBox API as it is unused)
  • r129825 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill crWarpPoint API as it is unused)
  • r129826 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill CrSa* API as it is unused and not even compiled in)
  • r129827 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill cr_bbox.h as it is unused)
  • r129828 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove a few crParseUrl() two uses)
  • r129829 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove last crParseURL() use)
  • r129830 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove crParseURL())
  • r129831 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove VBOX_WITH_COCOA_QT and related code when not set as it is the default for years now and we don't support anything else anymore)
  • r129832 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused cr_logo.h)
  • r129833 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused crut_api.h and crut_clientapi.h)
  • r129834 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused cr_dmx.h)
  • r129835 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused cr_perf.h)
  • r129836 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove cr_rand.h and friends as it is not actively used anywhere)
  • r129837 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of all the swapped versions in the packer SPU, we never change endianess from guest to host and don't need it)
  • r129838 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove more swapper versions in the packer related code)
  • r129839 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove more swapper versions in the packer related code)
  • r129840 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused pack_pica.c)
  • r129841 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove more swapper versions in the packer related code)
  • r129842 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of cr_endianess.h and friends)
  • r129843 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused lowercase.py)
  • r129844 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused cr_calllists.h and friends)
  • r129845 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of completely unused idpool.c, not even compiled in)
  • r129846 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused cr_debugopcodes.h and friends)
  • r129847 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Make the cr_mem.h API inline and get rid of the implementation in the util library)
  • r129848 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of SPUOptions and related code as it is of no use for us)
  • r129849 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of cr_environment.h and friends and convert usage to RTEnv* APIs)
  • r129850 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused renderspu_agl.c)
  • r129851 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused code in cr_htable.h)
  • r129853 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Introduce a state paremeter for the unpacker workers instead of reyling on global variables, work in progress)
  • r129854 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Let the caller of crUnpack set up the initial state. This allows to get rid of the global return_ptr and writeback_ptr as they get supplied in the unpacker state by the server)
  • r129855 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of the cr_lastDispatch and cr_unpackDispatch as they are of no use now)
  • r129856 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of the global cr_unpackData and cr_unpackDataEnd symbols by indtroducing another hack to make it possible for certail server dispatch callbacks to access the data buffer)
  • r129857 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: build fix for release builds)
  • r129858 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Make the pointer to the unpacker state non const (is required for the access verification))
  • r129859 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: First iteration of the buffer size validation to prevent out of bound read access + added todos for places where additional checks are needed)
  • r129860 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129861 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129871 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129872 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Stop as soon as the unpacker encountered an error)
  • r129876 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129880 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129882 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Fixed some offsets in unpack_texture.c, 3DMark03 renders correctly again)
  • r130013 (HostServices/SharedOpenGL: Convert files to C++ so we can use C99 featuers on Windows with cl.exe)
  • r130014 (HostServices/SharedOpenGL,GuestHost/OpenGL: WIndows build fixes)
  • r130015 (HostServices/SharedOpenGL,GuestHost/OpenGL: More Windows build fixes)
  • r130036 (Config.kmk: Fix linker error on Windows by temporarily disabling the use of VBoxGuestR3DllMinW2K)
  • r130094 (src/VBox/GuestHost/OpenGL: Revert inlining the allocation/free functions in R3 completely as it doesn't work on Windows if memory is allocated and freed across different DLLs which don't share a common CRT, causes crashes in RtlValidtaeHeap())
  • r130095 (src/VBox/GuestHost/OpenGL,src/VBox/Additions/common/crOpenGL/pack: Don't use floating point specifiers in packspu_GetString() to avoid R6002 errors (couldn't fully understand why they occur suddenly after the rework but this gets rid of it))
Location:
trunk
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:mergeinfo
      •  

        old new  
        99/branches/VBox-5.1:112367,115992,116543,116550,116568,116573
        1010/branches/VBox-5.2:119536,120083,120099,120213,120221,120239,123597-123598,123600-123601,123755,124260,124263,124271,124273,124277-124279,124284-124286,124288-124290,125768,125779-125780,125812
         11/branches/aeichner/vbox-chromium-cleanup:129816,129818-129851,129853-129861,129871-129872,129876,129880,129882,130013-130015,130036,130094-130095
        1112/branches/andy/draganddrop:90781-91268
        1213/branches/andy/guestctrl20:78916,78930
  • trunk/src/VBox

    • Property svn:mergeinfo
      •  

        old new  
        99/branches/VBox-5.1/src/VBox:112367,116543,116550,116568,116573
        1010/branches/VBox-5.2/src/VBox:119536,120083,120099,120213,120221,120239,123597-123598,123600-123601,123755,124263,124273,124277-124279,124284-124286,124288-124290,125768,125779-125780,125812,127158-127159,127162-127167,127180
         11/branches/aeichner/vbox-chromium-cleanup/src/VBox:129818-129851,129853-129861,129871-129872,129876,129880,129882,130013-130015,130094-130095
        1112/branches/andy/draganddrop/src/VBox:90781-91268
        1213/branches/andy/guestctrl20/src/VBox:78916,78930
  • trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu_config.c

    r69310 r78190  
    1515}
    1616
    17 /* No SPU options yet.
    18  */
    19 SPUOptions arraySPUOptions[] = {
    20    { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
    21 };
    22 
    23 
    2417void arrayspuSetVBoxConfiguration( void )
    2518{
  • trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu_init.c

    r69310 r78190  
    1111
    1212extern SPUNamedFunctionTable _cr_array_table[];
    13 
    14 extern SPUOptions arraySPUOptions[];
    1513
    1614static SPUFunctions array_functions = {
     
    7371int SPULoad( char **name, char **super, SPUInitFuncPtr *init,
    7472         SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup,
    75          SPUOptionsPtr *options, int *flags )
     73         int *flags )
    7674{
    7775    *name = "array";
     
    8078    *self = arraySPUSelfDispatch;
    8179    *cleanup = arraySPUCleanup;
    82     *options = arraySPUOptions;
    8380    *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
    8481
  • trunk/src/VBox/Additions/common/crOpenGL/context.c

    r69310 r78190  
    2929#include "cr_mem.h"
    3030#include "cr_string.h"
    31 #include "cr_environment.h"
    3231#include "stub.h"
    3332
  • trunk/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu.h

    r76563 r78190  
    1818
    1919#include "cr_spu.h"
    20 #include "cr_timer.h"
    2120#include "cr_glstate.h"
    2221
     
    5251extern SPUNamedFunctionTable _cr_feedback_table[];
    5352
    54 extern SPUOptions feedbackSPUOptions[];
    55 
    5653extern void feedbackspuGatherConfiguration( void );
    5754
  • trunk/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_config.c

    r63206 r78190  
    66
    77#include "cr_string.h"
    8 #include "cr_environment.h"
    98#include "cr_error.h"
    109#include "cr_mem.h"
     
    2120}
    2221
    23 static void set_default_viewport( void *foo, const char *response )
    24 {
    25    (void) foo;
    26    sscanf( response, "%d", &(feedback_spu.default_viewport) );
    27 }
    28 
    29 /* option, type, nr, default, min, max, title, callback
    30  */
    31 SPUOptions feedbackSPUOptions[] = {
    32 
    33    { "default_viewport", CR_BOOL, 1, "0", "0", "1",
    34      "Return default viewport parameters", (SPUOptionCB)set_default_viewport },
    35 
    36    { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
    37 
    38 };
    39 
    4022
    4123void feedbackspuGatherConfiguration( void )
  • trunk/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_init.c

    r69310 r78190  
    66
    77#include "cr_spu.h"
    8 #include "cr_environment.h"
    98#include "cr_string.h"
    109#include "cr_error.h"
     
    7372int SPULoad( char **name, char **super, SPUInitFuncPtr *init,
    7473             SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup,
    75              SPUOptionsPtr *options, int *flags )
     74             int *flags )
    7675{
    7776        *name = "feedback";
     
    8079        *self = feedbackSPUSelfDispatch;
    8180        *cleanup = feedbackSPUCleanup;
    82         *options = feedbackSPUOptions;
    8381        *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
    8482
  • trunk/src/VBox/Additions/common/crOpenGL/icd_drv.c

    r76553 r78190  
    2828
    2929#include <iprt/win/windows.h>
     30
     31#include <stdio.h> /*sprintf*/
    3032
    3133/// @todo consider
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r76474 r78190  
    1111#include "cr_string.h"
    1212#include "cr_net.h"
    13 #include "cr_environment.h"
    1413#include "cr_process.h"
    15 #include "cr_rand.h"
    1614#include "cr_netserver.h"
    1715#include "stub.h"
     
    1917#include <string.h>
    2018#include <signal.h>
     19#include <stdio.h> /*swprintf*/
    2120#include <iprt/initterm.h>
    2221#include <iprt/thread.h>
    2322#include <iprt/errcore.h>
    2423#include <iprt/asm.h>
     24#include <iprt/env.h>
    2525#ifndef WINDOWS
    2626# include <sys/types.h>
     
    601601
    602602
    603 #if 0 /* unused */
    604 
    605 /**
    606  * Return a free port number for the mothership to use, or -1 if we
    607  * can't find one.
    608  */
    609 static int
    610 GenerateMothershipPort(void)
    611 {
    612     const int MAX_PORT = 10100;
    613     unsigned short port;
    614 
    615     /* generate initial port number randomly */
    616     crRandAutoSeed();
    617     port = (unsigned short) crRandInt(10001, MAX_PORT);
    618 
    619 #ifdef WINDOWS
    620     /* XXX should implement a free port check here */
    621     return port;
    622 #else
    623     /*
    624      * See if this port number really is free, try another if needed.
    625      */
    626     {
    627         struct sockaddr_in servaddr;
    628         int so_reuseaddr = 1;
    629         int sock, k;
    630 
    631         /* create socket */
    632         sock = socket(AF_INET, SOCK_STREAM, 0);
    633         CRASSERT(sock > 2);
    634 
    635         /* deallocate socket/port when we exit */
    636         k = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
    637                                      (char *) &so_reuseaddr, sizeof(so_reuseaddr));
    638         CRASSERT(k == 0);
    639 
    640         /* initialize the servaddr struct */
    641         crMemset(&servaddr, 0, sizeof(servaddr) );
    642         servaddr.sin_family = AF_INET;
    643         servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
    644 
    645         while (port < MAX_PORT) {
    646             /* Bind to the given port number, return -1 if we fail */
    647             servaddr.sin_port = htons((unsigned short) port);
    648             k = bind(sock, (struct sockaddr *) &servaddr, sizeof(servaddr));
    649             if (k) {
    650                 /* failed to create port. try next one. */
    651                 port++;
    652             }
    653             else {
    654                 /* free the socket/port now so mothership can make it */
    655                 close(sock);
    656                 return port;
    657             }
    658         }
    659     }
    660 #endif /* WINDOWS */
    661     return -1;
    662 }
    663 
    664 
    665 /**
    666  * Try to determine which mothership configuration to use for this program.
    667  */
    668 static char **
    669 LookupMothershipConfig(const char *procName)
    670 {
    671     const int procNameLen = crStrlen(procName);
    672     FILE *f;
    673     const char *home;
    674     char configPath[1000];
    675 
    676     /* first, check if the CR_CONFIG env var is set */
    677     {
    678         const char *conf = crGetenv("CR_CONFIG");
    679         if (conf && crStrlen(conf) > 0)
    680             return crStrSplit(conf, " ");
    681     }
    682 
    683     /* second, look up config name from config file */
    684     home = crGetenv("HOME");
    685     if (home)
    686         sprintf(configPath, "%s/%s", home, CONFIG_LOOKUP_FILE);
    687     else
    688         crStrcpy(configPath, CONFIG_LOOKUP_FILE); /* from current dir */
    689     /* Check if the CR_CONFIG_PATH env var is set. */
    690     {
    691         const char *conf = crGetenv("CR_CONFIG_PATH");
    692         if (conf)
    693             crStrcpy(configPath, conf); /* from env var */
    694     }
    695 
    696     f = fopen(configPath, "r");
    697     if (!f) {
    698         return NULL;
    699     }
    700 
    701     while (!feof(f)) {
    702         char line[1000];
    703         char **args;
    704         fgets(line, 999, f);
    705         line[crStrlen(line) - 1] = 0; /* remove trailing newline */
    706         if (crStrncmp(line, procName, procNameLen) == 0 &&
    707             (line[procNameLen] == ' ' || line[procNameLen] == '\t'))
    708         {
    709             crWarning("Using Chromium configuration for %s from %s",
    710                                 procName, configPath);
    711             args = crStrSplit(line + procNameLen + 1, " ");
    712             return args;
    713         }
    714     }
    715     fclose(f);
    716     return NULL;
    717 }
    718 
    719 
    720 static int Mothership_Awake = 0;
    721 
    722 
    723 /**
    724  * Signal handler to determine when mothership is ready.
    725  */
    726 static void
    727 MothershipPhoneHome(int signo)
    728 {
    729     crDebug("Got signal %d: mothership is awake!", signo);
    730     Mothership_Awake = 1;
    731 }
    732 
    733 #endif /* 0 */
    734 
    735603static void stubSetDefaultConfigurationOptions(void)
    736604{
    737     unsigned char key[16]= {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    738 
    739605    stub.appDrawCursor = 0;
    740606    stub.minChromiumWindowWidth = 0;
     
    752618    stub.matchChromiumWindowCount = 0;
    753619    stub.spu_dir = NULL;
    754     crNetSetRank(0);
    755     crNetSetContextRange(32, 35);
    756     crNetSetNodeRange("iam0", "iamvis20");
    757     crNetSetKey(key,sizeof(key));
    758620    stub.force_pbuffers = 0;
    759621
     
    963825
    964826    /** @todo check if it'd be of any use on other than guests, no use for windows */
    965     app_id = crGetenv( "CR_APPLICATION_ID_NUMBER" );
     827    app_id = RTEnvGet( "CR_APPLICATION_ID_NUMBER" );
    966828
    967829    crNetInit( NULL, NULL );
     
    13471209
    13481210#ifdef VDBG_VEHANDLER
    1349         env = crGetenv("CR_DBG_VEH_ENABLE");
     1211        env = RTEnvGet("CR_DBG_VEH_ENABLE");
    13501212        g_VBoxVehEnable = crStrParseI32(env,
    13511213# ifdef DEBUG_misha
     
    13621224            size_t cChars;
    13631225
    1364             env = crGetenv("CR_DBG_VEH_FLAGS");
     1226            env = RTEnvGet("CR_DBG_VEH_FLAGS");
    13651227            g_VBoxVehFlags = crStrParseI32(env,
    13661228                    0
     
    13721234                    );
    13731235
    1374             env = crGetenv("CR_DBG_VEH_DUMP_DIR");
     1236            env = RTEnvGet("CR_DBG_VEH_DUMP_DIR");
    13751237            if (!env)
    13761238                env = VBOXMD_DUMP_DIR_DEFAULT;
     
    14101272            g_aszwVBoxMdFilePrefix[g_cVBoxMdFilePrefixLen] = L'\0';
    14111273
    1412             env = crGetenv("CR_DBG_VEH_DUMP_TYPE");
     1274            env = RTEnvGet("CR_DBG_VEH_DUMP_TYPE");
    14131275
    14141276            g_enmVBoxMdDumpType = crStrParseI32(env,
  • trunk/src/VBox/Additions/common/crOpenGL/pack/pack.py

    r69310 r78190  
    5353        print('\t__fillin(%3d, "%s", (SPUGenericFunction) packspu_%s);' % (index, func_name, func_name ))
    5454    else:
    55         print('\t__fillin(%3d, "%s", (SPUGenericFunction) (pack_spu.swap ? crPack%sSWAP : crPack%s));' % (index, func_name, func_name, func_name ))
     55        print('\t__fillin(%3d, "%s", (SPUGenericFunction) (crPack%s));' % (index, func_name, func_name ))
    5656print('\t__fillin(%3d, NULL, NULL);' % num_funcs)
    5757print('}')
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu.h

    r76563 r78190  
    8282typedef struct {
    8383    int id;
    84     int swap;
    8584
    8685    /* config options */
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py

    r69310 r78190  
    4848#endif
    4949
    50     if (pack_spu.swap)
    51     {
    52         crPackBeginSWAP( mode );
    53     }
    54     else
    55     {
    56         crPackBegin( mode );
    57     }
    58 
     50    crPackBegin( mode );
    5951    if ( thread->netServer.conn->Barf ) {
    6052        thread->BeginEndMode = mode;
     
    9991    }
    10092
    101     if (pack_spu.swap)
    102     {
    103         crPackEndSWAP();
    104     }
    105     else
    106     {
    107         crPackEnd();
    108     }
     93    crPackEnd();
    10994}
    11095
     
    166151    print('void PACKSPU_APIENTRY packspu_%s(%s)' % ( func_name, apiutil.MakeDeclarationString(params) ))
    167152    print('{')
    168     print('\tif (pack_spu.swap)')
    169     print('\t{')
    170     print('\t\tcrPack%sSWAP(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    171     print('\t}')
    172     print('\telse')
    173     print('\t{')
    174     print('\t\tcrPack%s(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    175     print('\t}')
     153    print('\tcrPack%s(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    176154    print('\tRunState();')
    177155    print('}')
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_bufferobject.c

    r69310 r78190  
    140140        crError( "packspu_GenBuffersARB doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
    141141    }
    142     if (pack_spu.swap)
    143     {
    144         crPackGenBuffersARBSWAP( n, buffer, &writeback );
    145     }
    146     else
    147     {
    148         crPackGenBuffersARB( n, buffer, &writeback );
    149     }
     142
     143    crPackGenBuffersARB( n, buffer, &writeback );
    150144    packspuFlush( (void *) thread );
    151145    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c

    r69310 r78190  
    1515#if CR_ARB_vertex_buffer_object
    1616    GET_CONTEXT(ctx);
    17     if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    18         if (pack_spu.swap)
    19             crPackFogCoordPointerEXTSWAP( type, stride, pointer );
    20         else
    21             crPackFogCoordPointerEXT( type, stride, pointer );
     17   if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
     18        crPackFogCoordPointerEXT( type, stride, pointer );
    2219    }
    2320#endif
     
    3027    GET_CONTEXT(ctx);
    3128    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    32         if (pack_spu.swap)
    33             crPackColorPointerSWAP( size, type, stride, pointer );
    34         else
    35             crPackColorPointer( size, type, stride, pointer );
     29        crPackColorPointer( size, type, stride, pointer );
    3630    }
    3731#endif
     
    4438    GET_CONTEXT(ctx);
    4539    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    46         if (pack_spu.swap)
    47             crPackSecondaryColorPointerEXTSWAP( size, type, stride, pointer );
    48         else
    49             crPackSecondaryColorPointerEXT( size, type, stride, pointer );
     40        crPackSecondaryColorPointerEXT( size, type, stride, pointer );
    5041    }
    5142#endif
     
    5950    CRASSERT(ctx->clientState->extensions.ARB_vertex_buffer_object);
    6051    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    61         if (pack_spu.swap)
    62             crPackVertexPointerSWAP( size, type, stride, pointer );
    63         else
    64             crPackVertexPointer( size, type, stride, pointer );
     52        crPackVertexPointer( size, type, stride, pointer );
    6553    }
    6654#endif
     
    7361    GET_CONTEXT(ctx);
    7462    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    75         if (pack_spu.swap)
    76             crPackTexCoordPointerSWAP( size, type, stride, pointer );
    77         else
    78             crPackTexCoordPointer( size, type, stride, pointer );
     63        crPackTexCoordPointer( size, type, stride, pointer );
    7964    }
    8065#endif
     
    8772    GET_CONTEXT(ctx);
    8873    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    89         if (pack_spu.swap)
    90             crPackNormalPointerSWAP( type, stride, pointer );
    91         else
    92             crPackNormalPointer( type, stride, pointer );
     74        crPackNormalPointer( type, stride, pointer );
    9375    }
    9476#endif
     
    10183    GET_CONTEXT(ctx);
    10284    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    103         if (pack_spu.swap)
    104             crPackEdgeFlagPointerSWAP( stride, pointer );
    105         else
    106             crPackEdgeFlagPointer( stride, pointer );
     85        crPackEdgeFlagPointer( stride, pointer );
    10786    }
    10887#endif
     
    11594    GET_CONTEXT(ctx);
    11695    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    117         if (pack_spu.swap)
    118             crPackVertexAttribPointerARBSWAP( index, size, type, normalized, stride, pointer );
    119         else
    120             crPackVertexAttribPointerARB( index, size, type, normalized, stride, pointer );
     96        crPackVertexAttribPointerARB( index, size, type, normalized, stride, pointer );
    12197    }
    12298#endif
     
    129105    GET_CONTEXT(ctx);
    130106    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    131         if (pack_spu.swap)
    132             crPackVertexAttribPointerNVSWAP( index, size, type, stride, pointer );
    133         else
    134             crPackVertexAttribPointerNV( index, size, type, stride, pointer );
     107        crPackVertexAttribPointerNV( index, size, type, stride, pointer );
    135108    }
    136109#endif
     
    143116    GET_CONTEXT(ctx);
    144117    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    145         if (pack_spu.swap)
    146             crPackIndexPointerSWAP( type, stride, pointer );
    147         else
    148             crPackIndexPointer( type, stride, pointer );
     118        crPackIndexPointer( type, stride, pointer );
    149119    }
    150120#endif
     
    162132    GET_CONTEXT(ctx);
    163133    if (ctx->clientState->extensions.ARB_vertex_buffer_object) {
    164         if (pack_spu.swap)
    165             crPackInterleavedArraysSWAP( format, stride, pointer );
    166         else
    167             crPackInterleavedArrays( format, stride, pointer );
     134        crPackInterleavedArrays( format, stride, pointer );
    168135    }
    169136#endif
     
    380347
    381348        /* Send the DrawArrays command over the wire */
    382         if (pack_spu.swap)
    383             crPackArrayElementSWAP( index );
    384         else
    385             crPackArrayElement( index );
     349        crPackArrayElement( index );
    386350
    387351        if (cZvaValues)
     
    400364#endif
    401365
    402         if (pack_spu.swap)
    403             crPackExpandArrayElementSWAP( index, clientState, cZvaValues ? aAttrib : NULL );
    404         else
    405             crPackExpandArrayElement( index, clientState, cZvaValues ? aAttrib : NULL );
     366        crPackExpandArrayElement( index, clientState, cZvaValues ? aAttrib : NULL );
    406367
    407368#ifdef CR_FORCE_ZVA_SERVER_ARRAY
     
    529490
    530491        /* Send the DrawArrays command over the wire */
    531         if (pack_spu.swap)
    532             crPackDrawElementsSWAP( mode, count, type, indices );
    533         else
    534             crPackDrawElements( mode, count, type, indices );
     492        crPackDrawElements( mode, count, type, indices );
    535493
    536494        if (cZvaValues)
     
    549507#endif
    550508
    551         if (pack_spu.swap)
    552             crPackExpandDrawElementsSWAP( mode, count, type, indices, clientState, cZvaValues ? aAttrib : NULL );
    553         else
    554         {
    555             //packspu_Begin(mode);
    556             crPackExpandDrawElements( mode, count, type, indices, clientState, cZvaValues ? aAttrib : NULL );
    557             //packspu_End();
    558         }
     509        //packspu_Begin(mode);
     510        crPackExpandDrawElements( mode, count, type, indices, clientState, cZvaValues ? aAttrib : NULL );
     511        //packspu_End();
    559512
    560513#ifdef CR_FORCE_ZVA_SERVER_ARRAY
     
    615568
    616569        /* Send the DrawRangeElements command over the wire */
    617         if (pack_spu.swap)
    618             crPackDrawRangeElementsSWAP( mode, start, end, count, type, indices );
    619         else
    620             crPackDrawRangeElements( mode, start, end, count, type, indices );
     570        crPackDrawRangeElements( mode, start, end, count, type, indices );
    621571
    622572        if (cZvaValues)
     
    634584#endif
    635585
    636         if (pack_spu.swap)
    637             crPackExpandDrawRangeElementsSWAP( mode, start, end, count, type, indices, clientState, cZvaValues ? aAttrib : NULL );
    638         else
    639         {
    640             crPackExpandDrawRangeElements( mode, start, end, count, type, indices, clientState, cZvaValues ? aAttrib : NULL );
    641         }
     586        crPackExpandDrawRangeElements( mode, start, end, count, type, indices, clientState, cZvaValues ? aAttrib : NULL );
    642587
    643588#ifdef CR_FORCE_ZVA_SERVER_ARRAY
     
    709654
    710655        /* Send the DrawArrays command over the wire */
    711         if (pack_spu.swap)
    712             crPackDrawArraysSWAP( mode, first, count );
    713         else
    714             crPackDrawArrays( mode, first, count );
     656        crPackDrawArrays( mode, first, count );
    715657
    716658        if (cZvaValues)
     
    729671#endif
    730672
    731         if (pack_spu.swap)
    732             crPackExpandDrawArraysSWAP( mode, first, count, clientState, cZvaValues ? aAttrib : NULL );
    733         else
    734             crPackExpandDrawArrays( mode, first, count, clientState, cZvaValues ? aAttrib : NULL );
     673        crPackExpandDrawArrays( mode, first, count, clientState, cZvaValues ? aAttrib : NULL );
    735674
    736675#ifdef CR_FORCE_ZVA_SERVER_ARRAY
     
    809748    {
    810749        crStateEnable(cap);
    811 
    812         if (pack_spu.swap)
    813             crPackEnableSWAP(cap);
    814         else
    815             crPackEnable(cap);
     750        crPackEnable(cap);
    816751    }
    817752    else
     
    834769    {
    835770        crStateDisable(cap);
    836 
    837         if (pack_spu.swap)
    838             crPackDisableSWAP(cap);
    839         else
    840             crPackDisable(cap);
     771        crPackDisable(cap);
    841772    }
    842773    else
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_config.c

    r69310 r78190  
    2323
    2424
    25 static void set_emit( void *foo, const char *response )
    26 {
    27     RT_NOREF(foo);
    28     sscanf( response, "%d", &(pack_spu.emit_GATHER_POST_SWAPBUFFERS) );
    29 }
    30 
    31 static void set_swapbuffer_sync( void *foo, const char *response )
    32 {
    33     RT_NOREF(foo);
    34     sscanf( response, "%d", &(pack_spu.swapbuffer_sync) );
    35 }
    36 
    37 
    38 
    39 /* No SPU options yet. Well.. not really..
    40  */
    41 SPUOptions packSPUOptions[] = {
    42     { "emit_GATHER_POST_SWAPBUFFERS", CR_BOOL, 1, "0", NULL, NULL,
    43       "Emit a parameter after SwapBuffers", (SPUOptionCB)set_emit },
    44 
    45     { "swapbuffer_sync", CR_BOOL, 1, "1", NULL, NULL,
    46         "Sync on SwapBuffers", (SPUOptionCB) set_swapbuffer_sync },
    47 
    48     { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
    49 };
    50 
    51 
    5225void packspuSetVBoxConfiguration( const SPU *child_spu )
    5326{
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c

    r69310 r78190  
    6969    /* packer setup */
    7070    CRASSERT(thread->packer == NULL);
    71     thread->packer = crPackNewContext( pack_spu.swap );
     71    thread->packer = crPackNewContext();
    7272    CRASSERT(thread->packer);
    7373    crPackInitBuffer( &(thread->buffer), crNetAlloc(thread->netServer.conn),
     
    357357
    358358    /* Pack the command */
    359     if (pack_spu.swap)
    360         crPackCreateContextSWAP( dpyName, visual, shareCtx, &serverCtx, &writeback );
    361     else
    362         crPackCreateContext( dpyName, visual, shareCtx, &serverCtx, &writeback );
     359    crPackCreateContext( dpyName, visual, shareCtx, &serverCtx, &writeback );
    363360
    364361    /* Flush buffer and get return value */
     
    385382        CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    386383
    387         if (pack_spu.swap) {
    388             serverCtx = (GLint) SWAP32(serverCtx);
    389         }
    390384        if (serverCtx < 0) {
    391385#ifdef CHROMIUM_THREADSAFE
     
    472466        }
    473467
    474         if (pack_spu.swap)
    475             crPackDestroyContextSWAP( context->serverCtx );
    476         else
    477             crPackDestroyContext( context->serverCtx );
    478 
     468        crPackDestroyContext( context->serverCtx );
    479469        crStateDestroyContext( context->clientState );
    480470
     
    600590    }
    601591
    602     if (pack_spu.swap)
    603         crPackMakeCurrentSWAP( window, nativeWindow, serverCtx );
    604     else
    605         crPackMakeCurrent( window, nativeWindow, serverCtx );
    606 
     592    crPackMakeCurrent( window, nativeWindow, serverCtx );
    607593    if (serverCtx)
    608594    {
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_flush.py

    r69310 r78190  
    3131    print('{')
    3232    print('\tGET_THREAD(thread);')
    33     print('\tif (pack_spu.swap)')
    34     print('\t{')
    35     print('\t\tcrPack%sSWAP(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    36     print('\t}')
    37     print('\telse')
    38     print('\t{')
    39     print('\t\tcrPack%s(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    40     print('\t}')
     33    print('\tcrPack%s(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    4134    print('\tpackspuFlush( (void *) thread );')
    4235    print('}\n')
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_framebuffer.c

    r76553 r78190  
    107107        crError( "packspu_GenFramebuffersEXT doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
    108108    }
    109     if (pack_spu.swap)
    110     {
    111         crPackGenFramebuffersEXTSWAP( n, framebuffers, &writeback );
    112     }
    113     else
    114     {
    115         crPackGenFramebuffersEXT( n, framebuffers, &writeback );
    116     }
     109
     110    crPackGenFramebuffersEXT( n, framebuffers, &writeback );
    117111    packspuFlush( (void *) thread );
    118112    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
     
    129123        crError( "packspu_GenRenderbuffersEXT doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
    130124    }
    131     if (pack_spu.swap)
    132     {
    133         crPackGenRenderbuffersEXTSWAP( n, renderbuffers, &writeback );
    134     }
    135     else
    136     {
    137         crPackGenRenderbuffersEXT( n, renderbuffers, &writeback );
    138     }
     125
     126    crPackGenRenderbuffersEXT( n, renderbuffers, &writeback );
    139127    packspuFlush( (void *) thread );
    140128    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py

    r69310 r78190  
    4949""")
    5050
     51print('#ifdef DEBUG');
    5152from get_sizes import *
    52 
    53 easy_swaps = {
    54     'GenTextures': '(unsigned int) n',
    55     'GetClipPlane': '4',
    56     'GetPolygonStipple': '0'
    57 }
     53print('#endif');
    5854
    5955simple_funcs = [ 'GetIntegerv', 'GetFloatv', 'GetDoublev', 'GetBooleanv' ]
    60 simple_swaps = [ 'SWAP32', 'SWAPFLOAT', 'SWAPDOUBLE', '(GLboolean) SWAP32' ]
    61 
    6256vertattr_get_funcs = [ 'GetVertexAttribdv' 'GetVertexAttribfv' 'GetVertexAttribiv' ]
    63 
    64 hard_funcs = {
    65     'GetLightfv': 'SWAPFLOAT',
    66     'GetLightiv': 'SWAP32',
    67     'GetMaterialfv': 'SWAPFLOAT',
    68     'GetMaterialiv': 'SWAP32',
    69     'GetTexEnvfv': 'SWAPFLOAT',
    70     'GetTexEnviv': 'SWAP32',
    71     'GetTexGendv': 'SWAPDOUBLE',
    72     'GetTexGenfv': 'SWAPFLOAT',
    73     'GetTexGeniv': 'SWAP32',
    74     'GetTexLevelParameterfv': 'SWAPFLOAT',
    75     'GetTexLevelParameteriv': 'SWAP32',
    76     'GetTexParameterfv': 'SWAPFLOAT',
    77     'GetTexParameteriv': 'SWAP32' }
    7857
    7958keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
     
    9372            print('\t%s return_val = (%s) 0;' % (return_type, return_type))
    9473            params.append( ("&return_val", "foo", 0) )
    95         if (func_name in easy_swaps and easy_swaps[func_name] != '0') or func_name in simple_funcs or func_name in hard_funcs:
    96             print('\tunsigned int i;')
    9774        print('\tif (!CRPACKSPU_IS_WDDM_CRHGSMI() && !(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))')
    9875        print('\t{')
     
    138115               )
    139116            {
     117                unsigned int i = 0;
    140118                %s localparams;
    141119                localparams = (%s) crAlloc(__numValues(pname) * sizeof(*localparams));
     
    193171
    194172        params.append( ("&writeback", "foo", 0) )
    195         print('\tif (pack_spu.swap)')
    196         print('\t{')
    197         print('\t\tcrPack%sSWAP(%s);' % (func_name, apiutil.MakeCallString( params ) ))
    198         print('\t}')
    199         print('\telse')
    200         print('\t{')
    201         print('\t\tcrPack%s(%s);' % (func_name, apiutil.MakeCallString( params ) ))
    202         print('\t}')
     173        print('\tcrPack%s(%s);' % (func_name, apiutil.MakeCallString( params ) ))
    203174        print('\tpackspuFlush( (void *) thread );')
    204175        print('\tCRPACKSPU_WRITEBACK_WAIT(thread, writeback);')
     
    208179        lastParamName = params[-2][0]
    209180        if return_type != 'void':
    210             print('\tif (pack_spu.swap)')
    211             print('\t{')
    212             print('\t\treturn_val = (%s) SWAP32(return_val);' % return_type)
    213             print('\t}')
    214181            print('\treturn return_val;')
    215         if func_name in easy_swaps and easy_swaps[func_name] != '0':
    216             limit = easy_swaps[func_name]
    217             print('\tif (pack_spu.swap)')
    218             print('\t{')
    219             print('\t\tfor (i = 0; i < %s; i++)' % limit)
    220             print('\t\t{')
    221             if params[-2][1].find( "double" ) > -1:
    222                 print('\t\t\t%s[i] = SWAPDOUBLE(%s[i]);' % (lastParamName, lastParamName))
    223             else:
    224                 print('\t\t\t%s[i] = SWAP32(%s[i]);' % (lastParamName, lastParamName))
    225             print('\t\t}')
    226             print('\t}')
    227         for index in range(len(simple_funcs)):
    228             if simple_funcs[index] == func_name:
    229                 print('\tif (pack_spu.swap)')
    230                 print('\t{')
    231                 print('\t\tfor (i = 0; i < __numValues(pname); i++)')
    232                 print('\t\t{')
    233                 if simple_swaps[index] == 'SWAPDOUBLE':
    234                     print('\t\t\t%s[i] = %s(%s[i]);' % (lastParamName, simple_swaps[index], lastParamName))
    235                 else:
    236                     print('\t\t\t((GLuint *) %s)[i] = %s(%s[i]);' % (lastParamName, simple_swaps[index], lastParamName))
    237                 print('\t\t}')
    238                 print('\t}')
    239         if func_name in hard_funcs:
    240             print('\tif (pack_spu.swap)')
    241             print('\t{')
    242             print('\t\tfor (i = 0; i < crStateHlpComponentsCount(pname); i++)')
    243             print('\t\t{')
    244             if hard_funcs[func_name] == 'SWAPDOUBLE':
    245                 print('\t\t\t%s[i] = %s(%s[i]);' % (lastParamName, hard_funcs[func_name], lastParamName))
    246             else:
    247                 print('\t\t\t((GLuint *) %s)[i] = %s(%s[i]);' % (lastParamName, hard_funcs[func_name], lastParamName))
    248             print('\t\t}')
    249             print('\t}')
    250182        print('}\n')
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_getstring.c

    r69310 r78190  
    1717static GLubyte gpszShadingVersion[255]="";
    1818#endif
     19static uint32_t g_uOpenGlVersMaj = 0;
     20static uint32_t g_uOpenGlVersMin = 0;
     21
    1922
    2023static void GetString(GLenum name, GLubyte *pszStr)
     
    2326    int writeback = 1;
    2427
    25     if (pack_spu.swap)
    26         crPackGetStringSWAP(name, pszStr, &writeback);
    27     else
    28         crPackGetString(name, pszStr, &writeback);
     28    crPackGetString(name, pszStr, &writeback);
    2929    packspuFlush( (void *) thread );
    3030
     
    3232}
    3333
    34 static GLfloat
     34static void
    3535GetVersionString(void)
    3636{
     
    4040    if (!fInitialized)
    4141    {
     42        int iGlVersion = 0;
    4243        GLubyte return_value[100];
    4344
     
    4546        CRASSERT(crStrlen((char *)return_value) < 100);
    4647
    47         version = crStrToFloat((char *) return_value);
    48         version = crStateComputeVersion(version);
     48        iGlVersion = crStrParseGlVersion((const char *) return_value);
     49        g_uOpenGlVersMaj = CR_GLVERSION_GET_MAJOR(iGlVersion);
     50        g_uOpenGlVersMin = CR_GLVERSION_GET_MINOR(iGlVersion);
     51        crStateComputeVersion(&g_uOpenGlVersMaj, &g_uOpenGlVersMin);
    4952
    5053        fInitialized = GL_TRUE;
    5154    }
    52 
    53     return version;
    5455}
    5556
     
    6566        int writeback = 1;
    6667
    67         if (pack_spu.swap)
    68         {
    69             crPackGetStringSWAP( GL_EXTENSIONS, return_value, &writeback );
    70         }
    71         else
    72         {
    73             crPackGetString( GL_EXTENSIONS, return_value, &writeback );
    74         }
     68        crPackGetString( GL_EXTENSIONS, return_value, &writeback );
    7569        packspuFlush( (void *) thread );
    7670
     
    129123            {
    130124                char *oldlocale;
    131                 float version;
    132125
    133126                oldlocale = setlocale(LC_NUMERIC, NULL);
     
    135128                setlocale(LC_NUMERIC, "C");
    136129
    137                 version = GetVersionString();
    138                 sprintf((char*)ctx->glVersion, "%.1f Chromium %s", version, CR_VERSION_STRING);
     130                GetVersionString();
     131                sprintf((char*)ctx->glVersion, "%u.%u Chromium %s", g_uOpenGlVersMaj, g_uOpenGlVersMin, CR_VERSION_STRING);
    139132
    140133                if (oldlocale)
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c

    r76553 r78190  
    3333        crError("packspu_CreateProgram doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!");
    3434    }
    35     if (pack_spu.swap)
    36     {
    37         crPackCreateProgramSWAP(&return_val, &writeback);
    38     }
    39     else
    40     {
    41         crPackCreateProgram(&return_val, &writeback);
    42     }
     35    crPackCreateProgram(&return_val, &writeback);
    4336    packspuFlush((void *) thread);
    4437    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    45     if (pack_spu.swap)
    46     {
    47         return_val = (GLuint) SWAP32(return_val);
    48     }
    49 
    5038    crStateCreateProgram(return_val);
    5139
     
    6250        crError("packspu_GetUniformLocation doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!");
    6351    }
    64     if (pack_spu.swap)
    65     {
    66         crPackGetUniformLocationSWAP(program, name, &return_val, &writeback);
    67     }
    68     else
    69     {
    70         crPackGetUniformLocation(program, name, &return_val, &writeback);
    71     }
     52
     53    crPackGetUniformLocation(program, name, &return_val, &writeback);
    7254    packspuFlush((void *) thread);
    7355    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    74     if (pack_spu.swap)
    75     {
    76         return_val = (GLint) SWAP32(return_val);
    77     }
    7856    return return_val;
    7957}
     
    124102        crError( "packspu_GetAttribLocation doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
    125103    }
    126     if (pack_spu.swap)
    127     {
    128         crPackGetAttribLocationSWAP( program, name, &return_val, &writeback );
    129     }
    130     else
    131     {
    132         crPackGetAttribLocation( program, name, &return_val, &writeback );
    133     }
     104
     105    crPackGetAttribLocation( program, name, &return_val, &writeback );
    134106    packspuFlush( (void *) thread );
    135107    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    136     if (pack_spu.swap)
    137     {
    138         return_val = (GLint) SWAP32(return_val);
    139     }
    140108    return return_val;
    141109}
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_init.c

    r69310 r78190  
    135135}
    136136
    137 extern SPUOptions packSPUOptions[];
    138 
    139137int SPULoad( char **name, char **super, SPUInitFuncPtr *init,
    140138         SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup,
    141          SPUOptionsPtr *options, int *flags )
     139         int *flags )
    142140{
    143141    *name = "pack";
     
    146144    *self = packSPUSelfDispatch;
    147145    *cleanup = packSPUCleanup;
    148     *options = packSPUOptions;
    149146    *flags = (SPU_HAS_PACKER|SPU_IS_TERMINAL|SPU_MAX_SERVERS_ONE);
    150147
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c

    r69310 r78190  
    8585    }
    8686
    87     if (pack_spu.swap)
    88         crPackChromiumParametervCRSWAP(target, type, count, values);
    89     else
    90         crPackChromiumParametervCR(target, type, count, values);
     87    crPackChromiumParametervCR(target, type, count, values);
    9188
    9289    if (fFlush)
     
    131128    GLint writeback = CRPACKSPU_IS_WDDM_CRHGSMI() ? 1 : pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network;
    132129
    133     if (pack_spu.swap)
    134     {
    135         crPackFinishSWAP();
    136     }
    137     else
    138     {
    139         crPackFinish();
    140     }
    141 
     130    crPackFinish();
    142131    if (packspuSyncOnFlushes())
    143132    {
    144133        if (writeback)
    145134        {
    146             if (pack_spu.swap)
    147                 crPackWritebackSWAP(&writeback);
    148             else
    149                 crPackWriteback(&writeback);
     135            crPackWriteback(&writeback);
    150136
    151137            packspuFlush( (void *) thread );
     
    277263
    278264    crPackSetContext(thread->packer);
    279 
    280     if (pack_spu.swap)
    281     {
    282         crPackWindowCreateSWAP( dpyName, visBits, &return_val, &writeback );
    283     }
    284     else
    285     {
    286         crPackWindowCreate( dpyName, visBits, &return_val, &writeback );
    287     }
     265    crPackWindowCreate( dpyName, visBits, &return_val, &writeback );
    288266    packspuFlush(thread);
    289267    if (!(thread->netServer.conn->actual_network))
     
    294272    {
    295273        CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    296         if (pack_spu.swap)
    297         {
    298             return_val = (GLint) SWAP32(return_val);
    299         }
    300274        retVal = return_val;
    301275    }
     
    334308    }
    335309
    336     if (pack_spu.swap)
    337     {
    338         crPackAreTexturesResidentSWAP( n, textures, residences, &return_val, &writeback );
    339     }
    340     else
    341     {
    342         crPackAreTexturesResident( n, textures, residences, &return_val, &writeback );
    343     }
     310    crPackAreTexturesResident( n, textures, residences, &return_val, &writeback );
    344311    packspuFlush( (void *) thread );
    345312
     
    373340        crError( "packspu_AreProgramsResidentNV doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
    374341    }
    375     if (pack_spu.swap)
    376     {
    377         crPackAreProgramsResidentNVSWAP( n, ids, residences, &return_val, &writeback );
    378     }
    379     else
    380     {
    381         crPackAreProgramsResidentNV( n, ids, residences, &return_val, &writeback );
    382     }
     342
     343    crPackAreProgramsResidentNV( n, ids, residences, &return_val, &writeback );
    383344    packspuFlush( (void *) thread );
    384345
     
    403364    int writeback = 1;
    404365
    405     if (pack_spu.swap)
    406     {
    407         crPackGetPolygonStippleSWAP( mask, &writeback );
    408     }
    409     else
    410     {
    411         crPackGetPolygonStipple( mask, &writeback );
    412     }
    413 
     366    crPackGetPolygonStipple( mask, &writeback );
    414367#ifdef CR_ARB_pixel_buffer_object
    415368    if (!crStateIsBufferBound(GL_PIXEL_PACK_BUFFER_ARB))
     
    426379    int writeback = 1;
    427380
    428     if (pack_spu.swap)
    429     {
    430         crPackGetPixelMapfvSWAP( map, values, &writeback );
    431     }
    432     else
    433     {
    434         crPackGetPixelMapfv( map, values, &writeback );
    435     }
    436 
     381    crPackGetPixelMapfv( map, values, &writeback );
    437382#ifdef CR_ARB_pixel_buffer_object
    438383    if (!crStateIsBufferBound(GL_PIXEL_PACK_BUFFER_ARB))
     
    449394    int writeback = 1;
    450395
    451     if (pack_spu.swap)
    452     {
    453         crPackGetPixelMapuivSWAP( map, values, &writeback );
    454     }
    455     else
    456     {
    457         crPackGetPixelMapuiv( map, values, &writeback );
    458     }
     396    crPackGetPixelMapuiv( map, values, &writeback );
    459397
    460398#ifdef CR_ARB_pixel_buffer_object
     
    472410    int writeback = 1;
    473411
    474     if (pack_spu.swap)
    475     {
    476         crPackGetPixelMapusvSWAP( map, values, &writeback );
    477     }
    478     else
    479     {
    480         crPackGetPixelMapusv( map, values, &writeback );
    481     }
    482 
     412    crPackGetPixelMapusv( map, values, &writeback );
    483413#ifdef CR_ARB_pixel_buffer_object
    484414    if (!crStateIsBufferBound(GL_PIXEL_PACK_BUFFER_ARB))
     
    558488        crError( "packspu_GetError doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
    559489    }
    560     if (pack_spu.swap)
    561     {
    562         crPackGetErrorSWAP( &return_val, &writeback );
    563     }
    564     else
    565     {
    566         crPackGetError( &return_val, &writeback );
    567     }
    568 
     490
     491    crPackGetError( &return_val, &writeback );
    569492    packspuFlush( (void *) thread );
    570493    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    571 
    572     if (pack_spu.swap)
    573     {
    574         return_val = (GLenum) SWAP32(return_val);
    575     }
    576 
    577494    return return_val;
    578495}
     
    619536
    620537        CRASSERT(thread->packer == NULL);
    621         thread->packer = crPackNewContext( pack_spu.swap );
     538        thread->packer = crPackNewContext();
    622539        CRASSERT(thread->packer);
    623540        crPackInitBuffer(&(thread->buffer), crNetAlloc(thread->netServer.conn),
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c

    r69310 r78190  
    9595    CRASSERT( (void *) hdr >= buf->pack );
    9696
    97     if (pack_spu.swap)
    98     {
    99         hdr->header.type = (CRMessageType) SWAP32(CR_MESSAGE_OPCODES);
    100         hdr->numOpcodes  = SWAP32(num_opcodes);
    101     }
    102     else
    103     {
    104         hdr->header.type = CR_MESSAGE_OPCODES;
    105         hdr->numOpcodes  = num_opcodes;
    106     }
     97    hdr->header.type = CR_MESSAGE_OPCODES;
     98    hdr->numOpcodes  = num_opcodes;
    10799
    108100    *len = buf->data_current - (unsigned char *) hdr;
     
    206198       a header */
    207199    len = ((unsigned int *) buf)[-1];
    208     if (pack_spu.swap)
    209     {
    210         /* It's already been swapped, swap it back. */
    211         len = SWAP32(len);
    212     }
    213200    len += 4 + sizeof(CRMessageOpcodes);
    214201
     
    221208
    222209    msg = (CRMessageOpcodes *) src;
    223 
    224     if (pack_spu.swap)
    225     {
    226         msg->header.type = (CRMessageType) SWAP32(CR_MESSAGE_OPCODES);
    227         msg->numOpcodes  = SWAP32(1);
    228     }
    229     else
    230     {
    231         msg->header.type = CR_MESSAGE_OPCODES;
    232         msg->numOpcodes  = 1;
    233     }
     210    msg->header.type = CR_MESSAGE_OPCODES;
     211    msg->numOpcodes  = 1;
    234212
    235213    CRASSERT( thread->netServer.conn );
     
    272250            return;
    273251        }
    274         pack_spu.swap = server->conn->swap;
    275252    }
    276253    else {
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_pixel.c

    r69310 r78190  
    330330{
    331331    GET_THREAD(thread);
    332     if (pack_spu.swap)
    333         crPackCopyPixelsSWAP( x, y, width, height, type );
    334     else
    335         crPackCopyPixels( x, y, width, height, type );
     332    crPackCopyPixels( x, y, width, height, type );
    336333    /* XXX why flush here? */
    337334    packspuFlush( (void *) thread );
     
    378375    }
    379376
    380     if (pack_spu.swap)
    381         crPackTexImage1DSWAP( target, level, internalformat, width, border, format, type, pixels, &(clientState->unpack) );
    382     else
    383         crPackTexImage1D( target, level, internalformat, width, border, format, type, pixels, &(clientState->unpack) );
    384 
     377    crPackTexImage1D( target, level, internalformat, width, border, format, type, pixels, &(clientState->unpack) );
    385378    if (crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
    386379    {
     
    411404    }
    412405
    413     if (pack_spu.swap)
    414         crPackTexImage2DSWAP( target, level, internalformat, width, height, border, format, type, pixels, &(clientState->unpack) );
    415     else
    416         crPackTexImage2D( target, level, internalformat, width, height, border, format, type, pixels, &(clientState->unpack) );
    417 
     406    crPackTexImage2D( target, level, internalformat, width, height, border, format, type, pixels, &(clientState->unpack) );
    418407    if (crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
    419408    {
     
    433422    }
    434423
    435     if (pack_spu.swap)
    436         crPackTexImage3DEXTSWAP( target, level, internalformat, width, height, depth, border, format, type, pixels, &(clientState->unpack) );
    437     else
    438         crPackTexImage3DEXT( target, level, internalformat, width, height, depth, border, format, type, pixels, &(clientState->unpack) );
    439 
     424    crPackTexImage3DEXT( target, level, internalformat, width, height, depth, border, format, type, pixels, &(clientState->unpack) );
    440425    if (crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
    441426    {
     
    456441    }
    457442
    458     if (pack_spu.swap)
    459         crPackTexImage3DSWAP( target, level, internalformat, width, height, depth, border, format, type, pixels, &(clientState->unpack) );
    460     else
    461         crPackTexImage3D( target, level, internalformat, width, height, depth, border, format, type, pixels, &(clientState->unpack) );
    462 
     443    crPackTexImage3D( target, level, internalformat, width, height, depth, border, format, type, pixels, &(clientState->unpack) );
    463444    if (crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
    464445    {
     
    484465    }
    485466
    486     if (pack_spu.swap)
    487         crPackTexSubImage1DSWAP( target, level, xoffset, width, format, type, pixels, &(clientState->unpack) );
    488     else
    489         crPackTexSubImage1D( target, level, xoffset, width, format, type, pixels, &(clientState->unpack) );
    490 
     467    crPackTexSubImage1D( target, level, xoffset, width, format, type, pixels, &(clientState->unpack) );
    491468    if (crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
    492469    {
     
    511488    }
    512489
    513     if (pack_spu.swap)
    514         crPackTexSubImage2DSWAP( target, level, xoffset, yoffset, width, height, format, type, pixels, &(clientState->unpack) );
    515     else
    516         crPackTexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels, &(clientState->unpack) );
    517 
     490    crPackTexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels, &(clientState->unpack) );
    518491    if (crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
    519492    {
     
    533506    }
    534507
    535     if (pack_spu.swap)
    536         crPackTexSubImage3DSWAP( target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, &(clientState->unpack) );
    537     else
    538         crPackTexSubImage3D( target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, &(clientState->unpack) );
    539 
     508    crPackTexSubImage3D( target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, &(clientState->unpack) );
    540509    if (crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
    541510    {
     
    549518    GET_CONTEXT(ctx);
    550519    CRClientState *clientState = &(ctx->clientState->client);
    551     if (pack_spu.swap)
    552         crPackZPixCRSWAP( width, height, format, type, ztype, zparm, length, pixels, &(clientState->unpack) );
    553     else
    554         crPackZPixCR( width, height, format, type, ztype, zparm, length, pixels, &(clientState->unpack) );
     520    crPackZPixCR( width, height, format, type, ztype, zparm, length, pixels, &(clientState->unpack) );
    555521}
    556522
     
    572538    }
    573539
    574     if (pack_spu.swap)
    575         crPackGetTexImageSWAP( target, level, format, type, pixels, &(clientState->pack), &writeback );
    576     else
    577         crPackGetTexImage( target, level, format, type, pixels, &(clientState->pack), &writeback );
    578 
     540    crPackGetTexImage( target, level, format, type, pixels, &(clientState->pack), &writeback );
    579541    if (crStateIsBufferBound(GL_PIXEL_PACK_BUFFER_ARB))
    580542    {
     
    601563    }
    602564
    603     if (pack_spu.swap)
    604     {
    605         crPackGetCompressedTexImageARBSWAP( target, level, img, &writeback );
    606     }
    607     else
    608     {
    609         crPackGetCompressedTexImageARB( target, level, img, &writeback );
    610     }
    611 
     565    crPackGetCompressedTexImageARB( target, level, img, &writeback );
    612566    if (crStateIsBufferBound(GL_PIXEL_PACK_BUFFER_ARB))
    613567    {
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_swapbuf.c

    r69310 r78190  
    1111#include "packspu_proto.h"
    1212
    13 #if 0
    14 
    15 void PACKSPU_APIENTRY packspu_SwapBuffers( GLint window, GLint flags )
    16 {
    17     GET_THREAD(thread);
    18     if (pack_spu.swap)
    19     {
    20         crPackSwapBuffersSWAP( window, flags );
    21     }
    22     else
    23     {
    24         crPackSwapBuffers( window, flags );
    25     }
    26     packspuFlush( (void *) thread );
    27 }
    28 
    29 
    30 #else
    3113
    3214void PACKSPU_APIENTRY packspu_SwapBuffers( GLint window, GLint flags )
     
    3416    GET_THREAD(thread);
    3517
    36     if (pack_spu.swap)
    37     {
    38         crPackSwapBuffersSWAP( window, flags );
    39     }
    40     else
    41     {
    42         crPackSwapBuffers( window, flags );
    43     }
     18    crPackSwapBuffers( window, flags );
    4419    packspuFlush( (void *) thread );
    4520
     
    7348             */
    7449            thread->writeback = 1;
    75             if (pack_spu.swap)
    76             {
    77                 crPackWritebackSWAP( (GLint *) &thread->writeback );
    78             }
    79             else
    80             {
    81                 crPackWriteback( (GLint *) &thread->writeback );
    82             }
     50            crPackWriteback( (GLint *) &thread->writeback );
    8351            break;
    8452        case 1:
     
    9260    /* want to emit a parameter here */
    9361    if (pack_spu.emit_GATHER_POST_SWAPBUFFERS)
    94     {
    95         if (pack_spu.swap)
    96             crPackChromiumParameteriCRSWAP(GL_GATHER_POST_SWAPBUFFERS_CR, 1);
    97         else
    98             crPackChromiumParameteriCR(GL_GATHER_POST_SWAPBUFFERS_CR, 1);
    99     }
     62        crPackChromiumParameteriCR(GL_GATHER_POST_SWAPBUFFERS_CR, 1);
    10063}
    10164
    102 #endif
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_texture.c

    r76553 r78190  
    4444    GET_THREAD(thread);
    4545    int writeback = 1;
    46     unsigned int i;
    4746    if (!CRPACKSPU_IS_WDDM_CRHGSMI() && !(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
    4847    {
    4948        crError( "packspu_GenTextures doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
    5049    }
    51     if (pack_spu.swap)
    52     {
    53         crPackGenTexturesSWAP( n, textures, &writeback );
    54     }
    55     else
    56     {
    57         crPackGenTextures( n, textures, &writeback );
    58     }
     50
     51    crPackGenTextures( n, textures, &writeback );
    5952    packspuFlush( (void *) thread );
    6053    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    61     if (pack_spu.swap)
    62     {
    63         for (i = 0 ; i < (unsigned int) n ; i++)
    64         {
    65             textures[i] = SWAP32(textures[i]);
    66         }
    67     }
    68 
    6954    crStateRegTextures(n, textures);
    7055}
  • trunk/src/VBox/Additions/common/crOpenGL/passthrough/passthroughspu_init.c

    r69310 r78190  
    4444}
    4545
    46 static SPUOptions passthroughSPUOptions[] = {
    47    { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
    48 };
    49 
    5046
    5147int SPULoad( char **name, char **super, SPUInitFuncPtr *init,
    5248             SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup,
    53              SPUOptionsPtr *options, int *flags )
     49             int *flags )
    5450{
    5551        *name = "passthrough";
     
    5854        *self = passthroughSPUSelfDispatch;
    5955        *cleanup = passthroughSPUCleanup;
    60         *options = passthroughSPUOptions;
    6156        *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
    6257
  • trunk/src/VBox/Additions/common/crOpenGL/wgl.c

    r69310 r78190  
    77#include "cr_error.h"
    88#include "cr_spu.h"
    9 #include "cr_environment.h"
    109#include "cr_mem.h"
    1110#include "stub.h"
     
    1918
    2019#include <iprt/cdefs.h>
     20#include <iprt/env.h>
    2121
    2222/* Currently host part will misbehave re-creating context with proper visual bits
     
    8383     * There are subtle differences in the use of these calls.
    8484     */
    85     crSetenv("CR_WGL_DO_NOT_USE_GDI", "yes");
     85    RTEnvSet("CR_WGL_DO_NOT_USE_GDI", "yes");
    8686
    8787    if ( pfd->nSize != sizeof(*pfd) || pfd->nVersion != 1 ) {
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