VirtualBox

Changeset 69310 in vbox for trunk/src


Ignore:
Timestamp:
Oct 25, 2017 2:24:45 PM (7 years ago)
Author:
vboxsync
Message:

common/crOpenGL: scm updates

Location:
trunk/src/VBox/Additions/common/crOpenGL
Files:
1 added
76 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/AIX_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/DD_glc.py

    • Property svn:keywords set to Id Revision
    r63942 r69310  
    66
    77/*
    8  * Copyright (C) 2009-2016 Oracle Corporation
     8 * Copyright (C) 2009-2016 """ """Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
  • trunk/src/VBox/Additions/common/crOpenGL/DD_glh.py

    • Property svn:keywords set to Id Revision
    r63942 r69310  
    66
    77/*
    8  * Copyright (C) 2009-2016 Oracle Corporation
     8 * Copyright (C) 2009-2016 """ """Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
  • trunk/src/VBox/Additions/common/crOpenGL/Darwin_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/FreeBSD_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/IRIX64_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/Linux_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/Linux_i386_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/Linux_i386_exports_dri.py

    • Property svn:keywords set to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/Linux_i386_glxapi_exports.py

    r63939 r69310  
     1from __future__ import print_function
     2
     3__copyright__ = \
    14"""
    25Copyright (C) 2009-2016 Oracle Corporation
     
    912VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    1013hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    11 """
     14""";
    1215
    13 from __future__ import print_function
    1416import sys
    1517
  • trunk/src/VBox/Additions/common/crOpenGL/NULLfuncs.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/OSF1_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/SunOS_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports_dri.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/SunOS_i386_glxapi_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/VBoxICDList.h

    r62521 r69310  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VirtualBox Windows NT/2000/XP guest OpenGL ICD
    4  *
     4 */
     5
     6/*
    57 * Copyright (C) 2006-2016 Oracle Corporation
    68 *
  • trunk/src/VBox/Additions/common/crOpenGL/alias_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu.c

    • Property svn:keywords changed from Id to Id Revision
    r63205 r69310  
    479479#endif
    480480    //crDebug("arrayspu_DrawElements mode:0x%x, count:%d, type:0x%x", mode, count, type);
    481    
     481
    482482
    483483    array_spu.self.Begin(mode);
     
    664664}
    665665
    666 /*@todo: it's a hack, as GLSL shouldn't blindly reuse this bit from nv_vertex_program*/
     666/** @todo it's a hack, as GLSL shouldn't blindly reuse this bit from nv_vertex_program*/
    667667static void ARRAYSPU_APIENTRY arrayspu_UseProgram(GLuint program)
    668668{
     
    672672
    673673static void ARRAYSPU_APIENTRY
    674 arrayspu_VertexAttribPointerARB(GLuint index, GLint size, GLenum type, 
     674arrayspu_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
    675675                                GLboolean normalized, GLsizei stride,
    676676                                const GLvoid *pointer)
     
    845845        crStateMakeCurrent(array_spu.context[slot].clientState);
    846846    }
    847     else 
     847    else
    848848    {
    849849        crStateMakeCurrent(NULL);
  • trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu.def

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu_config.c

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu_init.c

    • Property svn:keywords changed from Id to Id Revision
    r40431 r69310  
    4545
    4646    crStateInit();
    47 /*@todo seems default context ain't needed at all*/
     47/** @todo seems default context ain't needed at all*/
    4848    array_spu.defaultctx = crStateCreateContext( NULL, 0, NULL );
    4949#ifdef CR_ARB_vertex_buffer_object
     
    8282    *options = arraySPUOptions;
    8383    *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
    84    
     84
    8585    return 1;
    8686}
  • trunk/src/VBox/Additions/common/crOpenGL/context.c

    • Property svn:keywords changed from Id to Id Revision
    r65787 r69310  
    66
    77/**
    8  * \mainpage OpenGL_stub 
     8 * \mainpage OpenGL_stub
    99 *
    1010 * \section OpenGL_stubIntroduction Introduction
     
    7575     */
    7676    }
    77     else 
     77    else
    7878#endif
    7979    {
     
    257257static unsigned char lastXError = Success;
    258258
    259 static int 
     259static int
    260260errorHandler (Display *dpy, XErrorEvent *e)
    261261{
     
    281281#elif defined(GLX)
    282282    Display *dpy = stubGetWindowDisplay(win);
    283     if (dpy) 
     283    if (dpy)
    284284    {
    285285        XWindowAttributes attr;
     
    318318            XSync(dpy, false);
    319319            oldErrorHandler = XSetErrorHandler(errorHandler);
    320             /*@todo this will create new pixmap for window every call*/
     320            /** @todo this will create new pixmap for window every call*/
    321321            p = XCompositeNameWindowPixmap(dpy, win->drawable);
    322322            XSync(dpy, false);
     
    752752    float WidthRatio, HeightRatio;
    753753    static int DebugFlag = 0;
    754    
    755     // apparently the "window" parameter passed to this 
     754
     755    // apparently the "window" parameter passed to this
    756756    // function contains the native window information
    757757    HWND NATIVEhwnd = window->hWnd;
     
    774774    WidthRatio = (float)ChromiumWidth / (float)NativeWidth;
    775775    HeightRatio = (float)ChromiumHeight / (float)NativeHeight;
    776    
     776
    777777    // output some debug information at the beginning
    778778    if(DebugFlag)
     
    785785        crDebug("Chromium Height = %i", ChromiumHeight);
    786786    }
    787        
    788     if (NATIVEhwnd) 
    789     { 
     787
     788    if (NATIVEhwnd)
     789    {
    790790        GetClientRect( NATIVEhwnd, &rect );
    791791        GetCursorPos (&point);
    792        
     792
    793793        // make sure these coordinates are relative to the native window,
    794794        // not the whole desktop
     
    799799        pos[1] = (int)((NativeHeight - point.y) * HeightRatio);
    800800    }
    801     else 
     801    else
    802802    {
    803803        pos[0] = 0;
     
    866866    dpy = stubGetWindowDisplay(window);
    867867
    868     //@todo: Performing those checks is expensive operation, especially for simple apps with high FPS.
     868    /// @todo Performing those checks is expensive operation, especially for simple apps with high FPS.
    869869    //       Disabling those triples glxgears fps, thus using xevents instead of per frame polling is much more preferred.
    870     //@todo: Check similar on windows guests, though doubtful as there're no XSync like calls on windows.
     870    /// @todo Check similar on windows guests, though doubtful as there're no XSync like calls on windows.
    871871    if (window && dpy)
    872872    {
     
    878878        || !window->drawable
    879879        || !XGetGeometry(dpy, window->drawable, &root, x, y, w, h, &border, &depth)
    880         || !XTranslateCoordinates(dpy, window->drawable, root, 0, 0, x, y, &child)) 
     880        || !XTranslateCoordinates(dpy, window->drawable, root, 0, 0, x, y, &child))
    881881    {
    882882        crWarning("Failed to get windows geometry for %p, try xwininfo", window);
     
    10211021
    10221022    /* If the user's specified a minimum window size for Chromium, see if
    1023      * this window satisfies that criterium. 
     1023     * this window satisfies that criterium.
    10241024     */
    1025     if (stub.minChromiumWindowWidth > 0 && 
     1025    if (stub.minChromiumWindowWidth > 0 &&
    10261026        stub.minChromiumWindowHeight > 0) {
    10271027        stubGetWindowGeometry( window, &x, &y, &w, &h );
    1028         if (w >= stub.minChromiumWindowWidth && 
     1028        if (w >= stub.minChromiumWindowWidth &&
    10291029            h >= stub.minChromiumWindowHeight) {
    10301030
    10311031            /* Check for maximum sized window now too */
    1032             if (stub.maxChromiumWindowWidth && 
     1032            if (stub.maxChromiumWindowWidth &&
    10331033                stub.maxChromiumWindowHeight) {
    10341034                if (w < stub.maxChromiumWindowWidth &&
    10351035                    h < stub.maxChromiumWindowHeight)
    10361036                    return GL_TRUE;
    1037                 else 
     1037                else
    10381038                    return GL_FALSE;
    10391039            }
     
    12841284                        );
    12851285#endif
    1286                 if (context->currentDrawable && context->currentDrawable->type==CHROMIUM 
     1286                if (context->currentDrawable && context->currentDrawable->type==CHROMIUM
    12871287                    && context->currentDrawable->pOwner==context)
    12881288                {
     
    13041304                        XUNLOCK(context->currentDrawable->dpy);
    13051305#endif
    1306                    
     1306
    13071307                }
    13081308            }
  • trunk/src/VBox/Additions/common/crOpenGL/cr_gl.py

    • Property svn:keywords changed from Id to Id Revision
    r63942 r69310  
    66
    77/*
    8  * Copyright (C) 2008-2016 Oracle Corporation
     8 * Copyright (C) 2008-2016 """ """Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
  • trunk/src/VBox/Additions/common/crOpenGL/defs.py

    • Property svn:keywords changed from Id to Id Revision
    r63939 r69310  
    429429        pass
    430430
    431 for func_name in ( "wglChoosePixelFormat", 
     431for func_name in ( "wglChoosePixelFormat",
    432432           "wglCopyContext",
    433433           "wglCreateContext",
     
    452452           "wglUseFontBitmapsW",
    453453           "wglUseFontOutlinesA",
    454            "wglUseFontOutlinesW", 
     454           "wglUseFontOutlinesW",
    455455           "wglChoosePixelFormatEXT",
    456456           "wglGetPixelFormatAttribivEXT",
  • trunk/src/VBox/Additions/common/crOpenGL/defs64.py

    r63939 r69310  
    426426        print("gl%s = cr_gl%s" % (func_name,func_name))
    427427
    428 for func_name in ( "wglChoosePixelFormat", 
     428for func_name in ( "wglChoosePixelFormat",
    429429           "wglCopyContext",
    430430           "wglCreateContext",
     
    449449           "wglUseFontBitmapsW",
    450450           "wglUseFontOutlinesA",
    451            "wglUseFontOutlinesW", 
     451           "wglUseFontOutlinesW",
    452452           "wglChoosePixelFormatEXT",
    453453           "wglGetPixelFormatAttribivEXT",
  • trunk/src/VBox/Additions/common/crOpenGL/dri_drv.c

    r62521 r69310  
    149149
    150150#if 0  /* See comment in vboxdriInitFuncs */
    151 static void 
     151static void
    152152vboxDDGetBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height)
    153153{
     
    223223{
    224224}
    225    
     225
    226226static void
    227227vboxDDTexImage3D(GLcontext *ctx, GLenum target, GLint level,
     
    245245{
    246246}
    247    
     247
    248248static void
    249249vboxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
     
    258258}
    259259
    260    
     260
    261261static void
    262262vboxDDTexSubImage3D(GLcontext *ctx, GLenum target, GLint level,
     
    317317}
    318318
    319 /*@todo Enable or disable server-side gl capabilities, not related to glEnable? */
     319/** @todo Enable or disable server-side gl capabilities, not related to glEnable? */
    320320static void
    321321vboxDDEnable(GLcontext *ctx, GLenum cap, GLboolean state)
    322322{
    323     if (state) 
     323    if (state)
    324324        cr_glEnable(cap);
    325     else 
     325    else
    326326        cr_glDisable(cap);
    327327}
     
    340340}
    341341
    342 /*Note, checking glGetError before and after those calls is the only way 
     342/*Note, checking glGetError before and after those calls is the only way
    343343 *to return if we succeeded to get value or not, but it will add 2 sync calls and
    344344 *will reset glGetError value returned in case application calls it explicitly
    345345 */
    346 static GLboolean 
     346static GLboolean
    347347vboxDDGetBooleanv(GLcontext *ctx, GLenum pname, GLboolean *result)
    348348{
     
    351351}
    352352
    353 static GLboolean 
     353static GLboolean
    354354vboxDDGetDoublev(GLcontext *ctx, GLenum pname, GLdouble *result)
    355355{
     
    358358}
    359359
    360 static GLboolean 
     360static GLboolean
    361361vboxDDGetFloatv(GLcontext *ctx, GLenum pname, GLfloat *result)
    362362{
     
    365365}
    366366
    367 static GLboolean 
     367static GLboolean
    368368vboxDDGetIntegerv(GLcontext *ctx, GLenum pname, GLint *result)
    369369{
     
    372372}
    373373
    374 static GLboolean 
     374static GLboolean
    375375vboxDDGetPointerv(GLcontext *ctx, GLenum pname, GLvoid **result)
    376376{
     
    379379}
    380380
    381 /** @todo 
     381/** @todo
    382382 * change stub's createcontext to reuse driver private part of mesa's ctx to store stub ctx info.
    383383 */
     
    528528   driver->GetPointerv = vboxDDGetPointerv;
    529529
    530 /** @todo */   
     530/** @todo */
    531531#if FEATURE_ARB_vertex_buffer_object
    532532   // driver->NewBufferObject = _mesa_new_buffer_object;
     
    777777 * This is the driver specific part of the createNewScreen entry point.
    778778 * Called when using legacy DRI.
    779  * 
     779 *
    780780 * return the __GLcontextModes supported by this driver
    781781 */
     
    876876    if (sharedContextPrivate)
    877877      shareCtx = ((tdfxContextPtr) sharedContextPrivate)->glCtx;
    878    else 
     878   else
    879879      shareCtx = NULL;
    880880    /** @todo save ctx, or be more confident that we can don't need to. */
     
    891891     * properties. */
    892892
    893    /* Set various context configuration.  We take these values from the 
     893   /* Set various context configuration.  We take these values from the
    894894    * TDFX driver. */
    895895   /** @r=Leonid, stub.spu->dispatch_table.GetIntegerv(GL_MAX_TEXTURE_UNITS_ARB,&value) etc.
  • trunk/src/VBox/Additions/common/crOpenGL/dri_glx.h

    r69040 r69310  
    5353
    5454/*Common glX functions*/
    55 extern DECLEXPORT(void) VBOXGLXTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, 
     55extern DECLEXPORT(void) VBOXGLXTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst,
    5656#if defined(SunOS)
    5757unsigned long mask);
  • trunk/src/VBox/Additions/common/crOpenGL/dri_util.c

    r64525 r69310  
    88 * useful stuff is done here that otherwise would have to be duplicated in most
    99 * drivers.
    10  * 
     10 *
    1111 * Basically, these utility functions take care of some of the dirty details of
    1212 * screen initialization, context creation, context binding, DRM setup, etc.
     
    4848/**
    4949 * Print message to \c stderr if the \c LIBGL_DEBUG environment variable
    50  * is set. 
    51  * 
     50 * is set.
     51 *
    5252 * Is called from the drivers.
    53  * 
     53 *
    5454 * \param f \c printf like format string.
    5555 */
     
    8888/**
    8989 * Unbind context.
    90  * 
     90 *
    9191 * \param scrn the screen.
    9292 * \param gc context.
    9393 *
    9494 * \return \c GL_TRUE on success, or \c GL_FALSE on failure.
    95  * 
     95 *
    9696 * \internal
    9797 * This function calls __DriverAPIRec::UnbindContext, and then decrements
    9898 * __DRIdrawablePrivateRec::refcount which must be non-zero for a successful
    9999 * return.
    100  * 
     100 *
    101101 * While casting the opaque private pointers associated with the parameters
    102  * into their respective real types it also assures they are not \c NULL. 
     102 * into their respective real types it also assures they are not \c NULL.
    103103 */
    104104static int driUnbindContext(__DRIcontext *pcp)
     
    197197            DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
    198198        }
    199        
     199
    200200        if ((pdp != prp) && (!prp->pStamp || *prp->pStamp != prp->lastStamp)) {
    201201            DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
     
    223223 *
    224224 * \param pdp pointer to the private drawable information to update.
    225  * 
     225 *
    226226 * This function basically updates the __DRIdrawablePrivate struct's
    227227 * cliprect information by calling \c __DRIinterfaceMethods::getDrawableInfo.
     
    236236    __DRIscreenPrivate *psp = pdp->driScreenPriv;
    237237    __DRIcontextPrivate *pcp = pdp->driContextPriv;
    238    
    239     if (!pcp 
     238
     239    if (!pcp
    240240        || ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) {
    241         /* ERROR!!! 
     241        /* ERROR!!!
    242242         * ...but we must ignore it. There can be many contexts bound to a
    243243         * drawable.
     
    246246
    247247    if (pdp->pClipRects) {
    248         _mesa_free(pdp->pClipRects); 
     248        _mesa_free(pdp->pClipRects);
    249249        pdp->pClipRects = NULL;
    250250    }
    251251
    252252    if (pdp->pBackClipRects) {
    253         _mesa_free(pdp->pBackClipRects); 
     253        _mesa_free(pdp->pBackClipRects);
    254254        pdp->pBackClipRects = NULL;
    255255    }
     
    330330       case DRI2_EVENT_BUFFER_ATTACH:
    331331          ba = (__DRIBufferAttachEvent *) p;
    332           if (ba->drawable == pdp->dri2.drawable_id && 
     332          if (ba->drawable == pdp->dri2.drawable_id &&
    333333              ba->buffer.attachment == DRI_DRAWABLE_BUFFER_FRONT_LEFT)
    334334             last_ba = ba;
     
    336336       }
    337337    }
    338          
     338
    339339    if (last_dc) {
    340340       if (pdp->w != last_dc->width || pdp->h != last_dc->height)
     
    449449 *
    450450 * \param drawablePrivate opaque pointer to the per-drawable private info.
    451  * 
     451 *
    452452 * \internal
    453453 * This function calls __DRIdrawablePrivate::swapBuffers.
    454  * 
     454 *
    455455 * Is called directly from glXSwapBuffers().
    456456 */
     
    595595    /* This special default value is replaced with the configured
    596596     * default value when the drawable is first bound to a direct
    597      * rendering context. 
     597     * rendering context.
    598598     */
    599599    pdp->swap_interval = (unsigned)-1;
     
    651651/**
    652652 * Destroy the per-context private information.
    653  * 
     653 *
    654654 * \internal
    655655 * This function calls __DriverAPIRec::DestroyContext on \p contextPrivate, calls
     
    668668/**
    669669 * Create the per-drawable private driver information.
    670  * 
     670 *
    671671 * \param render_type   Type of rendering target.  \c GLX_RGBA is the only
    672672 *                      type likely to ever be supported for direct-rendering.
     
    675675 * \returns An opaque pointer to the per-context private information on
    676676 *          success, or \c NULL on failure.
    677  * 
     677 *
    678678 * \internal
    679679 * This function allocates and fills a __DRIcontextPrivateRec structure.  It
     
    685685static __DRIcontext *
    686686driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config,
    687                     int render_type, __DRIcontext *shared, 
     687                    int render_type, __DRIcontext *shared,
    688688                    drm_context_t hwContext, void *data)
    689689{
     
    756756/**
    757757 * Destroy the per-screen private information.
    758  * 
     758 *
    759759 * \internal
    760760 * This function calls __DriverAPIRec::DestroyScreen on \p screenPrivate, calls
     
    813813 *
    814814 * For legacy DRI.
    815  * 
     815 *
    816816 * \param scrn  Index of the screen
    817817 * \param ddx_version Version of the 2D DDX.  This may not be meaningful for
     
    826826 * \param driver_modes  Returns modes supported by the driver
    827827 * \param loaderPrivate  ??
    828  * 
     828 *
    829829 * \note There is no need to check the minimum API version in this
    830830 * function.  Since the name of this function is versioned, it is
     
    837837                   const __DRIversion *drm_version,
    838838                   const __DRIframebuffer *frame_buffer,
    839                    drmAddress pSAREA, int fd, 
     839                   drmAddress pSAREA, int fd,
    840840                   const __DRIextension **extensions,
    841841                   const __DRIconfig ***driver_modes,
     
    10491049    { __DRI_FRAME_TRACKING, __DRI_FRAME_TRACKING_VERSION },
    10501050    driFrameTracking,
    1051     driQueryFrameTracking   
     1051    driQueryFrameTracking
    10521052};
    10531053
    10541054/**
    10551055 * Calculate amount of swap interval used between GLX buffer swaps.
    1056  * 
     1056 *
    10571057 * The usage value, on the range [0,max], is the fraction of total swap
    10581058 * interval time used between GLX buffer swaps is calculated.
    10591059 *
    10601060 *            \f$p = t_d / (i * t_r)\f$
    1061  * 
     1061 *
    10621062 * Where \f$t_d\f$ is the time since the last GLX buffer swap, \f$i\f$ is the
    10631063 * swap interval (as set by \c glXSwapIntervalSGI), and \f$t_r\f$ time
    10641064 * required for a single vertical refresh period (as returned by \c
    10651065 * glXGetMscRateOML).
    1066  * 
     1066 *
    10671067 * See the documentation for the GLX_MESA_swap_frame_usage extension for more
    10681068 * details.
     
    10761076 *
    10771077 * \sa glXSwapIntervalSGI glXGetMscRateOML
    1078  * 
     1078 *
    10791079 * \todo Instead of caching the \c glXGetMscRateOML function pointer, would it
    10801080 *       be possible to cache the sync rate?
     
    11111111      usage /= 1000000.0;
    11121112   }
    1113    
     1113
    11141114   return usage;
    11151115}
  • trunk/src/VBox/Additions/common/crOpenGL/egl.c

    r67637 r69310  
    1717 */
    1818
    19 /*******************************************************************************
    20 *   Header Files                                                               *
    21 *******************************************************************************/
     19
     20/*********************************************************************************************************************************
     21*   Header Files                                                                                                                 *
     22*********************************************************************************************************************************/
    2223#include <iprt/cdefs.h>
    2324#include <iprt/types.h>
     
    3637    if (!(expr)) { printf("Assertion failed: %s\n", #expr); exit(1); }
    3738
    38 /*******************************************************************************
    39 *   Structures and Typedefs                                                    *
    40 *******************************************************************************/
     39
     40/*********************************************************************************************************************************
     41*   Structures and Typedefs                                                                                                      *
     42*********************************************************************************************************************************/
    4143
    4244struct VBEGLTLS
     
    5658};
    5759
    58 /*******************************************************************************
    59 *   Defined Constants And Macros                                               *
    60 *******************************************************************************/
     60
     61/*********************************************************************************************************************************
     62*   Defined Constants And Macros                                                                                                 *
     63*********************************************************************************************************************************/
    6164/** @note IDs returned for surfaces should always be lower than these constants.
    6265 */
     
    7275#define VBEGL_ANY_SURFACE     (VBEGL_WINDOW_SURFACE | VBEGL_PBUFFER_SURFACE | VBEGL_PIXMAP_SURFACE)
    7376
    74 /*******************************************************************************
    75 *   Global variables                                                           *
    76 *******************************************************************************/
     77
     78/*********************************************************************************************************************************
     79*   Global variables                                                                                                             *
     80*********************************************************************************************************************************/
    7781
    7882static pthread_key_t  g_tls;
  • trunk/src/VBox/Additions/common/crOpenGL/entrypoints.py

    • Property svn:keywords changed from Id to Id Revision
    r63942 r69310  
    179179            print("")
    180180
    181 
  • trunk/src/VBox/Additions/common/crOpenGL/fakedri_drv.c

    r62521 r69310  
    11/* $Id$ */
    2 
    32/** @file
    43 * VBox OpenGL DRI driver functions
     
    4140/** X server message type definitions. */
    4241typedef enum {
    43     X_PROBED,                   /* Value was probed */
    44     X_CONFIG,                   /* Value was given in the config file */
    45     X_DEFAULT,                  /* Value is a default */
    46     X_CMDLINE,                  /* Value was given on the command line */
    47     X_NOTICE,                   /* Notice */
    48     X_ERROR,                    /* Error message */
    49     X_WARNING,                  /* Warning message */
    50     X_INFO,                     /* Informational message */
    51     X_NONE,                     /* No prefix */
    52     X_NOT_IMPLEMENTED,          /* Not implemented */
    53     X_UNKNOWN = -1              /* unknown -- this must always be last */
     42    X_PROBED,                   /* Value was probed */
     43    X_CONFIG,                   /* Value was given in the config file */
     44    X_DEFAULT,                  /* Value is a default */
     45    X_CMDLINE,                  /* Value was given on the command line */
     46    X_NOTICE,                   /* Notice */
     47    X_ERROR,                    /* Error message */
     48    X_WARNING,                  /* Warning message */
     49    X_INFO,                     /* Informational message */
     50    X_NONE,                     /* No prefix */
     51    X_NOT_IMPLEMENTED,          /* Not implemented */
     52    X_UNKNOWN = -1              /* unknown -- this must always be last */
    5453} MessageType;
    5554
     
    5857//#define DEBUG_DRI_CALLS
    5958
    60 //@todo this could be different...
     59/// @todo this could be different...
    6160#ifdef RT_ARCH_AMD64
    6261# ifdef RT_OS_FREEBSD
     
    219218    crMemcpy(pDst, pSrc, size);
    220219
    221     /*@todo Restore the protection, probably have to check what was it before us...*/
     220    /** @todo Restore the protection, probably have to check what was it before us...*/
    222221    rv = RTMemProtect(alPatch, pDst-alPatch+size, RTMEM_PROT_READ|RTMEM_PROT_EXEC);
    223222    if (RT_FAILURE(rv))
     
    232231/* Provide basic dladdr1 flags */
    233232enum {
    234         RTLD_DL_SYMENT  = 1
     233        RTLD_DL_SYMENT  = 1
    235234};
    236235
     
    239238dladdr1(const void *address, Dl_info *dlip, void **info, int flags)
    240239{
    241         static DRI_ELFSYM desym;
    242         GElf_Sym sym;
    243         GElf_Shdr shdr;
    244         Elf *elf;
    245         Elf_Scn *scn;
    246         Elf_Data *data;
    247         int ret, fd, count, i;
    248 
    249         /* Initialize variables */
    250         fd = -1;
    251         elf = NULL;
    252 
    253         /* Call dladdr first */
    254         ret = dladdr(address, dlip);
    255         if (ret == 0) goto err_exit;
    256 
    257         /* Check for supported flags */
    258         if (flags != RTLD_DL_SYMENT) return 1;
    259 
    260         /* Open shared library's ELF file */
    261         if (elf_version(EV_CURRENT) == EV_NONE) goto err_exit;
    262         fd = open(dlip->dli_fname, O_RDONLY);
    263         if (fd < 0) goto err_exit;
    264         elf = elf_begin(fd, ELF_C_READ, NULL);
    265         if (elf == NULL) goto err_exit;
    266 
    267         /* Find the '.dynsym' section */
    268         scn = elf_nextscn(elf, NULL);
    269         while (scn != NULL) {
    270                 if (gelf_getshdr(scn, &shdr) == NULL) goto err_exit;
    271                 if (shdr.sh_type == SHT_DYNSYM) break;
    272                 scn = elf_nextscn(elf, scn);
    273         }
    274         if (scn == NULL) goto err_exit;
    275 
    276         /* Search for the requested symbol by name and offset */
    277         data = elf_getdata(scn, NULL);
    278         count = shdr.sh_size / shdr.sh_entsize;
    279         for (i = 0; i < count; i++) {
    280                 gelf_getsym(data, i, &sym);
    281                 if ((strcmp(dlip->dli_sname,
    282                         elf_strptr(elf, shdr.sh_link, sym.st_name)) == 0) &&
    283                     (sym.st_value == (dlip->dli_saddr - dlip->dli_fbase))) {
    284                         break;
    285                 }
    286         }
    287 
    288         /* Close ELF file */
    289         elf_end(elf);
    290         close(fd);
    291 
    292         /* Return symbol entry in native format */
    293         desym.st_name = sym.st_name;
    294         desym.st_info = sym.st_info;
    295         desym.st_other = sym.st_other;
    296         desym.st_shndx = sym.st_shndx;
    297         desym.st_value = sym.st_value;
    298         desym.st_size = sym.st_size;
    299         *info = &desym;
    300         return 1;
    301 
    302         /* Error handler */
     240        static DRI_ELFSYM desym;
     241        GElf_Sym sym;
     242        GElf_Shdr shdr;
     243        Elf *elf;
     244        Elf_Scn *scn;
     245        Elf_Data *data;
     246        int ret, fd, count, i;
     247
     248        /* Initialize variables */
     249        fd = -1;
     250        elf = NULL;
     251
     252        /* Call dladdr first */
     253        ret = dladdr(address, dlip);
     254        if (ret == 0) goto err_exit;
     255
     256        /* Check for supported flags */
     257        if (flags != RTLD_DL_SYMENT) return 1;
     258
     259        /* Open shared library's ELF file */
     260        if (elf_version(EV_CURRENT) == EV_NONE) goto err_exit;
     261        fd = open(dlip->dli_fname, O_RDONLY);
     262        if (fd < 0) goto err_exit;
     263        elf = elf_begin(fd, ELF_C_READ, NULL);
     264        if (elf == NULL) goto err_exit;
     265
     266        /* Find the '.dynsym' section */
     267        scn = elf_nextscn(elf, NULL);
     268        while (scn != NULL) {
     269                if (gelf_getshdr(scn, &shdr) == NULL) goto err_exit;
     270                if (shdr.sh_type == SHT_DYNSYM) break;
     271                scn = elf_nextscn(elf, scn);
     272        }
     273        if (scn == NULL) goto err_exit;
     274
     275        /* Search for the requested symbol by name and offset */
     276        data = elf_getdata(scn, NULL);
     277        count = shdr.sh_size / shdr.sh_entsize;
     278        for (i = 0; i < count; i++) {
     279                gelf_getsym(data, i, &sym);
     280                if ((strcmp(dlip->dli_sname,
     281                        elf_strptr(elf, shdr.sh_link, sym.st_name)) == 0) &&
     282                    (sym.st_value == (dlip->dli_saddr - dlip->dli_fbase))) {
     283                        break;
     284                }
     285        }
     286
     287        /* Close ELF file */
     288        elf_end(elf);
     289        close(fd);
     290
     291        /* Return symbol entry in native format */
     292        desym.st_name = sym.st_name;
     293        desym.st_info = sym.st_info;
     294        desym.st_other = sym.st_other;
     295        desym.st_shndx = sym.st_shndx;
     296        desym.st_value = sym.st_value;
     297        desym.st_size = sym.st_size;
     298        *info = &desym;
     299        return 1;
     300
     301        /* Error handler */
    303302err_exit:
    304         if (elf != NULL) elf_end(elf);
    305         if (fd >= 0) close(fd);
    306         return 0;
     303        if (elf != NULL) elf_end(elf);
     304        if (fd >= 0) close(fd);
     305        return 0;
    307306}
    308307#endif
     
    373372        /* Try to insert 5 bytes jmp/jmpq to our stub code */
    374373
    375         if (sym->st_size<5)
    376         {
    377             /*@todo we don't really know the size of targeted static function, but it's long enough in practice. We will also patch same place twice, but it's ok.*/
     374        if (sym->st_size<5)
     375        {
     376            /** @todo we don't really know the size of targeted static function, but it's long enough in practice. We will also patch same place twice, but it's ok.*/
    378377            if (!crStrcmp(psFuncName, "glXDestroyContext") || !crStrcmp(psFuncName, "glXFreeContextEXT"))
    379378            {
     
    392391            else if (!crStrcmp(psFuncName, "glXCreateGLXPixmapMESA"))
    393392            {
    394                 /*@todo it's just a return 0, which we're fine with for now*/
     393                /** @todo it's just a return 0, which we're fine with for now*/
    395394                return;
    396395            }
     
    440439                pNode->pDstEnd = dlip.dli_saddr+sym->st_size;
    441440                pNode->pSrcStart = pStart;
    442                 pNode->pSrcEnd = pEnd; 
     441                pNode->pSrcEnd = pEnd;
    443442                pNode->pNext = g_pRepatchList;
    444443                g_pRepatchList = pNode;
     
    470469                pNode->psFuncName = psFuncName;
    471470                pNode->pDstStart = dlip.dli_saddr+(pEnd-pStart);
    472                 pNode->pDstEnd = dlip.dli_saddr+sym->st_size; 
     471                pNode->pDstEnd = dlip.dli_saddr+sym->st_size;
    473472                pNode->pSrcStart = dlip.dli_saddr;
    474473                pNode->pSrcEnd = NULL;
     
    523522        crMemcpy(&patch[1], &offset, 4);
    524523# ifndef VBOX_NO_MESA_PATCH_REPORTS
    525         crDebug("Adding jmp from mesa %s to mesa %s+%#lx", pPatchNode->psFuncName, pFreeNode->psFuncName, 
     524        crDebug("Adding jmp from mesa %s to mesa %s+%#lx", pPatchNode->psFuncName, pFreeNode->psFuncName,
    526525                pFreeNode->pDstStart-pFreeNode->pSrcStart);
    527526# endif
     
    604603
    605604    handle = NULL;
    606     for (p = libPaths; *p; p = next) 
     605    for (p = libPaths; *p; p = next)
    607606    {
    608607        next = strchr(p, ':');
    609         if (next == NULL) 
     608        if (next == NULL)
    610609        {
    611610            len = strlen(p);
    612611            next = p + len;
    613         } 
    614         else 
     612        }
     613        else
    615614        {
    616615            len = next - p;
     
    635634    crDebug("loaded %s", realDriverName);
    636635
    637     for (i = 0; gppSwDriExternsion[i]; i++) 
     636    for (i = 0; gppSwDriExternsion[i]; i++)
    638637    {
    639638        if (strcmp(gppSwDriExternsion[i]->name, __DRI_CORE) == 0)
     
    716715}
    717716
    718 static void 
     717static void
    719718vboxdriDestroyScreen(__DRIscreen *screen)
    720719{
     
    755754}
    756755
    757 static void 
     756static void
    758757vboxdriDestroyDrawable(__DRIdrawable *drawable)
    759758{
     
    776775}
    777776
    778 static int 
     777static int
    779778vboxdriCopyContext(__DRIcontext *dest,
    780779                   __DRIcontext *src,
     
    784783}
    785784
    786 static void 
     785static void
    787786vboxdriDestroyContext(__DRIcontext *context)
    788787{
     
    790789}
    791790
    792 static int 
     791static int
    793792vboxdriBindContext(__DRIcontext *ctx,
    794793                   __DRIdrawable *pdraw,
     
    798797}
    799798
    800 static int 
     799static int
    801800vboxdriUnbindContext(__DRIcontext *ctx)
    802801{
     
    812811                              const __DRIversion *drm_version,
    813812                              const __DRIframebuffer *frame_buffer,
    814                               drmAddress pSAREA, int fd, 
     813                              drmAddress pSAREA, int fd,
    815814                              const __DRIextension **extensions,
    816815                              const __DRIconfig ***driver_modes,
     
    839838static __DRIcontext *
    840839vboxdriCreateNewContext_Legacy(__DRIscreen *psp, const __DRIconfig *config,
    841                                int render_type, __DRIcontext *shared, 
     840                               int render_type, __DRIcontext *shared,
    842841                               drm_context_t hwContext, void *data)
    843842{
  • trunk/src/VBox/Additions/common/crOpenGL/fakedri_drv.h

    r62521 r69310  
    11/* $Id$ */
    2 
    32/** @file
    4  *
    53 * VirtualBox guest OpenGL DRI header
    64 */
     
    119117#endif
    120118
    121 #endif /* ___CROPENGL_FAKEDRIDRV_H */
     119#endif /* !___CROPENGL_FAKEDRIDRV_H */
    122120
  • trunk/src/VBox/Additions/common/crOpenGL/fakedri_glfuncsList.h

    r62521 r69310  
    11/* $Id$ */
    2 
    32/** @file
    43 * VBox OpenGL list of opengl functions common in Mesa and vbox opengl stub
  • trunk/src/VBox/Additions/common/crOpenGL/fakedri_glxfuncsList.h

    r62521 r69310  
    11/* $Id$ */
    2 
    32/** @file
    43 * VBox OpenGL list of opengl functions common in Mesa and vbox opengl stub
  • trunk/src/VBox/Additions/common/crOpenGL/feedback/feedback_context.c

    r63206 r69310  
    2929
    3030
    31 /*@todo Multithreading case. (See feedback_spu.self.RenderMode)*/
     31/** @todo Multithreading case. (See feedback_spu.self.RenderMode)*/
    3232
    3333GLint FEEDBACKSPU_APIENTRY
     
    9494        }
    9595    }
    96     else 
     96    else
    9797    {
    9898        crStateMakeCurrent(NULL);
  • trunk/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_init.c

    r40431 r69310  
    8282        *options = feedbackSPUOptions;
    8383        *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
    84        
     84
    8585        return 1;
    8686}
  • trunk/src/VBox/Additions/common/crOpenGL/getprocaddress.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/glx.c

    • Property svn:keywords set to Id Revision
    r69040 r69310  
    1 /* $Id: dri_drv.c 100879 2015-06-09 14:26:20Z bird $ */
    2 
     1/* $Id$ */
    32/** @file
    43 * VBox OpenGL GLX implementation
     
    4039#define CR_MAX_DAMAGE_REGIONS_TRACKED 50
    4140
    42 /* Force "bigger" update (full or clip) if it's reducing number of regions updated 
     41/* Force "bigger" update (full or clip) if it's reducing number of regions updated
    4342 * but doesn't increase updated area more than given number
    4443 */
    4544#define CR_MIN_DAMAGE_PROFIT_SIZE 64*64
    4645
    47 /*@todo combine it in some other place*/
     46/** @todo combine it in some other place*/
    4847/* Size of pack spu buffer - some delta for commands packing, see pack/packspu_config.c*/
    4948
     
    218217    pret = XGetVisualInfo(dpy, VisualIDMask, &searchvis, &nvisuals);
    219218    XUNLOCK(dpy);
    220      
     219
    221220    if (nvisuals!=1) crWarning("glXChooseVisual: XGetVisualInfo returned %i visuals for %x", nvisuals, (unsigned int) searchvis.visualid);
    222221    if (pret)
     
    232231 **  There is a problem with glXCopyContext.
    233232 ** IRIX and Mesa both define glXCopyContext
    234  ** to have the mask argument being a 
     233 ** to have the mask argument being a
    235234 ** GLuint.  XFree 4 and oss.sgi.com
    236235 ** define it to be an unsigned long.
     
    240239 */
    241240DECLEXPORT(void)
    242 VBOXGLXTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, 
     241VBOXGLXTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst,
    243242#if defined(AIX) || defined(PLAYSTATION2)
    244243GLuint mask
     
    377376        if (pGlxPixmap)
    378377        {
    379             /*@todo*/
     378            /** @todo */
    380379            crWarning("Unimplemented glxMakeCurrent call with GLXPixmap passed, unexpected things might happen.");
    381380        }
     
    523522#if defined(SunOS) || 1
    524523        /*
    525           I don't think this is even a valid attribute for glxGetConfig. 
     524          I don't think this is even a valid attribute for glxGetConfig.
    526525          No idea why this gets called under SunOS but we simply ignore it
    527526          -- jw
     
    530529          crWarning ("Ignoring Unsupported GLX Call: glxGetConfig with attrib 0x%x", attrib);
    531530          break;
    532 #endif 
     531#endif
    533532
    534533        case GLX_TRANSPARENT_TYPE:
     
    679678
    680679        case GLX_EXTENSIONS:
    681             /*@todo should be a screen not a name...but it's not used anyway*/
     680            /** @todo should be a screen not a name...but it's not used anyway*/
    682681            retval  = glXQueryExtensionsString(dpy, name);
    683682            break;
     
    730729#if GLX_EXTRAS
    731730
    732 DECLEXPORT(GLXPbufferSGIX) 
     731DECLEXPORT(GLXPbufferSGIX)
    733732VBOXGLXTAG(glXCreateGLXPbufferSGIX)(Display *dpy, GLXFBConfigSGIX config,
    734733                                    unsigned int width, unsigned int height,
     
    782781}
    783782
    784 DECLEXPORT(GLXFBConfigSGIX *) 
     783DECLEXPORT(GLXFBConfigSGIX *)
    785784VBOXGLXTAG(glXChooseFBConfigSGIX)(Display *dpy, int screen,
    786785                                  int *attrib_list, int *nelements)
     
    789788}
    790789
    791 DECLEXPORT(GLXPixmap) 
     790DECLEXPORT(GLXPixmap)
    792791VBOXGLXTAG(glXCreateGLXPixmapWithConfigSGIX)(Display *dpy,
    793792                                             GLXFBConfig config,
     
    797796}
    798797
    799 DECLEXPORT(GLXContext) 
     798DECLEXPORT(GLXContext)
    800799VBOXGLXTAG(glXCreateContextWithConfigSGIX)(Display *dpy, GLXFBConfig config,
    801800                                           int render_type,
     
    812811}
    813812
    814 DECLEXPORT(XVisualInfo *) 
     813DECLEXPORT(XVisualInfo *)
    815814VBOXGLXTAG(glXGetVisualFromFBConfigSGIX)(Display *dpy,
    816815                                         GLXFBConfig config)
     
    969968}
    970969
    971 DECLEXPORT(GLXContext) 
     970DECLEXPORT(GLXContext)
    972971VBOXGLXTAG(glXCreateNewContext)(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct)
    973972{
     
    987986}
    988987
    989 DECLEXPORT(GLXPbuffer) 
     988DECLEXPORT(GLXPbuffer)
    990989VBOXGLXTAG(glXCreatePbuffer)(Display *dpy, GLXFBConfig config, ATTRIB_TYPE *attrib_list)
    991990{
     
    1000999 * Instead we'd do necessary initialization on first use of those pixmaps.
    10011000 */
    1002 DECLEXPORT(GLXPixmap) 
     1001DECLEXPORT(GLXPixmap)
    10031002VBOXGLXTAG(glXCreatePixmap)(Display *dpy, GLXFBConfig config, Pixmap pixmap, ATTRIB_TYPE *attrib_list)
    10041003{
     
    10851084}
    10861085
    1087 DECLEXPORT(GLXWindow) 
     1086DECLEXPORT(GLXWindow)
    10881087VBOXGLXTAG(glXCreateWindow)(Display *dpy, GLXFBConfig config, Window win, ATTRIB_TYPE *attrib_list)
    10891088{
     
    12941293            break;
    12951294        default:
    1296             crDebug("glXGetFBConfigAttrib: unknown attribute=0x%x", attribute); 
     1295            crDebug("glXGetFBConfigAttrib: unknown attribute=0x%x", attribute);
    12971296            return GLX_BAD_ATTRIBUTE;
    12981297    }
     
    14401439    crInfo("Using XSHM for GLX_EXT_texture_from_pixmap");
    14411440
    1442     /*Anyway mark to be deleted when our process detaches it, in case of segfault etc*/   
     1441    /*Anyway mark to be deleted when our process detaches it, in case of segfault etc*/
    14431442
    14441443/* Ramshankar: Solaris compiz fix */
     
    14531452
    14541453    CRASSERT(pContext);
    1455    
     1454
    14561455    if (pContext->damageQueryFailed)
    14571456        return;
     
    14791478        int        nReturnRects;
    14801479
    1481         /* Get the damage region as a server region */ 
     1480        /* Get the damage region as a server region */
    14821481        XserverRegion serverDamageRegion = XFixesCreateRegion (dpy, NULL, 0);
    14831482
     
    16101609        pGlxPixmap->gc = XCreateGC(dpy, (Pixmap)draw, GCGraphicsExposures|GCSubwindowMode, &xgcv);
    16111610
    1612         pGlxPixmap->hShmPixmap = XShmCreatePixmap(dpy, pGlxPixmap->root, stub.xshmSI.shmaddr, &stub.xshmSI, 
     1611        pGlxPixmap->hShmPixmap = XShmCreatePixmap(dpy, pGlxPixmap->root, stub.xshmSI.shmaddr, &stub.xshmSI,
    16131612                                                  pGlxPixmap->w, pGlxPixmap->h, pGlxPixmap->depth);
    16141613    }
     
    16411640    }
    16421641
    1643     /* glTexSubImage2D generates GL_INVALID_OP if texture array hasn't been defined by a call to glTexImage2D first. 
     1642    /* glTexSubImage2D generates GL_INVALID_OP if texture array hasn't been defined by a call to glTexImage2D first.
    16441643     * It's fine for small textures which would be updated in stubXshmUpdateWholeImage, but we'd never call glTexImage2D for big ones.
    16451644     * Note that we're making empty texture by passing NULL as pixels pointer, so there's no overhead transferring data to host.*/
    16461645    if (CR_MAX_TRANSFER_SIZE < 4*pGlxPixmap->w*pGlxPixmap->h)
    16471646    {
    1648         stub.spu->dispatch_table.TexImage2D(pGlxPixmap->target, 0, pGlxPixmap->format, pGlxPixmap->w, pGlxPixmap->h, 0, 
     1647        stub.spu->dispatch_table.TexImage2D(pGlxPixmap->target, 0, pGlxPixmap->format, pGlxPixmap->w, pGlxPixmap->h, 0,
    16491648                                            GL_BGRA, GL_UNSIGNED_BYTE, NULL);
    16501649    }
     
    16601659    /* To limit the size of transferring buffer, split bigger texture into regions
    16611660     * which fit into connection buffer. Could be done in hgcm or packspu but implementation in this place allows to avoid
    1662      * unnecessary memcpy. 
     1661     * unnecessary memcpy.
    16631662     * This also workarounds guest driver failures when sending 6+mb texture buffers on linux.
    16641663     */
     
    16911690
    16921691        XLOCK(dpy);
    1693         XCopyArea(dpy, (Pixmap)draw, pGlxPixmap->hShmPixmap, pGlxPixmap->gc, 
     1692        XCopyArea(dpy, (Pixmap)draw, pGlxPixmap->hShmPixmap, pGlxPixmap->gc,
    16941693                  pGlxPixmap->x, pGlxPixmap->y, pGlxPixmap->w, pGlxPixmap->h, 0, 0);
    16951694        /* Have to make sure XCopyArea is processed */
    16961695        XSync(dpy, False);
    16971696        XUNLOCK(dpy);
    1698        
     1697
    16991698        stubGetUnpackState(&unpackState);
    17001699        stubSetUnpackState(&defaultPacking);
    1701         stub.spu->dispatch_table.TexImage2D(pGlxPixmap->target, 0, pGlxPixmap->format, pGlxPixmap->w, pGlxPixmap->h, 0, 
     1700        stub.spu->dispatch_table.TexImage2D(pGlxPixmap->target, 0, pGlxPixmap->format, pGlxPixmap->w, pGlxPixmap->h, 0,
    17021701                                            GL_BGRA, GL_UNSIGNED_BYTE, stub.xshmSI.shmaddr);
    17031702        stubSetUnpackState(&unpackState);
    1704         /*crDebug("Sync texture for drawable 0x%x(dmg handle 0x%x) [%i,%i,%i,%i]", 
    1705                   (unsigned int) draw, (unsigned int)pGlxPixmap->hDamage, 
     1703        /*crDebug("Sync texture for drawable 0x%x(dmg handle 0x%x) [%i,%i,%i,%i]",
     1704                  (unsigned int) draw, (unsigned int)pGlxPixmap->hDamage,
    17061705                  pGlxPixmap->x, pGlxPixmap->y, pGlxPixmap->w, pGlxPixmap->h);*/
    17071706    }
     
    17391738
    17401739        XLOCK(dpy);
    1741         XCopyArea(dpy, (Pixmap)draw, pGlxPixmap->hShmPixmap, pGlxPixmap->gc, 
     1740        XCopyArea(dpy, (Pixmap)draw, pGlxPixmap->hShmPixmap, pGlxPixmap->gc,
    17421741                  pRect->x, pRect->y, pRect->width, pRect->height, 0, 0);
    17431742        /* Have to make sure XCopyArea is processed */
     
    17511750            stub.spu->dispatch_table.PixelStorei(GL_UNPACK_ROW_LENGTH, pGlxPixmap->w);
    17521751        }
    1753         stub.spu->dispatch_table.TexSubImage2D(pGlxPixmap->target, 0, pRect->x, pRect->y, pRect->width, pRect->height, 
     1752        stub.spu->dispatch_table.TexSubImage2D(pGlxPixmap->target, 0, pRect->x, pRect->y, pRect->width, pRect->height,
    17541753                                               GL_BGRA, GL_UNSIGNED_BYTE, stub.xshmSI.shmaddr);
    17551754        stubSetUnpackState(&unpackState);
    17561755
    1757         /*crDebug("Region sync texture for drawable 0x%x(dmg handle 0x%x) [%i,%i,%i,%i]", 
    1758                 (unsigned int) draw, (unsigned int)pGlxPixmap->hDamage, 
     1756        /*crDebug("Region sync texture for drawable 0x%x(dmg handle 0x%x) [%i,%i,%i,%i]",
     1757                (unsigned int) draw, (unsigned int)pGlxPixmap->hDamage,
    17591758                pRect->x, pRect->y, pRect->width, pRect->height);*/
    17601759    }
     
    17691768        ContextInfo *context = stubGetCurrentContext();
    17701769        XDamageNotifyEvent *e = (XDamageNotifyEvent *) event;
    1771         /* we're interested in pixmaps only...and those have e->drawable set to 0 or other strange value for some odd reason 
     1770        /* we're interested in pixmaps only...and those have e->drawable set to 0 or other strange value for some odd reason
    17721771         * so have to walk glxpixmaps hashtable to find if we have damage event handle assigned to some pixmap
    17731772         */
     
    17821781#endif
    17831782
    1784 /*@todo check what error codes could we throw for failures here*/
     1783/** @todo check what error codes could we throw for failures here*/
    17851784DECLEXPORT(void) VBOXGLXTAG(glXBindTexImageEXT)(Display *dpy, GLXDrawable draw, int buffer, const int *attrib_list)
    17861785{
     
    18261825    if (stub.xshmSI.shmid<0)
    18271826    {
    1828         /*@todo add damage support here too*/
     1827        /** @todo add damage support here too*/
    18291828        XImage *pxim;
    18301829        CRPixelPackState unpackState;
     
    18601859        stubGetUnpackState(&unpackState);
    18611860        stubSetUnpackState(&defaultPacking);
    1862         stub.spu->dispatch_table.TexImage2D(pGlxPixmap->target, 0, pGlxPixmap->format, pxim->width, pxim->height, 0, 
     1861        stub.spu->dispatch_table.TexImage2D(pGlxPixmap->target, 0, pGlxPixmap->format, pxim->width, pxim->height, 0,
    18631862                                            GL_BGRA, GL_UNSIGNED_BYTE, (void*)(&(pxim->data[0])));
    18641863        stubSetUnpackState(&unpackState);
     
    19001899                    {
    19011900                        crWarning("glXBindTexImageEXT, damage regions seems to be broken, forcing full update");
    1902                         /*crDebug("**FULL** update for 0x%x, numRect=%li, *FS*=%li, CS=%li, DS=%li", 
     1901                        /*crDebug("**FULL** update for 0x%x, numRect=%li, *FS*=%li, CS=%li, DS=%li",
    19031902                                (unsigned int)draw, pGlxPixmap->pDamageRegion->numRects, fullArea, clipdamageArea, damageArea);*/
    19041903                        stubXshmUpdateWholeImage(dpy, draw, pGlxPixmap);
     
    19081907                        if (CR_MIN_DAMAGE_PROFIT_SIZE > (fullArea-damageArea))
    19091908                        {
    1910                             /*crDebug("**FULL** update for 0x%x, numRect=%li, *FS*=%li, CS=%li, DS=%li", 
     1909                            /*crDebug("**FULL** update for 0x%x, numRect=%li, *FS*=%li, CS=%li, DS=%li",
    19111910                                    (unsigned int)draw, pGlxPixmap->pDamageRegion->numRects, fullArea, clipdamageArea, damageArea);*/
    19121911                            stubXshmUpdateWholeImage(dpy, draw, pGlxPixmap);
     
    19141913                        else if (CR_MIN_DAMAGE_PROFIT_SIZE > (clipdamageArea-damageArea))
    19151914                        {
    1916                             /*crDebug("**PARTIAL** update for 0x%x, numRect=%li, FS=%li, *CS*=%li, DS=%li", 
     1915                            /*crDebug("**PARTIAL** update for 0x%x, numRect=%li, FS=%li, *CS*=%li, DS=%li",
    19171916                                    (unsigned int)draw, pGlxPixmap->pDamageRegion->numRects, fullArea, clipdamageArea, damageArea);*/
    19181917                            stubXshmUpdateImageRect(dpy, draw, pGlxPixmap, &damageClipBox);
     
    19201919                        else
    19211920                        {
    1922                             /*crDebug("**PARTIAL** update for 0x%x, numRect=*%li*, FS=%li, CS=%li, *DS*=%li", 
     1921                            /*crDebug("**PARTIAL** update for 0x%x, numRect=*%li*, FS=%li, CS=%li, *DS*=%li",
    19231922                                    (unsigned int)draw, pGlxPixmap->pDamageRegion->numRects, fullArea, clipdamageArea, damageArea);*/
    19241923                            for (i=0; i<pGlxPixmap->pDamageRegion->numRects; ++i)
     
    19261925                                XRectangle rect;
    19271926                                BoxPtr pBox = &pGlxPixmap->pDamageRegion->rects[i];
    1928                                
     1927
    19291928                                rect.x = pBox->x1;
    19301929                                rect.y = pBox->y1;
  • trunk/src/VBox/Additions/common/crOpenGL/glx_c_exports.c

    • Property svn:keywords changed from Id to Id Revision
    r62521 r69310  
    11/* $Id$ */
    22/** @file
    3  *
    43 * VirtualBox guest OpenGL DRI GLX C stubs
    54 */
  • trunk/src/VBox/Additions/common/crOpenGL/glx_proto.h

    r62521 r69310  
    11/* $Id$ */
    22/** @file
    3  *
    43 * VirtualBox guest OpenGL DRI GLX header C prototypes
    54 */
  • trunk/src/VBox/Additions/common/crOpenGL/icd_drv.c

    • Property svn:keywords changed from Id to Id Revision
    r66826 r69310  
    2929#include <iprt/win/windows.h>
    3030
    31 //TODO: consider
     31/// @todo consider
    3232/* We can modify chronium dispatch table functions order to match the one required by ICD,
    3333 * but it'd render us incompatible with other chromium SPUs and require more changes.
     
    6565static GLuint ComputeVisBits( HDC hdc )
    6666{
    67     PIXELFORMATDESCRIPTOR pfd; 
     67    PIXELFORMATDESCRIPTOR pfd;
    6868    int iPixelFormat;
    6969    GLuint b = 0;
     
    107107    }
    108108
    109     crDebug("DrvValidateVersion %x -> FALSE, going to use system default opengl32.dll\n", version); 
     109    crDebug("DrvValidateVersion %x -> FALSE, going to use system default opengl32.dll\n", version);
    110110    return FALSE;
    111111}
     
    203203        return NULL;
    204204    }
    205    
     205
    206206}
    207207
     
    392392    CR_DDI_PROLOGUE();
    393393    /*crDebug( "DrvSwapBuffers(0x%x) called", hdc );*/
    394     window = stubGetWindowInfo(hdc);   
     394    window = stubGetWindowInfo(hdc);
    395395    stubSwapBuffers( window, 0 );
    396396    return 1;
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    • Property svn:keywords changed from Id to Id Revision
    r68890 r69310  
    106106
    107107#ifdef WINDOWS
    108     /* @todo install hook and track for WM_DISPLAYCHANGE */
     108    /** @todo install hook and track for WM_DISPLAYCHANGE */
    109109    {
    110110        DEVMODE devMode;
     
    952952
    953953#if defined(CR_NEWWINTRACK) && !defined(WINDOWS)
    954     /*@todo when vm boots with compiz turned on, new code causes hang in xcb_wait_for_reply in the sync thread
     954    /** @todo when vm boots with compiz turned on, new code causes hang in xcb_wait_for_reply in the sync thread
    955955     * as at the start compiz runs our code under XGrabServer.
    956956     */
     
    962962#endif
    963963
    964     /* @todo check if it'd be of any use on other than guests, no use for windows */
     964    /** @todo check if it'd be of any use on other than guests, no use for windows */
    965965    app_id = crGetenv( "CR_APPLICATION_ID_NUMBER" );
    966966
     
    10211021        crDebug("running with %s", VBOX_MODNAME_DISPD3D);
    10221022        stub.trackWindowVisibleRgn = 0;
    1023         /* @todo: should we enable that? */
     1023        /** @todo should we enable that? */
    10241024        stub.trackWindowSize = 0;
    10251025        stub.trackWindowPos = 0;
     
    14791479        }
    14801480
    1481        
     1481
    14821482#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    14831483        VBoxCrHgsmiTerm();
  • trunk/src/VBox/Additions/common/crOpenGL/pack/pack.def

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/pack/pack.py

    • Property svn:keywords changed from Id to Id Revision
    r63942 r69310  
    3939for func_name in keys:
    4040    if ("get" in apiutil.Properties(func_name) or
    41         apiutil.FindSpecial( "packspu", func_name ) or 
    42         apiutil.FindSpecial( "packspu_flush", func_name ) or 
     41        apiutil.FindSpecial( "packspu", func_name ) or
     42        apiutil.FindSpecial( "packspu_flush", func_name ) or
    4343        apiutil.FindSpecial( "packspu_vertex", func_name )):
    4444      pack_specials.append( func_name )
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_bufferobject.c

    • Property svn:keywords changed from Id to Id Revision
    r45008 r69310  
    3939        CRASSERT(pBufObj);
    4040
    41         if (pBufObj->bResyncOnRead && 
     41        if (pBufObj->bResyncOnRead &&
    4242            access != GL_WRITE_ONLY_ARB)
    4343        {
     
    6666    }
    6767#endif
    68    
     68
    6969    crStateGetBufferSubDataARB(target, offset, size, data);
    7070}
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c

    • Property svn:keywords changed from Id to Id Revision
    r63205 r69310  
    340340packspu_ArrayElement( GLint index )
    341341{
    342 /*@todo cash guest/host pointers calculation and use appropriate path here without crStateUseServerArrays call*/
     342/** @todo cash guest/host pointers calculation and use appropriate path here without crStateUseServerArrays call*/
    343343#if 1
    344344    GLboolean serverArrays = GL_FALSE;
     
    857857    GLboolean res = crStateIsEnabled(cap);
    858858#ifdef DEBUG
    859     {   
     859    {
    860860        GET_THREAD(thread);
    861861            int writeback = 1;
     
    893893        */
    894894        /*crPackLockArraysEXT(first, count);*/
    895     } 
     895    }
    896896    else crDebug("Ignoring packspu_LockArraysEXT: first:%i, count:%i", first, count);
    897897}
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_config.c

    • Property svn:keywords changed from Id to Id Revision
    r63205 r69310  
    3737
    3838
    39 /* No SPU options yet. Well.. not really.. 
     39/* No SPU options yet. Well.. not really..
    4040 */
    4141SPUOptions packSPUOptions[] = {
    42     { "emit_GATHER_POST_SWAPBUFFERS", CR_BOOL, 1, "0", NULL, NULL, 
     42    { "emit_GATHER_POST_SWAPBUFFERS", CR_BOOL, 1, "0", NULL, NULL,
    4343      "Emit a parameter after SwapBuffers", (SPUOptionCB)set_emit },
    4444
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c

    • Property svn:keywords changed from Id to Id Revision
    r63205 r69310  
    375375         * server could be aware of how each other were numbering things in
    376376         * cases like file networking where they actually
    377          * care. 
     377         * care.
    378378         *
    379          *  -Humper 
     379         *  -Humper
    380380         *
    381381         */
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_flush.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_framebuffer.c

    r62521 r69310  
    4646packspu_BindFramebufferEXT(GLenum target, GLuint framebuffer)
    4747{
    48         crStateBindFramebufferEXT(target, framebuffer);
     48        crStateBindFramebufferEXT(target, framebuffer);
    4949    crPackBindFramebufferEXT(target, framebuffer);
    5050}
     
    5353packspu_DeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
    5454{
    55         crStateDeleteFramebuffersEXT(n, framebuffers);
     55        crStateDeleteFramebuffersEXT(n, framebuffers);
    5656    crPackDeleteFramebuffersEXT(n, framebuffers);
    5757}
     
    6060packspu_DeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
    6161{
    62         crStateDeleteRenderbuffersEXT(n, renderbuffers);
     62        crStateDeleteRenderbuffersEXT(n, renderbuffers);
    6363    crPackDeleteRenderbuffersEXT(n, renderbuffers);
    6464}
     
    6767packspu_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
    6868{
    69         crStateFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);
     69        crStateFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);
    7070    crPackFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);
    7171}
     
    8181packspu_CheckFramebufferStatusEXT(GLenum target)
    8282{
    83         GET_THREAD(thread);
    84         int writeback = 1;
     83        GET_THREAD(thread);
     84        int writeback = 1;
    8585    GLenum status = crStateCheckFramebufferStatusEXT(target);
    8686
     
    9292    crPackCheckFramebufferStatusEXT(target, &status, &writeback);
    9393
    94         packspuFlush((void *) thread);
     94        packspuFlush((void *) thread);
    9595    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    9696
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py

    • Property svn:keywords changed from Id to Id Revision
    r63942 r69310  
    5151from get_sizes import *
    5252
    53 easy_swaps = { 
     53easy_swaps = {
    5454    'GenTextures': '(unsigned int) n',
    5555    'GetClipPlane': '4',
    5656    'GetPolygonStipple': '0'
    5757}
    58    
     58
    5959simple_funcs = [ 'GetIntegerv', 'GetFloatv', 'GetDoublev', 'GetBooleanv' ]
    6060simple_swaps = [ 'SWAP32', 'SWAPFLOAT', 'SWAPDOUBLE', '(GLboolean) SWAP32' ]
     
    123123        || pname == GL_FRAMEBUFFER_BINDING_EXT
    124124        || pname == GL_READ_FRAMEBUFFER_BINDING_EXT
    125         || pname == GL_DRAW_FRAMEBUFFER_BINDING_EXT 
     125        || pname == GL_DRAW_FRAMEBUFFER_BINDING_EXT
    126126#endif
    127127        || pname == GL_ARRAY_BUFFER_BINDING
     
    161161                return;
    162162            }
    163            
     163
    164164        }
    165165            """ % (params[-1][1], params[-1][1], func_name, func_name, apiutil.MakeCallString(params), func_name, func_name))
    166            
     166
    167167        if func_name in vertattr_get_funcs:
    168168            print("""
     
    189189#endif
    190190        return;
    191     } 
     191    }
    192192            """ % (params[-1][1], params[-1][1], func_name, func_name, apiutil.MakeCallString(params), func_name, func_name))
    193193
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_getshaders.c

    • Property svn:keywords changed from Id to Id Revision
    r62521 r69310  
    2424#include <iprt/assert.h>
    2525
    26 /*@todo combine with the one from server_getshaders.c*/
     26/** @todo combine with the one from server_getshaders.c*/
    2727typedef struct _crGetActive_t
    2828{
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_getstring.c

    • Property svn:keywords changed from Id to Id Revision
    r52262 r69310  
    8787
    8888#ifdef Linux
    89         /*@todo
     89        /** @todo
    9090         *That's a hack to allow running Unity, it uses libnux which is calling extension functions
    9191         *without checking if it's being supported/exported.
     
    123123            {
    124124                GetString(GL_REAL_VERSION, ctx->pszRealVersion);
    125                 return ctx->pszRealVersion;               
     125                return ctx->pszRealVersion;
    126126            }
    127127            else
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c

    r63206 r69310  
    8181GLint PACKSPU_APIENTRY packspu_GetUniformLocation(GLuint program, const char * name)
    8282{
    83     if (!crStateIsProgramUniformsCached(program)) 
     83    if (!crStateIsProgramUniformsCached(program))
    8484    {
    8585        GET_THREAD(thread);
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_init.c

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c

    • Property svn:keywords changed from Id to Id Revision
    r63205 r69310  
    1919    GET_THREAD(thread);
    2020
    21    
     21
    2222    switch(target)
    2323    {
     
    104104    /*Usually buffer==GL_BACK, so put this extra check to simplify boolean eval on runtime*/
    105105    return  (buffer != GL_BACK)
    106             && (buffer == GL_FRONT_LEFT 
     106            && (buffer == GL_FRONT_LEFT
    107107                || buffer == GL_FRONT_RIGHT
    108108                || buffer == GL_FRONT
     
    795795    (void) lpvReserved;
    796796
    797     switch (fdwReason) 
     797    switch (fdwReason)
    798798    {
    799799        case DLL_PROCESS_ATTACH:
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c

    • Property svn:keywords changed from Id to Id Revision
    r63205 r69310  
    3131packspuReadback( const CRMessageReadback *rb, unsigned int len )
    3232{
    33     /* minus the header, the destination pointer, 
     33    /* minus the header, the destination pointer,
    3434     * *and* the implicit writeback pointer at the head. */
    3535
    3636    int payload_len = len - sizeof( *rb );
    3737    int *writeback;
    38     void *dest_ptr; 
     38    void *dest_ptr;
    3939    crMemcpy( &writeback, &(rb->writeback_ptr), sizeof( writeback ) );
    4040    crMemcpy( &dest_ptr, &(rb->readback_ptr), sizeof( dest_ptr ) );
     
    9090
    9191    num_opcodes = buf->opcode_start - buf->opcode_current;
    92     hdr = (CRMessageOpcodes *) 
     92    hdr = (CRMessageOpcodes *)
    9393        ( buf->data_start - ( ( num_opcodes + 3 ) & ~0x3 ) - sizeof(*hdr) );
    9494
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_pixel.c

    • Property svn:keywords changed from Id to Id Revision
    r63205 r69310  
    33
    44   See the file LICENSE.txt for information on redistributing this software. */
    5    
     5
    66#include "cr_packfunctions.h"
    77#include "cr_glstate.h"
     
    140140# endif
    141141#endif
    142         /*@todo ARB_texture_float*/
     142        /** @todo ARB_texture_float*/
    143143        && internalformat!=GL_RGBA32F_ARB
    144144        && internalformat!=GL_RGB32F_ARB
     
    301301    ContextInfo *ctx = thread->currentContext;
    302302    CRClientState *clientState = &(ctx->clientState->client);
    303     int writeback;   
     303    int writeback;
    304304
    305305    if (crStateIsBufferBound(GL_PIXEL_PACK_BUFFER_ARB))
     
    326326}
    327327
    328 /*@todo check with pbo's*/
     328/** @todo check with pbo's*/
    329329void PACKSPU_APIENTRY packspu_CopyPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type )
    330330{
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_proto.py

    • Property svn:keywords changed from Id to Id Revision
    r63942 r69310  
    3232for func_name in keys:
    3333    if ("get" in apiutil.Properties(func_name) or
    34         apiutil.FindSpecial( "packspu", func_name ) or 
    35         apiutil.FindSpecial( "packspu_flush", func_name ) or 
     34        apiutil.FindSpecial( "packspu", func_name ) or
     35        apiutil.FindSpecial( "packspu_flush", func_name ) or
    3636        apiutil.FindSpecial( "packspu_vertex", func_name )):
    3737      pack_specials.append( func_name )
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_swapbuf.c

    • Property svn:keywords changed from Id to Id Revision
    r42499 r69310  
    6666         * This is complicated because writeback in the pack spu is
    6767         * overridden to always set the value to zero when the
    68          * reply is received, rather than decrementing it: 
     68         * reply is received, rather than decrementing it:
    6969         */
    7070        switch( thread->writeback ) {
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_texture.c

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/passthrough/passthrough.def

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/passthrough/passthrough.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/passthrough/passthroughspu_init.c

    • Property svn:keywords changed from Id to Id Revision
    r15532 r69310  
    6060        *options = passthroughSPUOptions;
    6161        *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
    62        
     62
    6363        return 1;
    6464}
  • trunk/src/VBox/Additions/common/crOpenGL/stub.c

    • Property svn:keywords changed from Id to Id Revision
    r65537 r69310  
    66
    77#include "cr_spu.h"
    8 #include "cr_error.h" 
    9 #include "cr_mem.h" 
     8#include "cr_error.h"
     9#include "cr_mem.h"
    1010#include "stub.h"
    1111#include <iprt/thread.h>
     
    199199    stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH);
    200200
    201     /* @todo remove "if (winW && winH)"?*/
     201    /** @todo remove "if (winW && winH)"?*/
    202202    if (winW && winH) {
    203203        if (stub.trackWindowSize) {
     
    257257        return GL_FALSE;
    258258    }
    259    
     259
    260260    hVisRgn = CreateRectRgn(0,0,0,0);
    261261    iret = GetRandomRgn(pWindow->drawable, hVisRgn, SYSRGN);
     
    263263    if (iret==1)
    264264    {
    265         /*@todo check win95/win98 here, as rects should be already in client space there*/
     265        /** @todo check win95/win98 here, as rects should be already in client space there*/
    266266        /* Convert screen related rectangles to client related rectangles */
    267267        pt.x = 0;
     
    285285        */
    286286
    287         if (pWindow->hVisibleRegion==INVALID_HANDLE_VALUE 
     287        if (pWindow->hVisibleRegion==INVALID_HANDLE_VALUE
    288288            || !EqualRgn(pWindow->hVisibleRegion, hVisRgn))
    289289        {
     
    309309        }
    310310    }
    311     else 
     311    else
    312312    {
    313313        crWarning("GetRandomRgn returned (%d) instead of (1), VisibleRegions update failed", iret);
     
    395395            }
    396396
    397             /* @todo remove it*/
     397            /** @todo remove it*/
    398398            default:
    399399            {
     
    433433
    434434    XLOCK(dpy);
    435     if (XCompositeQueryExtension(dpy, &evb, &erb) 
    436         && XCompositeQueryVersion(dpy, &vma, &vmi) 
     435    if (XCompositeQueryExtension(dpy, &evb, &erb)
     436        && XCompositeQueryVersion(dpy, &vma, &vmi)
    437437        && (vma>0 || vmi>=4))
    438438    {
     
    441441        vma=0;
    442442        vmi=0;
    443         if (XFixesQueryExtension(dpy, &evb, &erb) 
     443        if (XFixesQueryExtension(dpy, &evb, &erb)
    444444            && XFixesQueryVersion(dpy, &vma, &vmi)
    445445            && vma>=2)
     
    488488    dpy = stubGetWindowDisplay(pWindow);
    489489
    490     /*@todo see comment regarding size/position updates and XSync, same applies to those functions but
     490    /** @todo see comment regarding size/position updates and XSync, same applies to those functions but
    491491    * it seems there's no way to get even based updates for this. Or I've failed to find the appropriate extension.
    492492    */
     
    505505    if (!bNoUpdate
    506506        && (!pWindow->pVisibleRegions
    507             || pWindow->cVisibleRegions!=cRects 
     507            || pWindow->cVisibleRegions!=cRects
    508508            || (pWindow->pVisibleRegions && crMemcmp(pWindow->pVisibleRegions, pXRects, cRects * sizeof(XRectangle)))))
    509509    {
     
    531531            pGLRects[4*i+2] = pXRects[i].x+pXRects[i].width;
    532532            pGLRects[4*i+3] = pXRects[i].y+pXRects[i].height;
    533             //crDebug("Rect[%i]=(%i,%i,%i,%i)", i, pGLRects[4*i+0], pGLRects[4*i+1], pGLRects[4*i+2], pGLRects[4*i+3]);                   
     533            //crDebug("Rect[%i]=(%i,%i,%i,%i)", i, pGLRects[4*i+0], pGLRects[4*i+1], pGLRects[4*i+2], pGLRects[4*i+3]);
    534534        }
    535535
  • trunk/src/VBox/Additions/common/crOpenGL/stub_common.py

    • Property svn:keywords changed from Id to Id Revision
    r63939 r69310  
    7676                annotations[filename] = {}
    7777                return {}
    78        
     78
    7979        for line in f.readlines():
    8080                line = line.strip()
     
    9696        except KeyError:
    9797                table = LoadAnnotations(filename)
    98        
     98
    9999        try:
    100100                subtable = table[key]
     
    110110        except KeyError:
    111111                table = LoadAnnotations(filename)
    112        
     112
    113113        try:
    114114                subtable = table[key]
     
    120120        except KeyError:
    121121                return 0
    122                
     122
    123123
    124124
     
    132132                specials[filename] = {}
    133133                return {}
    134        
     134
    135135        for line in f.readlines():
    136136                line = string.strip(line)
     
    138138                        continue
    139139                table[line] = 1
    140        
     140
    141141        specials[filename] = table
    142142        return table
     
    149149        except KeyError:
    150150                table = LoadSpecials( filename )
    151        
     151
    152152        try:
    153153                if (table[glName] == 1):
     
    165165        except KeyError:
    166166                table = LoadSpecials( filename )
    167        
     167
    168168        return sorted(table.keys())
    169169
     
    176176        except KeyError:
    177177                table = LoadSpecials(filename)
    178        
     178
    179179        return sorted(table.keys())
    180        
     180
    181181def NumSpecials( table_file ):
    182182        filename = table_file + "_special"
     
    257257        output = '( ' + InternalArgumentString(arg_names, arg_types) + ' )'
    258258        return output
    259        
     259
    260260def InternalCallString( arg_names ):
    261261        output = ''
  • trunk/src/VBox/Additions/common/crOpenGL/tsfuncs.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/utils.c

    r61902 r69310  
    4848
    4949unsigned
    50 driParseDebugString( const char * debug, 
     50driParseDebugString( const char * debug,
    5151                     const struct dri_debug_control * control  )
    5252{
     
    7373/**
    7474 * Create the \c GL_RENDERER string for DRI drivers.
    75  * 
     75 *
    7676 * Almost all DRI drivers use a \c GL_RENDERER string of the form:
    7777 *
     
    8080 * Using the supplied chip name, driver data, and AGP speed, this function
    8181 * creates the string.
    82  * 
     82 *
    8383 * \param buffer         Buffer to hold the \c GL_RENDERER string.
    8484 * \param hardware_name  Name of the hardware.
    8585 * \param driver_date    Driver date.
    8686 * \param agp_mode       AGP mode (speed).
    87  * 
     87 *
    8888 * \returns
    8989 * The length of the string stored in \c buffer.  This does \b not include
     
    112112      offset += sprintf( & buffer[ offset ], " AGP %ux", agp_mode );
    113113      break;
    114        
     114
    115115   default:
    116116      break;
     
    215215/**
    216216 * Enable extensions supported by the driver.
    217  * 
     217 *
    218218 * \bug
    219219 * ARB_imaging isn't handled properly.  In Mesa, enabling ARB_imaging also
     
    252252/**
    253253 * Enable and add dispatch functions for a single extension
    254  * 
     254 *
    255255 * \param ctx  Context where extension is to be enabled.
    256256 * \param ext  Extension that is to be enabled.
    257  * 
     257 *
    258258 * \sa driInitExtensions, _mesa_enable_extension, _glapi_add_entrypoint
    259259 *
     
    315315            }
    316316            else if (ext->functions[i].remap_index != -1) {
    317                 driDispatchRemapTable[ ext->functions[i].remap_index ] = 
     317                driDispatchRemapTable[ ext->functions[i].remap_index ] =
    318318                  offset;
    319319            }
     
    344344 * \param drmActual    Actual DRM version supplied __driCreateNewScreen.
    345345 * \param drmExpected  Minimum DRM version required by the driver.
    346  * 
     346 *
    347347 * \returns \c GL_TRUE if all version requirements are met.  Otherwise,
    348348 *          \c GL_FALSE is returned.
    349  * 
     349 *
    350350 * \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2, __driUtilMessage
    351351 *
     
    388388      return GL_FALSE;
    389389   }
    390    
     390
    391391   /* Check that the DRM driver version is compatible */
    392392   if ( (drmActual->major != drmExpected->major)
     
    455455/**
    456456 * Creates a set of \c __GLcontextModes that a driver will expose.
    457  * 
     457 *
    458458 * A set of \c __GLcontextModes will be created based on the supplied
    459459 * parameters.  The number of modes processed will be 2 *
    460460 * \c num_depth_stencil_bits * \c num_db_modes.
    461  * 
     461 *
    462462 * For the most part, data is just copied from \c depth_bits, \c stencil_bits,
    463463 * \c db_modes, and \c visType into each \c __GLcontextModes element.
     
    471471 * are the blue value, bits [10:5] are the green value, and bits [4:0] are
    472472 * the red value.
    473  * 
     473 *
    474474 * One subtle issue is the combination of \c GL_RGB  or \c GL_BGR and either
    475475 * of the \c GL_UNSIGNED_INT_8_8_8_8 modes.  The resulting mask values in the
     
    480480 *
    481481 * If in doubt, look at the tables used in the function.
    482  * 
     482 *
    483483 * \param ptr_to_modes  Pointer to a pointer to a linked list of
    484484 *                      \c __GLcontextModes.  Upon completion, a pointer to
     
    490490 *                      \c GL_RGBA, \c GL_BGR, and \c GL_BGRA are supported.
    491491 * \param fb_type       Type of the pixels in the framebuffer.  Currently only
    492  *                      \c GL_UNSIGNED_SHORT_5_6_5, 
     492 *                      \c GL_UNSIGNED_SHORT_5_6_5,
    493493 *                      \c GL_UNSIGNED_SHORT_5_6_5_REV,
    494494 *                      \c GL_UNSIGNED_INT_8_8_8_8, and
     
    507507 * \param visType       GLX visual type.  Usually either \c GLX_TRUE_COLOR or
    508508 *                      \c GLX_DIRECT_COLOR.
    509  * 
     509 *
    510510 * \returns
    511511 * \c GL_TRUE on success or \c GL_FALSE on failure.  Currently the only
    512512 * cause of failure is a bad parameter (i.e., unsupported \c fb_format or
    513513 * \c fb_type).
    514  * 
     514 *
    515515 * \todo
    516516 * There is currently no way to support packed RGB modes (i.e., modes with
    517517 * exactly 3 bytes per pixel) or floating-point modes.  This could probably
    518518 * be done by creating some new, private enums with clever names likes
    519  * \c GL_UNSIGNED_3BYTE_8_8_8, \c GL_4FLOAT_32_32_32_32, 
     519 * \c GL_UNSIGNED_3BYTE_8_8_8, \c GL_4FLOAT_32_32_32_32,
    520520 * \c GL_4HALF_16_16_16_16, etc.  We can cross that bridge when we come to it.
    521521 */
     
    746746    while (b[j] != NULL)
    747747        j++;
    748    
     748
    749749    all = _mesa_malloc((i + j + 1) * sizeof *all);
    750750    index = 0;
     
    844844        *value = *(unsigned int *)
    845845            ((char *) &config->modes + attribMap[index].offset);
    846        
     846
    847847        break;
    848848    }
  • trunk/src/VBox/Additions/common/crOpenGL/vboxdri_drv.c

    r33540 r69310  
    3131 * NOTES:
    3232 *   -- No mechanism for cliprects or resize notification --
    33  *      assumes this is a fullscreen device. 
    34  *   -- No locking -- assumes this is the only driver accessing this 
     33 *      assumes this is a fullscreen device.
     34 *   -- No locking -- assumes this is the only driver accessing this
    3535 *      device.
    3636 *   -- Doesn't (yet) make use of any acceleration or other interfaces
    37  *      provided by fb.  Would be entirely happy working against any 
     37 *      provided by fb.  Would be entirely happy working against any
    3838 *      fullscreen interface.
    3939 *   -- HOWEVER: only a small number of pixelformats are supported, and
     
    125125
    126126   struct {
    127       __DRIcontextPrivate *context;     
    128       __DRIscreenPrivate *screen;       
     127      __DRIcontextPrivate *context;
     128      __DRIscreenPrivate *screen;
    129129      __DRIdrawablePrivate *drawable; /* drawable bound to this ctx */
    130130   } dri;
    131    
     131
    132132} fbContext, *fbContextPtr;
    133133
     
    421421 * This is the driver specific part of the createNewScreen entry point.
    422422 * Called when using legacy DRI.
    423  * 
     423 *
    424424 * return the __GLcontextModes supported by this driver
    425425 */
     
    437437             return NULL;
    438438          }
    439      
     439
    440440             driInitExtensions( NULL, card_extensions, GL_FALSE );
    441441
     
    476476      shareCtx = NULL;
    477477
    478    ctx = fbmesa->glCtx = _mesa_create_context(glVisual, shareCtx, 
     478   ctx = fbmesa->glCtx = _mesa_create_context(glVisual, shareCtx,
    479479                                              &functions, (void *) fbmesa);
    480480   if (!fbmesa->glCtx) {
     
    542542{
    543543   struct gl_framebuffer *mesa_framebuffer;
    544    
     544
    545545   if (isPixmap) {
    546546      return GL_FALSE; /* not implemented */
     
    551551      const GLboolean swAccum = mesaVis->accumRedBits > 0;
    552552      const GLboolean swStencil = mesaVis->stencilBits > 0;
    553      
     553
    554554      mesa_framebuffer = _mesa_create_framebuffer(mesaVis);
    555555      if (!mesa_framebuffer)
     
    590590                                   swAlpha, /* or always zero? */
    591591                                   GL_FALSE /* aux */);
    592      
     592
    593593      driDrawPriv->driverPrivate = mesa_framebuffer;
    594594
     
    620620      fbContextPtr fbmesa = (fbContextPtr) dPriv->driContextPriv->driverPrivate;
    621621      GLcontext *ctx = fbmesa->glCtx;
    622      
     622
    623623      if (ctx->Visual.doubleBufferMode) {
    624624         int i;
     
    638638            offset += currentPitch;
    639639         }
    640            
     640
    641641         _mesa_free(tmp);
    642642      }
     
    658658{
    659659   if ( driContextPriv ) {
    660       fbContextPtr newFbCtx = 
     660      fbContextPtr newFbCtx =
    661661            (fbContextPtr) driContextPriv->driverPrivate;
    662662
    663663      newFbCtx->dri.drawable = driDrawPriv;
    664664
    665       _mesa_make_current( newFbCtx->glCtx, 
     665      _mesa_make_current( newFbCtx->glCtx,
    666666                           driDrawPriv->driverPrivate,
    667667                           driReadPriv->driverPrivate);
  • trunk/src/VBox/Additions/common/crOpenGL/wgl.c

    • Property svn:keywords changed from Id to Id Revision
    r66826 r69310  
    4242static GLuint ComputeVisBits( HDC hdc )
    4343{
    44     PIXELFORMATDESCRIPTOR pfd; 
     44    PIXELFORMATDESCRIPTOR pfd;
    4545    int iPixelFormat;
    4646    GLuint b = 0;
     
    7777    stubInit();
    7878
    79     /* 
     79    /*
    8080     * NOTE!!!
    8181     * Here we're telling the renderspu not to use the GDI
     
    9797            PFD_SWAP_EXCHANGE         |
    9898            PFD_SWAP_COPY             |
    99             /* @todo: this is disabled due to VSG Open Inventor interop issues
     99            /** @todo this is disabled due to VSG Open Inventor interop issues
    100100             * it does not make any sense actually since reporting this
    101101             * as well as choosing a pixel format with this cap would not do anything
     
    144144        crError( "wglChoosePixelFormat; asked for too many depth bits\n" );
    145145    }
    146    
     146
    147147    if ( pfd->cDepthBits > 0 )
    148148        desiredVisual |= CR_DEPTH_BIT;
     
    241241    CR_DDI_PROLOGUE();
    242242
    243 /*  if ( pixelFormat != 1 ) { 
    244  *      crError( "wglDescribePixelFormat: pixelFormat=%d?\n", pixelFormat ); 
    245  *      return 0; 
     243/*  if ( pixelFormat != 1 ) {
     244 *      crError( "wglDescribePixelFormat: pixelFormat=%d?\n", pixelFormat );
     245 *      return 0;
    246246 *  } */
    247247
     
    605605    stubInit();
    606606
    607     /* TODO : Need to check pfAttributes too ! */
     607    /** @todo : Need to check pfAttributes too ! */
    608608
    609609    for ( pi = (int *)piAttributes; *pi != 0; pi++ )
     
    641641                if (pi[1] > 0)
    642642                {
    643                     /* @todo: this is disabled due to VSG Open Inventor interop issues
     643                    /** @todo this is disabled due to VSG Open Inventor interop issues
    644644                     * it does not make any sense actually since reporting this
    645645                     * as well as choosing a pixel format with this cap would not do anything
     
    676676                if (pi[1] > 0)
    677677                {
    678                     /* @todo: this is disabled due to VSG Open Inventor interop issues
     678                    /** @todo this is disabled due to VSG Open Inventor interop issues
    679679                     * it does not make any sense actually since reporting this
    680680                     * as well as choosing a pixel format with this cap would not do anything
     
    694694
    695695            case WGL_PIXEL_TYPE_ARB:
    696                 if(pi[1]!=WGL_TYPE_RGBA_ARB) 
     696                if(pi[1]!=WGL_TYPE_RGBA_ARB)
    697697                {
    698698                    crWarning("WGL_PIXEL_TYPE 0x%x not supported!", pi[1]);
     
    748748                break;
    749749            case WGL_STEREO_ARB:
    750                 /* @todo: this is disabled due to VSG Open Inventor interop issues
     750                /** @todo this is disabled due to VSG Open Inventor interop issues
    751751                 * it does not make any sense actually since reporting this
    752752                 * as well as choosing a pixel format with this cap would not do anything
     
    827827                break;
    828828            case WGL_SAMPLE_BUFFERS_EXT:
    829                 /* @todo: this is disabled due to VSG Open Inventor interop issues
     829                /** @todo this is disabled due to VSG Open Inventor interop issues
    830830                 * it does not make any sense actually since reporting this
    831831                 * as well as choosing a pixel format with this cap would not do anything
     
    834834                break;
    835835            case WGL_SAMPLES_EXT:
    836                 /* @todo: this is disabled due to VSG Open Inventor interop issues
     836                /** @todo this is disabled due to VSG Open Inventor interop issues
    837837                 * it does not make any sense actually since reporting this
    838838                 * as well as choosing a pixel format with this cap would not do anything
     
    883883                break;
    884884            case WGL_STEREO_ARB:
    885                 /* @todo: this is disabled due to VSG Open Inventor interop issues
     885                /** @todo this is disabled due to VSG Open Inventor interop issues
    886886                 * it does not make any sense actually since reporting this
    887887                 * as well as choosing a pixel format with this cap would not do anything
     
    962962                break;
    963963            case WGL_SAMPLE_BUFFERS_EXT:
    964                 /* @todo: this is disabled due to VSG Open Inventor interop issues
     964                /** @todo this is disabled due to VSG Open Inventor interop issues
    965965                 * it does not make any sense actually since reporting this
    966966                 * as well as choosing a pixel format with this cap would not do anything
     
    969969                break;
    970970            case WGL_SAMPLES_EXT:
    971                 /* @todo: this is disabled due to VSG Open Inventor interop issues
     971                /** @todo this is disabled due to VSG Open Inventor interop issues
    972972                 * it does not make any sense actually since reporting this
    973973                 * as well as choosing a pixel format with this cap would not do anything
  • trunk/src/VBox/Additions/common/crOpenGL/windows_exports.py

    • Property svn:keywords changed from Id to Id Revision
    r63942 r69310  
    9393
    9494
    95                
     95
    9696
    9797GenerateEntrypoints()
  • trunk/src/VBox/Additions/common/crOpenGL/windows_getprocaddress.py

    • Property svn:keywords changed from Id to Id Revision
    r63942 r69310  
    145145
    146146    if (!crStrcmp(name, "wglSwapIntervalEXT")) return (CR_PROC) wglSwapIntervalEXT;
    147    
     147
    148148    crDebug("Returning GetProcAddress:NULL for %s", name);
    149149    return NULL;
  • trunk/src/VBox/Additions/common/crOpenGL/windows_i386_exports.py

    • Property svn:keywords changed from Id to Id Revision
  • trunk/src/VBox/Additions/common/crOpenGL/xfont.c

    • Property svn:keywords set to Id Revision
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