- Timestamp:
- Oct 25, 2017 2:24:45 PM (7 years ago)
- 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
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/DD_glc.py
-
Property svn:keywords
set to
Id Revision
r63942 r69310 6 6 7 7 /* 8 * Copyright (C) 2009-2016 Oracle Corporation8 * Copyright (C) 2009-2016 """ """Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as -
Property svn:keywords
set to
-
trunk/src/VBox/Additions/common/crOpenGL/DD_glh.py
-
Property svn:keywords
set to
Id Revision
r63942 r69310 6 6 7 7 /* 8 * Copyright (C) 2009-2016 Oracle Corporation8 * Copyright (C) 2009-2016 """ """Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as -
Property svn:keywords
set to
-
trunk/src/VBox/Additions/common/crOpenGL/Darwin_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/FreeBSD_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/IRIX64_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/Linux_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/Linux_i386_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/Linux_i386_exports_dri.py
-
Property svn:keywords
set to
Id Revision
-
Property svn:keywords
set to
-
trunk/src/VBox/Additions/common/crOpenGL/Linux_i386_glxapi_exports.py
r63939 r69310 1 from __future__ import print_function 2 3 __copyright__ = \ 1 4 """ 2 5 Copyright (C) 2009-2016 Oracle Corporation … … 9 12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the 10 13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 11 """ 14 """; 12 15 13 from __future__ import print_function14 16 import sys 15 17 -
trunk/src/VBox/Additions/common/crOpenGL/NULLfuncs.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/OSF1_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/SunOS_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports_dri.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/SunOS_i386_glxapi_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/VBoxICDList.h
r62521 r69310 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VirtualBox Windows NT/2000/XP guest OpenGL ICD 4 * 4 */ 5 6 /* 5 7 * Copyright (C) 2006-2016 Oracle Corporation 6 8 * -
trunk/src/VBox/Additions/common/crOpenGL/alias_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu.c
-
Property svn:keywords
changed from
Id
toId Revision
r63205 r69310 479 479 #endif 480 480 //crDebug("arrayspu_DrawElements mode:0x%x, count:%d, type:0x%x", mode, count, type); 481 481 482 482 483 483 array_spu.self.Begin(mode); … … 664 664 } 665 665 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*/ 667 667 static void ARRAYSPU_APIENTRY arrayspu_UseProgram(GLuint program) 668 668 { … … 672 672 673 673 static void ARRAYSPU_APIENTRY 674 arrayspu_VertexAttribPointerARB(GLuint index, GLint size, GLenum type, 674 arrayspu_VertexAttribPointerARB(GLuint index, GLint size, GLenum type, 675 675 GLboolean normalized, GLsizei stride, 676 676 const GLvoid *pointer) … … 845 845 crStateMakeCurrent(array_spu.context[slot].clientState); 846 846 } 847 else 847 else 848 848 { 849 849 crStateMakeCurrent(NULL); -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu.def
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu_config.c
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu_init.c
-
Property svn:keywords
changed from
Id
toId Revision
r40431 r69310 45 45 46 46 crStateInit(); 47 /* @todo seems default context ain't needed at all*/47 /** @todo seems default context ain't needed at all*/ 48 48 array_spu.defaultctx = crStateCreateContext( NULL, 0, NULL ); 49 49 #ifdef CR_ARB_vertex_buffer_object … … 82 82 *options = arraySPUOptions; 83 83 *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO); 84 84 85 85 return 1; 86 86 } -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/context.c
-
Property svn:keywords
changed from
Id
toId Revision
r65787 r69310 6 6 7 7 /** 8 * \mainpage OpenGL_stub 8 * \mainpage OpenGL_stub 9 9 * 10 10 * \section OpenGL_stubIntroduction Introduction … … 75 75 */ 76 76 } 77 else 77 else 78 78 #endif 79 79 { … … 257 257 static unsigned char lastXError = Success; 258 258 259 static int 259 static int 260 260 errorHandler (Display *dpy, XErrorEvent *e) 261 261 { … … 281 281 #elif defined(GLX) 282 282 Display *dpy = stubGetWindowDisplay(win); 283 if (dpy) 283 if (dpy) 284 284 { 285 285 XWindowAttributes attr; … … 318 318 XSync(dpy, false); 319 319 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*/ 321 321 p = XCompositeNameWindowPixmap(dpy, win->drawable); 322 322 XSync(dpy, false); … … 752 752 float WidthRatio, HeightRatio; 753 753 static int DebugFlag = 0; 754 755 // apparently the "window" parameter passed to this 754 755 // apparently the "window" parameter passed to this 756 756 // function contains the native window information 757 757 HWND NATIVEhwnd = window->hWnd; … … 774 774 WidthRatio = (float)ChromiumWidth / (float)NativeWidth; 775 775 HeightRatio = (float)ChromiumHeight / (float)NativeHeight; 776 776 777 777 // output some debug information at the beginning 778 778 if(DebugFlag) … … 785 785 crDebug("Chromium Height = %i", ChromiumHeight); 786 786 } 787 788 if (NATIVEhwnd) 789 { 787 788 if (NATIVEhwnd) 789 { 790 790 GetClientRect( NATIVEhwnd, &rect ); 791 791 GetCursorPos (&point); 792 792 793 793 // make sure these coordinates are relative to the native window, 794 794 // not the whole desktop … … 799 799 pos[1] = (int)((NativeHeight - point.y) * HeightRatio); 800 800 } 801 else 801 else 802 802 { 803 803 pos[0] = 0; … … 866 866 dpy = stubGetWindowDisplay(window); 867 867 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. 869 869 // 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. 871 871 if (window && dpy) 872 872 { … … 878 878 || !window->drawable 879 879 || !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)) 881 881 { 882 882 crWarning("Failed to get windows geometry for %p, try xwininfo", window); … … 1021 1021 1022 1022 /* 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. 1024 1024 */ 1025 if (stub.minChromiumWindowWidth > 0 && 1025 if (stub.minChromiumWindowWidth > 0 && 1026 1026 stub.minChromiumWindowHeight > 0) { 1027 1027 stubGetWindowGeometry( window, &x, &y, &w, &h ); 1028 if (w >= stub.minChromiumWindowWidth && 1028 if (w >= stub.minChromiumWindowWidth && 1029 1029 h >= stub.minChromiumWindowHeight) { 1030 1030 1031 1031 /* Check for maximum sized window now too */ 1032 if (stub.maxChromiumWindowWidth && 1032 if (stub.maxChromiumWindowWidth && 1033 1033 stub.maxChromiumWindowHeight) { 1034 1034 if (w < stub.maxChromiumWindowWidth && 1035 1035 h < stub.maxChromiumWindowHeight) 1036 1036 return GL_TRUE; 1037 else 1037 else 1038 1038 return GL_FALSE; 1039 1039 } … … 1284 1284 ); 1285 1285 #endif 1286 if (context->currentDrawable && context->currentDrawable->type==CHROMIUM 1286 if (context->currentDrawable && context->currentDrawable->type==CHROMIUM 1287 1287 && context->currentDrawable->pOwner==context) 1288 1288 { … … 1304 1304 XUNLOCK(context->currentDrawable->dpy); 1305 1305 #endif 1306 1306 1307 1307 } 1308 1308 } -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/cr_gl.py
-
Property svn:keywords
changed from
Id
toId Revision
r63942 r69310 6 6 7 7 /* 8 * Copyright (C) 2008-2016 Oracle Corporation8 * Copyright (C) 2008-2016 """ """Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/defs.py
-
Property svn:keywords
changed from
Id
toId Revision
r63939 r69310 429 429 pass 430 430 431 for func_name in ( "wglChoosePixelFormat", 431 for func_name in ( "wglChoosePixelFormat", 432 432 "wglCopyContext", 433 433 "wglCreateContext", … … 452 452 "wglUseFontBitmapsW", 453 453 "wglUseFontOutlinesA", 454 "wglUseFontOutlinesW", 454 "wglUseFontOutlinesW", 455 455 "wglChoosePixelFormatEXT", 456 456 "wglGetPixelFormatAttribivEXT", -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/defs64.py
r63939 r69310 426 426 print("gl%s = cr_gl%s" % (func_name,func_name)) 427 427 428 for func_name in ( "wglChoosePixelFormat", 428 for func_name in ( "wglChoosePixelFormat", 429 429 "wglCopyContext", 430 430 "wglCreateContext", … … 449 449 "wglUseFontBitmapsW", 450 450 "wglUseFontOutlinesA", 451 "wglUseFontOutlinesW", 451 "wglUseFontOutlinesW", 452 452 "wglChoosePixelFormatEXT", 453 453 "wglGetPixelFormatAttribivEXT", -
trunk/src/VBox/Additions/common/crOpenGL/dri_drv.c
r62521 r69310 149 149 150 150 #if 0 /* See comment in vboxdriInitFuncs */ 151 static void 151 static void 152 152 vboxDDGetBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height) 153 153 { … … 223 223 { 224 224 } 225 225 226 226 static void 227 227 vboxDDTexImage3D(GLcontext *ctx, GLenum target, GLint level, … … 245 245 { 246 246 } 247 247 248 248 static void 249 249 vboxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, … … 258 258 } 259 259 260 260 261 261 static void 262 262 vboxDDTexSubImage3D(GLcontext *ctx, GLenum target, GLint level, … … 317 317 } 318 318 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? */ 320 320 static void 321 321 vboxDDEnable(GLcontext *ctx, GLenum cap, GLboolean state) 322 322 { 323 if (state) 323 if (state) 324 324 cr_glEnable(cap); 325 else 325 else 326 326 cr_glDisable(cap); 327 327 } … … 340 340 } 341 341 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 343 343 *to return if we succeeded to get value or not, but it will add 2 sync calls and 344 344 *will reset glGetError value returned in case application calls it explicitly 345 345 */ 346 static GLboolean 346 static GLboolean 347 347 vboxDDGetBooleanv(GLcontext *ctx, GLenum pname, GLboolean *result) 348 348 { … … 351 351 } 352 352 353 static GLboolean 353 static GLboolean 354 354 vboxDDGetDoublev(GLcontext *ctx, GLenum pname, GLdouble *result) 355 355 { … … 358 358 } 359 359 360 static GLboolean 360 static GLboolean 361 361 vboxDDGetFloatv(GLcontext *ctx, GLenum pname, GLfloat *result) 362 362 { … … 365 365 } 366 366 367 static GLboolean 367 static GLboolean 368 368 vboxDDGetIntegerv(GLcontext *ctx, GLenum pname, GLint *result) 369 369 { … … 372 372 } 373 373 374 static GLboolean 374 static GLboolean 375 375 vboxDDGetPointerv(GLcontext *ctx, GLenum pname, GLvoid **result) 376 376 { … … 379 379 } 380 380 381 /** @todo 381 /** @todo 382 382 * change stub's createcontext to reuse driver private part of mesa's ctx to store stub ctx info. 383 383 */ … … 528 528 driver->GetPointerv = vboxDDGetPointerv; 529 529 530 /** @todo */ 530 /** @todo */ 531 531 #if FEATURE_ARB_vertex_buffer_object 532 532 // driver->NewBufferObject = _mesa_new_buffer_object; … … 777 777 * This is the driver specific part of the createNewScreen entry point. 778 778 * Called when using legacy DRI. 779 * 779 * 780 780 * return the __GLcontextModes supported by this driver 781 781 */ … … 876 876 if (sharedContextPrivate) 877 877 shareCtx = ((tdfxContextPtr) sharedContextPrivate)->glCtx; 878 else 878 else 879 879 shareCtx = NULL; 880 880 /** @todo save ctx, or be more confident that we can don't need to. */ … … 891 891 * properties. */ 892 892 893 /* Set various context configuration. We take these values from the 893 /* Set various context configuration. We take these values from the 894 894 * TDFX driver. */ 895 895 /** @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 53 53 54 54 /*Common glX functions*/ 55 extern DECLEXPORT(void) VBOXGLXTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, 55 extern DECLEXPORT(void) VBOXGLXTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, 56 56 #if defined(SunOS) 57 57 unsigned long mask); -
trunk/src/VBox/Additions/common/crOpenGL/dri_util.c
r64525 r69310 8 8 * useful stuff is done here that otherwise would have to be duplicated in most 9 9 * drivers. 10 * 10 * 11 11 * Basically, these utility functions take care of some of the dirty details of 12 12 * screen initialization, context creation, context binding, DRM setup, etc. … … 48 48 /** 49 49 * Print message to \c stderr if the \c LIBGL_DEBUG environment variable 50 * is set. 51 * 50 * is set. 51 * 52 52 * Is called from the drivers. 53 * 53 * 54 54 * \param f \c printf like format string. 55 55 */ … … 88 88 /** 89 89 * Unbind context. 90 * 90 * 91 91 * \param scrn the screen. 92 92 * \param gc context. 93 93 * 94 94 * \return \c GL_TRUE on success, or \c GL_FALSE on failure. 95 * 95 * 96 96 * \internal 97 97 * This function calls __DriverAPIRec::UnbindContext, and then decrements 98 98 * __DRIdrawablePrivateRec::refcount which must be non-zero for a successful 99 99 * return. 100 * 100 * 101 101 * 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. 103 103 */ 104 104 static int driUnbindContext(__DRIcontext *pcp) … … 197 197 DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); 198 198 } 199 199 200 200 if ((pdp != prp) && (!prp->pStamp || *prp->pStamp != prp->lastStamp)) { 201 201 DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); … … 223 223 * 224 224 * \param pdp pointer to the private drawable information to update. 225 * 225 * 226 226 * This function basically updates the __DRIdrawablePrivate struct's 227 227 * cliprect information by calling \c __DRIinterfaceMethods::getDrawableInfo. … … 236 236 __DRIscreenPrivate *psp = pdp->driScreenPriv; 237 237 __DRIcontextPrivate *pcp = pdp->driContextPriv; 238 239 if (!pcp 238 239 if (!pcp 240 240 || ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) { 241 /* ERROR!!! 241 /* ERROR!!! 242 242 * ...but we must ignore it. There can be many contexts bound to a 243 243 * drawable. … … 246 246 247 247 if (pdp->pClipRects) { 248 _mesa_free(pdp->pClipRects); 248 _mesa_free(pdp->pClipRects); 249 249 pdp->pClipRects = NULL; 250 250 } 251 251 252 252 if (pdp->pBackClipRects) { 253 _mesa_free(pdp->pBackClipRects); 253 _mesa_free(pdp->pBackClipRects); 254 254 pdp->pBackClipRects = NULL; 255 255 } … … 330 330 case DRI2_EVENT_BUFFER_ATTACH: 331 331 ba = (__DRIBufferAttachEvent *) p; 332 if (ba->drawable == pdp->dri2.drawable_id && 332 if (ba->drawable == pdp->dri2.drawable_id && 333 333 ba->buffer.attachment == DRI_DRAWABLE_BUFFER_FRONT_LEFT) 334 334 last_ba = ba; … … 336 336 } 337 337 } 338 338 339 339 if (last_dc) { 340 340 if (pdp->w != last_dc->width || pdp->h != last_dc->height) … … 449 449 * 450 450 * \param drawablePrivate opaque pointer to the per-drawable private info. 451 * 451 * 452 452 * \internal 453 453 * This function calls __DRIdrawablePrivate::swapBuffers. 454 * 454 * 455 455 * Is called directly from glXSwapBuffers(). 456 456 */ … … 595 595 /* This special default value is replaced with the configured 596 596 * default value when the drawable is first bound to a direct 597 * rendering context. 597 * rendering context. 598 598 */ 599 599 pdp->swap_interval = (unsigned)-1; … … 651 651 /** 652 652 * Destroy the per-context private information. 653 * 653 * 654 654 * \internal 655 655 * This function calls __DriverAPIRec::DestroyContext on \p contextPrivate, calls … … 668 668 /** 669 669 * Create the per-drawable private driver information. 670 * 670 * 671 671 * \param render_type Type of rendering target. \c GLX_RGBA is the only 672 672 * type likely to ever be supported for direct-rendering. … … 675 675 * \returns An opaque pointer to the per-context private information on 676 676 * success, or \c NULL on failure. 677 * 677 * 678 678 * \internal 679 679 * This function allocates and fills a __DRIcontextPrivateRec structure. It … … 685 685 static __DRIcontext * 686 686 driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config, 687 int render_type, __DRIcontext *shared, 687 int render_type, __DRIcontext *shared, 688 688 drm_context_t hwContext, void *data) 689 689 { … … 756 756 /** 757 757 * Destroy the per-screen private information. 758 * 758 * 759 759 * \internal 760 760 * This function calls __DriverAPIRec::DestroyScreen on \p screenPrivate, calls … … 813 813 * 814 814 * For legacy DRI. 815 * 815 * 816 816 * \param scrn Index of the screen 817 817 * \param ddx_version Version of the 2D DDX. This may not be meaningful for … … 826 826 * \param driver_modes Returns modes supported by the driver 827 827 * \param loaderPrivate ?? 828 * 828 * 829 829 * \note There is no need to check the minimum API version in this 830 830 * function. Since the name of this function is versioned, it is … … 837 837 const __DRIversion *drm_version, 838 838 const __DRIframebuffer *frame_buffer, 839 drmAddress pSAREA, int fd, 839 drmAddress pSAREA, int fd, 840 840 const __DRIextension **extensions, 841 841 const __DRIconfig ***driver_modes, … … 1049 1049 { __DRI_FRAME_TRACKING, __DRI_FRAME_TRACKING_VERSION }, 1050 1050 driFrameTracking, 1051 driQueryFrameTracking 1051 driQueryFrameTracking 1052 1052 }; 1053 1053 1054 1054 /** 1055 1055 * Calculate amount of swap interval used between GLX buffer swaps. 1056 * 1056 * 1057 1057 * The usage value, on the range [0,max], is the fraction of total swap 1058 1058 * interval time used between GLX buffer swaps is calculated. 1059 1059 * 1060 1060 * \f$p = t_d / (i * t_r)\f$ 1061 * 1061 * 1062 1062 * Where \f$t_d\f$ is the time since the last GLX buffer swap, \f$i\f$ is the 1063 1063 * swap interval (as set by \c glXSwapIntervalSGI), and \f$t_r\f$ time 1064 1064 * required for a single vertical refresh period (as returned by \c 1065 1065 * glXGetMscRateOML). 1066 * 1066 * 1067 1067 * See the documentation for the GLX_MESA_swap_frame_usage extension for more 1068 1068 * details. … … 1076 1076 * 1077 1077 * \sa glXSwapIntervalSGI glXGetMscRateOML 1078 * 1078 * 1079 1079 * \todo Instead of caching the \c glXGetMscRateOML function pointer, would it 1080 1080 * be possible to cache the sync rate? … … 1111 1111 usage /= 1000000.0; 1112 1112 } 1113 1113 1114 1114 return usage; 1115 1115 } -
trunk/src/VBox/Additions/common/crOpenGL/egl.c
r67637 r69310 17 17 */ 18 18 19 /******************************************************************************* 20 * Header Files * 21 *******************************************************************************/ 19 20 /********************************************************************************************************************************* 21 * Header Files * 22 *********************************************************************************************************************************/ 22 23 #include <iprt/cdefs.h> 23 24 #include <iprt/types.h> … … 36 37 if (!(expr)) { printf("Assertion failed: %s\n", #expr); exit(1); } 37 38 38 /******************************************************************************* 39 * Structures and Typedefs * 40 *******************************************************************************/ 39 40 /********************************************************************************************************************************* 41 * Structures and Typedefs * 42 *********************************************************************************************************************************/ 41 43 42 44 struct VBEGLTLS … … 56 58 }; 57 59 58 /******************************************************************************* 59 * Defined Constants And Macros * 60 *******************************************************************************/ 60 61 /********************************************************************************************************************************* 62 * Defined Constants And Macros * 63 *********************************************************************************************************************************/ 61 64 /** @note IDs returned for surfaces should always be lower than these constants. 62 65 */ … … 72 75 #define VBEGL_ANY_SURFACE (VBEGL_WINDOW_SURFACE | VBEGL_PBUFFER_SURFACE | VBEGL_PIXMAP_SURFACE) 73 76 74 /******************************************************************************* 75 * Global variables * 76 *******************************************************************************/ 77 78 /********************************************************************************************************************************* 79 * Global variables * 80 *********************************************************************************************************************************/ 77 81 78 82 static pthread_key_t g_tls; -
trunk/src/VBox/Additions/common/crOpenGL/entrypoints.py
-
Property svn:keywords
changed from
Id
toId Revision
r63942 r69310 179 179 print("") 180 180 181 -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
r62521 r69310 1 1 /* $Id$ */ 2 3 2 /** @file 4 3 * VBox OpenGL DRI driver functions … … 41 40 /** X server message type definitions. */ 42 41 typedef enum { 43 X_PROBED, 44 X_CONFIG, 45 X_DEFAULT, 46 X_CMDLINE, 47 X_NOTICE, 48 X_ERROR, 49 X_WARNING, 50 X_INFO, 51 X_NONE, 52 X_NOT_IMPLEMENTED, 53 X_UNKNOWN = -1 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 */ 54 53 } MessageType; 55 54 … … 58 57 //#define DEBUG_DRI_CALLS 59 58 60 // @todo this could be different...59 /// @todo this could be different... 61 60 #ifdef RT_ARCH_AMD64 62 61 # ifdef RT_OS_FREEBSD … … 219 218 crMemcpy(pDst, pSrc, size); 220 219 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...*/ 222 221 rv = RTMemProtect(alPatch, pDst-alPatch+size, RTMEM_PROT_READ|RTMEM_PROT_EXEC); 223 222 if (RT_FAILURE(rv)) … … 232 231 /* Provide basic dladdr1 flags */ 233 232 enum { 234 RTLD_DL_SYMENT= 1233 RTLD_DL_SYMENT = 1 235 234 }; 236 235 … … 239 238 dladdr1(const void *address, Dl_info *dlip, void **info, int flags) 240 239 { 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 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 */ 303 302 err_exit: 304 305 306 303 if (elf != NULL) elf_end(elf); 304 if (fd >= 0) close(fd); 305 return 0; 307 306 } 308 307 #endif … … 373 372 /* Try to insert 5 bytes jmp/jmpq to our stub code */ 374 373 375 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.*/ 378 377 if (!crStrcmp(psFuncName, "glXDestroyContext") || !crStrcmp(psFuncName, "glXFreeContextEXT")) 379 378 { … … 392 391 else if (!crStrcmp(psFuncName, "glXCreateGLXPixmapMESA")) 393 392 { 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*/ 395 394 return; 396 395 } … … 440 439 pNode->pDstEnd = dlip.dli_saddr+sym->st_size; 441 440 pNode->pSrcStart = pStart; 442 pNode->pSrcEnd = pEnd; 441 pNode->pSrcEnd = pEnd; 443 442 pNode->pNext = g_pRepatchList; 444 443 g_pRepatchList = pNode; … … 470 469 pNode->psFuncName = psFuncName; 471 470 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; 473 472 pNode->pSrcStart = dlip.dli_saddr; 474 473 pNode->pSrcEnd = NULL; … … 523 522 crMemcpy(&patch[1], &offset, 4); 524 523 # 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, 526 525 pFreeNode->pDstStart-pFreeNode->pSrcStart); 527 526 # endif … … 604 603 605 604 handle = NULL; 606 for (p = libPaths; *p; p = next) 605 for (p = libPaths; *p; p = next) 607 606 { 608 607 next = strchr(p, ':'); 609 if (next == NULL) 608 if (next == NULL) 610 609 { 611 610 len = strlen(p); 612 611 next = p + len; 613 } 614 else 612 } 613 else 615 614 { 616 615 len = next - p; … … 635 634 crDebug("loaded %s", realDriverName); 636 635 637 for (i = 0; gppSwDriExternsion[i]; i++) 636 for (i = 0; gppSwDriExternsion[i]; i++) 638 637 { 639 638 if (strcmp(gppSwDriExternsion[i]->name, __DRI_CORE) == 0) … … 716 715 } 717 716 718 static void 717 static void 719 718 vboxdriDestroyScreen(__DRIscreen *screen) 720 719 { … … 755 754 } 756 755 757 static void 756 static void 758 757 vboxdriDestroyDrawable(__DRIdrawable *drawable) 759 758 { … … 776 775 } 777 776 778 static int 777 static int 779 778 vboxdriCopyContext(__DRIcontext *dest, 780 779 __DRIcontext *src, … … 784 783 } 785 784 786 static void 785 static void 787 786 vboxdriDestroyContext(__DRIcontext *context) 788 787 { … … 790 789 } 791 790 792 static int 791 static int 793 792 vboxdriBindContext(__DRIcontext *ctx, 794 793 __DRIdrawable *pdraw, … … 798 797 } 799 798 800 static int 799 static int 801 800 vboxdriUnbindContext(__DRIcontext *ctx) 802 801 { … … 812 811 const __DRIversion *drm_version, 813 812 const __DRIframebuffer *frame_buffer, 814 drmAddress pSAREA, int fd, 813 drmAddress pSAREA, int fd, 815 814 const __DRIextension **extensions, 816 815 const __DRIconfig ***driver_modes, … … 839 838 static __DRIcontext * 840 839 vboxdriCreateNewContext_Legacy(__DRIscreen *psp, const __DRIconfig *config, 841 int render_type, __DRIcontext *shared, 840 int render_type, __DRIcontext *shared, 842 841 drm_context_t hwContext, void *data) 843 842 { -
trunk/src/VBox/Additions/common/crOpenGL/fakedri_drv.h
r62521 r69310 1 1 /* $Id$ */ 2 3 2 /** @file 4 *5 3 * VirtualBox guest OpenGL DRI header 6 4 */ … … 119 117 #endif 120 118 121 #endif /* ___CROPENGL_FAKEDRIDRV_H */119 #endif /* !___CROPENGL_FAKEDRIDRV_H */ 122 120 -
trunk/src/VBox/Additions/common/crOpenGL/fakedri_glfuncsList.h
r62521 r69310 1 1 /* $Id$ */ 2 3 2 /** @file 4 3 * VBox OpenGL list of opengl functions common in Mesa and vbox opengl stub -
trunk/src/VBox/Additions/common/crOpenGL/fakedri_glxfuncsList.h
r62521 r69310 1 1 /* $Id$ */ 2 3 2 /** @file 4 3 * 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 29 29 30 30 31 /* @todo Multithreading case. (See feedback_spu.self.RenderMode)*/31 /** @todo Multithreading case. (See feedback_spu.self.RenderMode)*/ 32 32 33 33 GLint FEEDBACKSPU_APIENTRY … … 94 94 } 95 95 } 96 else 96 else 97 97 { 98 98 crStateMakeCurrent(NULL); -
trunk/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_init.c
r40431 r69310 82 82 *options = feedbackSPUOptions; 83 83 *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO); 84 84 85 85 return 1; 86 86 } -
trunk/src/VBox/Additions/common/crOpenGL/getprocaddress.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
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$ */ 3 2 /** @file 4 3 * VBox OpenGL GLX implementation … … 40 39 #define CR_MAX_DAMAGE_REGIONS_TRACKED 50 41 40 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 43 42 * but doesn't increase updated area more than given number 44 43 */ 45 44 #define CR_MIN_DAMAGE_PROFIT_SIZE 64*64 46 45 47 /* @todo combine it in some other place*/46 /** @todo combine it in some other place*/ 48 47 /* Size of pack spu buffer - some delta for commands packing, see pack/packspu_config.c*/ 49 48 … … 218 217 pret = XGetVisualInfo(dpy, VisualIDMask, &searchvis, &nvisuals); 219 218 XUNLOCK(dpy); 220 219 221 220 if (nvisuals!=1) crWarning("glXChooseVisual: XGetVisualInfo returned %i visuals for %x", nvisuals, (unsigned int) searchvis.visualid); 222 221 if (pret) … … 232 231 ** There is a problem with glXCopyContext. 233 232 ** IRIX and Mesa both define glXCopyContext 234 ** to have the mask argument being a 233 ** to have the mask argument being a 235 234 ** GLuint. XFree 4 and oss.sgi.com 236 235 ** define it to be an unsigned long. … … 240 239 */ 241 240 DECLEXPORT(void) 242 VBOXGLXTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, 241 VBOXGLXTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, 243 242 #if defined(AIX) || defined(PLAYSTATION2) 244 243 GLuint mask … … 377 376 if (pGlxPixmap) 378 377 { 379 /* @todo*/378 /** @todo */ 380 379 crWarning("Unimplemented glxMakeCurrent call with GLXPixmap passed, unexpected things might happen."); 381 380 } … … 523 522 #if defined(SunOS) || 1 524 523 /* 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. 526 525 No idea why this gets called under SunOS but we simply ignore it 527 526 -- jw … … 530 529 crWarning ("Ignoring Unsupported GLX Call: glxGetConfig with attrib 0x%x", attrib); 531 530 break; 532 #endif 531 #endif 533 532 534 533 case GLX_TRANSPARENT_TYPE: … … 679 678 680 679 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*/ 682 681 retval = glXQueryExtensionsString(dpy, name); 683 682 break; … … 730 729 #if GLX_EXTRAS 731 730 732 DECLEXPORT(GLXPbufferSGIX) 731 DECLEXPORT(GLXPbufferSGIX) 733 732 VBOXGLXTAG(glXCreateGLXPbufferSGIX)(Display *dpy, GLXFBConfigSGIX config, 734 733 unsigned int width, unsigned int height, … … 782 781 } 783 782 784 DECLEXPORT(GLXFBConfigSGIX *) 783 DECLEXPORT(GLXFBConfigSGIX *) 785 784 VBOXGLXTAG(glXChooseFBConfigSGIX)(Display *dpy, int screen, 786 785 int *attrib_list, int *nelements) … … 789 788 } 790 789 791 DECLEXPORT(GLXPixmap) 790 DECLEXPORT(GLXPixmap) 792 791 VBOXGLXTAG(glXCreateGLXPixmapWithConfigSGIX)(Display *dpy, 793 792 GLXFBConfig config, … … 797 796 } 798 797 799 DECLEXPORT(GLXContext) 798 DECLEXPORT(GLXContext) 800 799 VBOXGLXTAG(glXCreateContextWithConfigSGIX)(Display *dpy, GLXFBConfig config, 801 800 int render_type, … … 812 811 } 813 812 814 DECLEXPORT(XVisualInfo *) 813 DECLEXPORT(XVisualInfo *) 815 814 VBOXGLXTAG(glXGetVisualFromFBConfigSGIX)(Display *dpy, 816 815 GLXFBConfig config) … … 969 968 } 970 969 971 DECLEXPORT(GLXContext) 970 DECLEXPORT(GLXContext) 972 971 VBOXGLXTAG(glXCreateNewContext)(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct) 973 972 { … … 987 986 } 988 987 989 DECLEXPORT(GLXPbuffer) 988 DECLEXPORT(GLXPbuffer) 990 989 VBOXGLXTAG(glXCreatePbuffer)(Display *dpy, GLXFBConfig config, ATTRIB_TYPE *attrib_list) 991 990 { … … 1000 999 * Instead we'd do necessary initialization on first use of those pixmaps. 1001 1000 */ 1002 DECLEXPORT(GLXPixmap) 1001 DECLEXPORT(GLXPixmap) 1003 1002 VBOXGLXTAG(glXCreatePixmap)(Display *dpy, GLXFBConfig config, Pixmap pixmap, ATTRIB_TYPE *attrib_list) 1004 1003 { … … 1085 1084 } 1086 1085 1087 DECLEXPORT(GLXWindow) 1086 DECLEXPORT(GLXWindow) 1088 1087 VBOXGLXTAG(glXCreateWindow)(Display *dpy, GLXFBConfig config, Window win, ATTRIB_TYPE *attrib_list) 1089 1088 { … … 1294 1293 break; 1295 1294 default: 1296 crDebug("glXGetFBConfigAttrib: unknown attribute=0x%x", attribute); 1295 crDebug("glXGetFBConfigAttrib: unknown attribute=0x%x", attribute); 1297 1296 return GLX_BAD_ATTRIBUTE; 1298 1297 } … … 1440 1439 crInfo("Using XSHM for GLX_EXT_texture_from_pixmap"); 1441 1440 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*/ 1443 1442 1444 1443 /* Ramshankar: Solaris compiz fix */ … … 1453 1452 1454 1453 CRASSERT(pContext); 1455 1454 1456 1455 if (pContext->damageQueryFailed) 1457 1456 return; … … 1479 1478 int nReturnRects; 1480 1479 1481 /* Get the damage region as a server region */ 1480 /* Get the damage region as a server region */ 1482 1481 XserverRegion serverDamageRegion = XFixesCreateRegion (dpy, NULL, 0); 1483 1482 … … 1610 1609 pGlxPixmap->gc = XCreateGC(dpy, (Pixmap)draw, GCGraphicsExposures|GCSubwindowMode, &xgcv); 1611 1610 1612 pGlxPixmap->hShmPixmap = XShmCreatePixmap(dpy, pGlxPixmap->root, stub.xshmSI.shmaddr, &stub.xshmSI, 1611 pGlxPixmap->hShmPixmap = XShmCreatePixmap(dpy, pGlxPixmap->root, stub.xshmSI.shmaddr, &stub.xshmSI, 1613 1612 pGlxPixmap->w, pGlxPixmap->h, pGlxPixmap->depth); 1614 1613 } … … 1641 1640 } 1642 1641 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. 1644 1643 * It's fine for small textures which would be updated in stubXshmUpdateWholeImage, but we'd never call glTexImage2D for big ones. 1645 1644 * Note that we're making empty texture by passing NULL as pixels pointer, so there's no overhead transferring data to host.*/ 1646 1645 if (CR_MAX_TRANSFER_SIZE < 4*pGlxPixmap->w*pGlxPixmap->h) 1647 1646 { 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, 1649 1648 GL_BGRA, GL_UNSIGNED_BYTE, NULL); 1650 1649 } … … 1660 1659 /* To limit the size of transferring buffer, split bigger texture into regions 1661 1660 * 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. 1663 1662 * This also workarounds guest driver failures when sending 6+mb texture buffers on linux. 1664 1663 */ … … 1691 1690 1692 1691 XLOCK(dpy); 1693 XCopyArea(dpy, (Pixmap)draw, pGlxPixmap->hShmPixmap, pGlxPixmap->gc, 1692 XCopyArea(dpy, (Pixmap)draw, pGlxPixmap->hShmPixmap, pGlxPixmap->gc, 1694 1693 pGlxPixmap->x, pGlxPixmap->y, pGlxPixmap->w, pGlxPixmap->h, 0, 0); 1695 1694 /* Have to make sure XCopyArea is processed */ 1696 1695 XSync(dpy, False); 1697 1696 XUNLOCK(dpy); 1698 1697 1699 1698 stubGetUnpackState(&unpackState); 1700 1699 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, 1702 1701 GL_BGRA, GL_UNSIGNED_BYTE, stub.xshmSI.shmaddr); 1703 1702 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, 1706 1705 pGlxPixmap->x, pGlxPixmap->y, pGlxPixmap->w, pGlxPixmap->h);*/ 1707 1706 } … … 1739 1738 1740 1739 XLOCK(dpy); 1741 XCopyArea(dpy, (Pixmap)draw, pGlxPixmap->hShmPixmap, pGlxPixmap->gc, 1740 XCopyArea(dpy, (Pixmap)draw, pGlxPixmap->hShmPixmap, pGlxPixmap->gc, 1742 1741 pRect->x, pRect->y, pRect->width, pRect->height, 0, 0); 1743 1742 /* Have to make sure XCopyArea is processed */ … … 1751 1750 stub.spu->dispatch_table.PixelStorei(GL_UNPACK_ROW_LENGTH, pGlxPixmap->w); 1752 1751 } 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, 1754 1753 GL_BGRA, GL_UNSIGNED_BYTE, stub.xshmSI.shmaddr); 1755 1754 stubSetUnpackState(&unpackState); 1756 1755 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, 1759 1758 pRect->x, pRect->y, pRect->width, pRect->height);*/ 1760 1759 } … … 1769 1768 ContextInfo *context = stubGetCurrentContext(); 1770 1769 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 1772 1771 * so have to walk glxpixmaps hashtable to find if we have damage event handle assigned to some pixmap 1773 1772 */ … … 1782 1781 #endif 1783 1782 1784 /* @todo check what error codes could we throw for failures here*/1783 /** @todo check what error codes could we throw for failures here*/ 1785 1784 DECLEXPORT(void) VBOXGLXTAG(glXBindTexImageEXT)(Display *dpy, GLXDrawable draw, int buffer, const int *attrib_list) 1786 1785 { … … 1826 1825 if (stub.xshmSI.shmid<0) 1827 1826 { 1828 /* @todo add damage support here too*/1827 /** @todo add damage support here too*/ 1829 1828 XImage *pxim; 1830 1829 CRPixelPackState unpackState; … … 1860 1859 stubGetUnpackState(&unpackState); 1861 1860 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, 1863 1862 GL_BGRA, GL_UNSIGNED_BYTE, (void*)(&(pxim->data[0]))); 1864 1863 stubSetUnpackState(&unpackState); … … 1900 1899 { 1901 1900 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", 1903 1902 (unsigned int)draw, pGlxPixmap->pDamageRegion->numRects, fullArea, clipdamageArea, damageArea);*/ 1904 1903 stubXshmUpdateWholeImage(dpy, draw, pGlxPixmap); … … 1908 1907 if (CR_MIN_DAMAGE_PROFIT_SIZE > (fullArea-damageArea)) 1909 1908 { 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", 1911 1910 (unsigned int)draw, pGlxPixmap->pDamageRegion->numRects, fullArea, clipdamageArea, damageArea);*/ 1912 1911 stubXshmUpdateWholeImage(dpy, draw, pGlxPixmap); … … 1914 1913 else if (CR_MIN_DAMAGE_PROFIT_SIZE > (clipdamageArea-damageArea)) 1915 1914 { 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", 1917 1916 (unsigned int)draw, pGlxPixmap->pDamageRegion->numRects, fullArea, clipdamageArea, damageArea);*/ 1918 1917 stubXshmUpdateImageRect(dpy, draw, pGlxPixmap, &damageClipBox); … … 1920 1919 else 1921 1920 { 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", 1923 1922 (unsigned int)draw, pGlxPixmap->pDamageRegion->numRects, fullArea, clipdamageArea, damageArea);*/ 1924 1923 for (i=0; i<pGlxPixmap->pDamageRegion->numRects; ++i) … … 1926 1925 XRectangle rect; 1927 1926 BoxPtr pBox = &pGlxPixmap->pDamageRegion->rects[i]; 1928 1927 1929 1928 rect.x = pBox->x1; 1930 1929 rect.y = pBox->y1; -
Property svn:keywords
set to
-
trunk/src/VBox/Additions/common/crOpenGL/glx_c_exports.c
-
Property svn:keywords
changed from
Id
toId Revision
r62521 r69310 1 1 /* $Id$ */ 2 2 /** @file 3 *4 3 * VirtualBox guest OpenGL DRI GLX C stubs 5 4 */ -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/glx_proto.h
r62521 r69310 1 1 /* $Id$ */ 2 2 /** @file 3 *4 3 * VirtualBox guest OpenGL DRI GLX header C prototypes 5 4 */ -
trunk/src/VBox/Additions/common/crOpenGL/icd_drv.c
-
Property svn:keywords
changed from
Id
toId Revision
r66826 r69310 29 29 #include <iprt/win/windows.h> 30 30 31 // TODO:consider31 /// @todo consider 32 32 /* We can modify chronium dispatch table functions order to match the one required by ICD, 33 33 * but it'd render us incompatible with other chromium SPUs and require more changes. … … 65 65 static GLuint ComputeVisBits( HDC hdc ) 66 66 { 67 PIXELFORMATDESCRIPTOR pfd; 67 PIXELFORMATDESCRIPTOR pfd; 68 68 int iPixelFormat; 69 69 GLuint b = 0; … … 107 107 } 108 108 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); 110 110 return FALSE; 111 111 } … … 203 203 return NULL; 204 204 } 205 205 206 206 } 207 207 … … 392 392 CR_DDI_PROLOGUE(); 393 393 /*crDebug( "DrvSwapBuffers(0x%x) called", hdc );*/ 394 window = stubGetWindowInfo(hdc); 394 window = stubGetWindowInfo(hdc); 395 395 stubSwapBuffers( window, 0 ); 396 396 return 1; -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/load.c
-
Property svn:keywords
changed from
Id
toId Revision
r68890 r69310 106 106 107 107 #ifdef WINDOWS 108 /* @todo install hook and track for WM_DISPLAYCHANGE */108 /** @todo install hook and track for WM_DISPLAYCHANGE */ 109 109 { 110 110 DEVMODE devMode; … … 952 952 953 953 #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 thread954 /** @todo when vm boots with compiz turned on, new code causes hang in xcb_wait_for_reply in the sync thread 955 955 * as at the start compiz runs our code under XGrabServer. 956 956 */ … … 962 962 #endif 963 963 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 */ 965 965 app_id = crGetenv( "CR_APPLICATION_ID_NUMBER" ); 966 966 … … 1021 1021 crDebug("running with %s", VBOX_MODNAME_DISPD3D); 1022 1022 stub.trackWindowVisibleRgn = 0; 1023 /* @todo:should we enable that? */1023 /** @todo should we enable that? */ 1024 1024 stub.trackWindowSize = 0; 1025 1025 stub.trackWindowPos = 0; … … 1479 1479 } 1480 1480 1481 1481 1482 1482 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 1483 1483 VBoxCrHgsmiTerm(); -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/pack.def
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/pack.py
-
Property svn:keywords
changed from
Id
toId Revision
r63942 r69310 39 39 for func_name in keys: 40 40 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 43 43 apiutil.FindSpecial( "packspu_vertex", func_name )): 44 44 pack_specials.append( func_name ) -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_bufferobject.c
-
Property svn:keywords
changed from
Id
toId Revision
r45008 r69310 39 39 CRASSERT(pBufObj); 40 40 41 if (pBufObj->bResyncOnRead && 41 if (pBufObj->bResyncOnRead && 42 42 access != GL_WRITE_ONLY_ARB) 43 43 { … … 66 66 } 67 67 #endif 68 68 69 69 crStateGetBufferSubDataARB(target, offset, size, data); 70 70 } -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c
-
Property svn:keywords
changed from
Id
toId Revision
r63205 r69310 340 340 packspu_ArrayElement( GLint index ) 341 341 { 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*/ 343 343 #if 1 344 344 GLboolean serverArrays = GL_FALSE; … … 857 857 GLboolean res = crStateIsEnabled(cap); 858 858 #ifdef DEBUG 859 { 859 { 860 860 GET_THREAD(thread); 861 861 int writeback = 1; … … 893 893 */ 894 894 /*crPackLockArraysEXT(first, count);*/ 895 } 895 } 896 896 else crDebug("Ignoring packspu_LockArraysEXT: first:%i, count:%i", first, count); 897 897 } -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_config.c
-
Property svn:keywords
changed from
Id
toId Revision
r63205 r69310 37 37 38 38 39 /* No SPU options yet. Well.. not really.. 39 /* No SPU options yet. Well.. not really.. 40 40 */ 41 41 SPUOptions packSPUOptions[] = { 42 { "emit_GATHER_POST_SWAPBUFFERS", CR_BOOL, 1, "0", NULL, NULL, 42 { "emit_GATHER_POST_SWAPBUFFERS", CR_BOOL, 1, "0", NULL, NULL, 43 43 "Emit a parameter after SwapBuffers", (SPUOptionCB)set_emit }, 44 44 -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c
-
Property svn:keywords
changed from
Id
toId Revision
r63205 r69310 375 375 * server could be aware of how each other were numbering things in 376 376 * cases like file networking where they actually 377 * care. 377 * care. 378 378 * 379 * -Humper 379 * -Humper 380 380 * 381 381 */ -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_flush.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_framebuffer.c
r62521 r69310 46 46 packspu_BindFramebufferEXT(GLenum target, GLuint framebuffer) 47 47 { 48 48 crStateBindFramebufferEXT(target, framebuffer); 49 49 crPackBindFramebufferEXT(target, framebuffer); 50 50 } … … 53 53 packspu_DeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers) 54 54 { 55 55 crStateDeleteFramebuffersEXT(n, framebuffers); 56 56 crPackDeleteFramebuffersEXT(n, framebuffers); 57 57 } … … 60 60 packspu_DeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers) 61 61 { 62 62 crStateDeleteRenderbuffersEXT(n, renderbuffers); 63 63 crPackDeleteRenderbuffersEXT(n, renderbuffers); 64 64 } … … 67 67 packspu_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) 68 68 { 69 69 crStateFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer); 70 70 crPackFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer); 71 71 } … … 81 81 packspu_CheckFramebufferStatusEXT(GLenum target) 82 82 { 83 84 83 GET_THREAD(thread); 84 int writeback = 1; 85 85 GLenum status = crStateCheckFramebufferStatusEXT(target); 86 86 … … 92 92 crPackCheckFramebufferStatusEXT(target, &status, &writeback); 93 93 94 94 packspuFlush((void *) thread); 95 95 CRPACKSPU_WRITEBACK_WAIT(thread, writeback); 96 96 -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py
-
Property svn:keywords
changed from
Id
toId Revision
r63942 r69310 51 51 from get_sizes import * 52 52 53 easy_swaps = { 53 easy_swaps = { 54 54 'GenTextures': '(unsigned int) n', 55 55 'GetClipPlane': '4', 56 56 'GetPolygonStipple': '0' 57 57 } 58 58 59 59 simple_funcs = [ 'GetIntegerv', 'GetFloatv', 'GetDoublev', 'GetBooleanv' ] 60 60 simple_swaps = [ 'SWAP32', 'SWAPFLOAT', 'SWAPDOUBLE', '(GLboolean) SWAP32' ] … … 123 123 || pname == GL_FRAMEBUFFER_BINDING_EXT 124 124 || pname == GL_READ_FRAMEBUFFER_BINDING_EXT 125 || pname == GL_DRAW_FRAMEBUFFER_BINDING_EXT 125 || pname == GL_DRAW_FRAMEBUFFER_BINDING_EXT 126 126 #endif 127 127 || pname == GL_ARRAY_BUFFER_BINDING … … 161 161 return; 162 162 } 163 163 164 164 } 165 165 """ % (params[-1][1], params[-1][1], func_name, func_name, apiutil.MakeCallString(params), func_name, func_name)) 166 166 167 167 if func_name in vertattr_get_funcs: 168 168 print(""" … … 189 189 #endif 190 190 return; 191 } 191 } 192 192 """ % (params[-1][1], params[-1][1], func_name, func_name, apiutil.MakeCallString(params), func_name, func_name)) 193 193 -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_getshaders.c
-
Property svn:keywords
changed from
Id
toId Revision
r62521 r69310 24 24 #include <iprt/assert.h> 25 25 26 /* @todo combine with the one from server_getshaders.c*/26 /** @todo combine with the one from server_getshaders.c*/ 27 27 typedef struct _crGetActive_t 28 28 { -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_getstring.c
-
Property svn:keywords
changed from
Id
toId Revision
r52262 r69310 87 87 88 88 #ifdef Linux 89 /* @todo89 /** @todo 90 90 *That's a hack to allow running Unity, it uses libnux which is calling extension functions 91 91 *without checking if it's being supported/exported. … … 123 123 { 124 124 GetString(GL_REAL_VERSION, ctx->pszRealVersion); 125 return ctx->pszRealVersion; 125 return ctx->pszRealVersion; 126 126 } 127 127 else -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c
r63206 r69310 81 81 GLint PACKSPU_APIENTRY packspu_GetUniformLocation(GLuint program, const char * name) 82 82 { 83 if (!crStateIsProgramUniformsCached(program)) 83 if (!crStateIsProgramUniformsCached(program)) 84 84 { 85 85 GET_THREAD(thread); -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_init.c
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c
-
Property svn:keywords
changed from
Id
toId Revision
r63205 r69310 19 19 GET_THREAD(thread); 20 20 21 21 22 22 switch(target) 23 23 { … … 104 104 /*Usually buffer==GL_BACK, so put this extra check to simplify boolean eval on runtime*/ 105 105 return (buffer != GL_BACK) 106 && (buffer == GL_FRONT_LEFT 106 && (buffer == GL_FRONT_LEFT 107 107 || buffer == GL_FRONT_RIGHT 108 108 || buffer == GL_FRONT … … 795 795 (void) lpvReserved; 796 796 797 switch (fdwReason) 797 switch (fdwReason) 798 798 { 799 799 case DLL_PROCESS_ATTACH: -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c
-
Property svn:keywords
changed from
Id
toId Revision
r63205 r69310 31 31 packspuReadback( const CRMessageReadback *rb, unsigned int len ) 32 32 { 33 /* minus the header, the destination pointer, 33 /* minus the header, the destination pointer, 34 34 * *and* the implicit writeback pointer at the head. */ 35 35 36 36 int payload_len = len - sizeof( *rb ); 37 37 int *writeback; 38 void *dest_ptr; 38 void *dest_ptr; 39 39 crMemcpy( &writeback, &(rb->writeback_ptr), sizeof( writeback ) ); 40 40 crMemcpy( &dest_ptr, &(rb->readback_ptr), sizeof( dest_ptr ) ); … … 90 90 91 91 num_opcodes = buf->opcode_start - buf->opcode_current; 92 hdr = (CRMessageOpcodes *) 92 hdr = (CRMessageOpcodes *) 93 93 ( buf->data_start - ( ( num_opcodes + 3 ) & ~0x3 ) - sizeof(*hdr) ); 94 94 -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_pixel.c
-
Property svn:keywords
changed from
Id
toId Revision
r63205 r69310 3 3 4 4 See the file LICENSE.txt for information on redistributing this software. */ 5 5 6 6 #include "cr_packfunctions.h" 7 7 #include "cr_glstate.h" … … 140 140 # endif 141 141 #endif 142 /* @todo ARB_texture_float*/142 /** @todo ARB_texture_float*/ 143 143 && internalformat!=GL_RGBA32F_ARB 144 144 && internalformat!=GL_RGB32F_ARB … … 301 301 ContextInfo *ctx = thread->currentContext; 302 302 CRClientState *clientState = &(ctx->clientState->client); 303 int writeback; 303 int writeback; 304 304 305 305 if (crStateIsBufferBound(GL_PIXEL_PACK_BUFFER_ARB)) … … 326 326 } 327 327 328 /* @todo check with pbo's*/328 /** @todo check with pbo's*/ 329 329 void PACKSPU_APIENTRY packspu_CopyPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type ) 330 330 { -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_proto.py
-
Property svn:keywords
changed from
Id
toId Revision
r63942 r69310 32 32 for func_name in keys: 33 33 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 36 36 apiutil.FindSpecial( "packspu_vertex", func_name )): 37 37 pack_specials.append( func_name ) -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_swapbuf.c
-
Property svn:keywords
changed from
Id
toId Revision
r42499 r69310 66 66 * This is complicated because writeback in the pack spu is 67 67 * 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: 69 69 */ 70 70 switch( thread->writeback ) { -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_texture.c
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/passthrough/passthrough.def
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/passthrough/passthrough.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/passthrough/passthroughspu_init.c
-
Property svn:keywords
changed from
Id
toId Revision
r15532 r69310 60 60 *options = passthroughSPUOptions; 61 61 *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO); 62 62 63 63 return 1; 64 64 } -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/stub.c
-
Property svn:keywords
changed from
Id
toId Revision
r65537 r69310 6 6 7 7 #include "cr_spu.h" 8 #include "cr_error.h" 9 #include "cr_mem.h" 8 #include "cr_error.h" 9 #include "cr_mem.h" 10 10 #include "stub.h" 11 11 #include <iprt/thread.h> … … 199 199 stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH); 200 200 201 /* @todo remove "if (winW && winH)"?*/201 /** @todo remove "if (winW && winH)"?*/ 202 202 if (winW && winH) { 203 203 if (stub.trackWindowSize) { … … 257 257 return GL_FALSE; 258 258 } 259 259 260 260 hVisRgn = CreateRectRgn(0,0,0,0); 261 261 iret = GetRandomRgn(pWindow->drawable, hVisRgn, SYSRGN); … … 263 263 if (iret==1) 264 264 { 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*/ 266 266 /* Convert screen related rectangles to client related rectangles */ 267 267 pt.x = 0; … … 285 285 */ 286 286 287 if (pWindow->hVisibleRegion==INVALID_HANDLE_VALUE 287 if (pWindow->hVisibleRegion==INVALID_HANDLE_VALUE 288 288 || !EqualRgn(pWindow->hVisibleRegion, hVisRgn)) 289 289 { … … 309 309 } 310 310 } 311 else 311 else 312 312 { 313 313 crWarning("GetRandomRgn returned (%d) instead of (1), VisibleRegions update failed", iret); … … 395 395 } 396 396 397 /* @todo remove it*/397 /** @todo remove it*/ 398 398 default: 399 399 { … … 433 433 434 434 XLOCK(dpy); 435 if (XCompositeQueryExtension(dpy, &evb, &erb) 436 && XCompositeQueryVersion(dpy, &vma, &vmi) 435 if (XCompositeQueryExtension(dpy, &evb, &erb) 436 && XCompositeQueryVersion(dpy, &vma, &vmi) 437 437 && (vma>0 || vmi>=4)) 438 438 { … … 441 441 vma=0; 442 442 vmi=0; 443 if (XFixesQueryExtension(dpy, &evb, &erb) 443 if (XFixesQueryExtension(dpy, &evb, &erb) 444 444 && XFixesQueryVersion(dpy, &vma, &vmi) 445 445 && vma>=2) … … 488 488 dpy = stubGetWindowDisplay(pWindow); 489 489 490 /* @todo see comment regarding size/position updates and XSync, same applies to those functions but490 /** @todo see comment regarding size/position updates and XSync, same applies to those functions but 491 491 * it seems there's no way to get even based updates for this. Or I've failed to find the appropriate extension. 492 492 */ … … 505 505 if (!bNoUpdate 506 506 && (!pWindow->pVisibleRegions 507 || pWindow->cVisibleRegions!=cRects 507 || pWindow->cVisibleRegions!=cRects 508 508 || (pWindow->pVisibleRegions && crMemcmp(pWindow->pVisibleRegions, pXRects, cRects * sizeof(XRectangle))))) 509 509 { … … 531 531 pGLRects[4*i+2] = pXRects[i].x+pXRects[i].width; 532 532 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]); 534 534 } 535 535 -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/stub_common.py
-
Property svn:keywords
changed from
Id
toId Revision
r63939 r69310 76 76 annotations[filename] = {} 77 77 return {} 78 78 79 79 for line in f.readlines(): 80 80 line = line.strip() … … 96 96 except KeyError: 97 97 table = LoadAnnotations(filename) 98 98 99 99 try: 100 100 subtable = table[key] … … 110 110 except KeyError: 111 111 table = LoadAnnotations(filename) 112 112 113 113 try: 114 114 subtable = table[key] … … 120 120 except KeyError: 121 121 return 0 122 122 123 123 124 124 … … 132 132 specials[filename] = {} 133 133 return {} 134 134 135 135 for line in f.readlines(): 136 136 line = string.strip(line) … … 138 138 continue 139 139 table[line] = 1 140 140 141 141 specials[filename] = table 142 142 return table … … 149 149 except KeyError: 150 150 table = LoadSpecials( filename ) 151 151 152 152 try: 153 153 if (table[glName] == 1): … … 165 165 except KeyError: 166 166 table = LoadSpecials( filename ) 167 167 168 168 return sorted(table.keys()) 169 169 … … 176 176 except KeyError: 177 177 table = LoadSpecials(filename) 178 178 179 179 return sorted(table.keys()) 180 180 181 181 def NumSpecials( table_file ): 182 182 filename = table_file + "_special" … … 257 257 output = '( ' + InternalArgumentString(arg_names, arg_types) + ' )' 258 258 return output 259 259 260 260 def InternalCallString( arg_names ): 261 261 output = '' -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/tsfuncs.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/utils.c
r61902 r69310 48 48 49 49 unsigned 50 driParseDebugString( const char * debug, 50 driParseDebugString( const char * debug, 51 51 const struct dri_debug_control * control ) 52 52 { … … 73 73 /** 74 74 * Create the \c GL_RENDERER string for DRI drivers. 75 * 75 * 76 76 * Almost all DRI drivers use a \c GL_RENDERER string of the form: 77 77 * … … 80 80 * Using the supplied chip name, driver data, and AGP speed, this function 81 81 * creates the string. 82 * 82 * 83 83 * \param buffer Buffer to hold the \c GL_RENDERER string. 84 84 * \param hardware_name Name of the hardware. 85 85 * \param driver_date Driver date. 86 86 * \param agp_mode AGP mode (speed). 87 * 87 * 88 88 * \returns 89 89 * The length of the string stored in \c buffer. This does \b not include … … 112 112 offset += sprintf( & buffer[ offset ], " AGP %ux", agp_mode ); 113 113 break; 114 114 115 115 default: 116 116 break; … … 215 215 /** 216 216 * Enable extensions supported by the driver. 217 * 217 * 218 218 * \bug 219 219 * ARB_imaging isn't handled properly. In Mesa, enabling ARB_imaging also … … 252 252 /** 253 253 * Enable and add dispatch functions for a single extension 254 * 254 * 255 255 * \param ctx Context where extension is to be enabled. 256 256 * \param ext Extension that is to be enabled. 257 * 257 * 258 258 * \sa driInitExtensions, _mesa_enable_extension, _glapi_add_entrypoint 259 259 * … … 315 315 } 316 316 else if (ext->functions[i].remap_index != -1) { 317 driDispatchRemapTable[ ext->functions[i].remap_index ] = 317 driDispatchRemapTable[ ext->functions[i].remap_index ] = 318 318 offset; 319 319 } … … 344 344 * \param drmActual Actual DRM version supplied __driCreateNewScreen. 345 345 * \param drmExpected Minimum DRM version required by the driver. 346 * 346 * 347 347 * \returns \c GL_TRUE if all version requirements are met. Otherwise, 348 348 * \c GL_FALSE is returned. 349 * 349 * 350 350 * \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2, __driUtilMessage 351 351 * … … 388 388 return GL_FALSE; 389 389 } 390 390 391 391 /* Check that the DRM driver version is compatible */ 392 392 if ( (drmActual->major != drmExpected->major) … … 455 455 /** 456 456 * Creates a set of \c __GLcontextModes that a driver will expose. 457 * 457 * 458 458 * A set of \c __GLcontextModes will be created based on the supplied 459 459 * parameters. The number of modes processed will be 2 * 460 460 * \c num_depth_stencil_bits * \c num_db_modes. 461 * 461 * 462 462 * For the most part, data is just copied from \c depth_bits, \c stencil_bits, 463 463 * \c db_modes, and \c visType into each \c __GLcontextModes element. … … 471 471 * are the blue value, bits [10:5] are the green value, and bits [4:0] are 472 472 * the red value. 473 * 473 * 474 474 * One subtle issue is the combination of \c GL_RGB or \c GL_BGR and either 475 475 * of the \c GL_UNSIGNED_INT_8_8_8_8 modes. The resulting mask values in the … … 480 480 * 481 481 * If in doubt, look at the tables used in the function. 482 * 482 * 483 483 * \param ptr_to_modes Pointer to a pointer to a linked list of 484 484 * \c __GLcontextModes. Upon completion, a pointer to … … 490 490 * \c GL_RGBA, \c GL_BGR, and \c GL_BGRA are supported. 491 491 * \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, 493 493 * \c GL_UNSIGNED_SHORT_5_6_5_REV, 494 494 * \c GL_UNSIGNED_INT_8_8_8_8, and … … 507 507 * \param visType GLX visual type. Usually either \c GLX_TRUE_COLOR or 508 508 * \c GLX_DIRECT_COLOR. 509 * 509 * 510 510 * \returns 511 511 * \c GL_TRUE on success or \c GL_FALSE on failure. Currently the only 512 512 * cause of failure is a bad parameter (i.e., unsupported \c fb_format or 513 513 * \c fb_type). 514 * 514 * 515 515 * \todo 516 516 * There is currently no way to support packed RGB modes (i.e., modes with 517 517 * exactly 3 bytes per pixel) or floating-point modes. This could probably 518 518 * 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, 520 520 * \c GL_4HALF_16_16_16_16, etc. We can cross that bridge when we come to it. 521 521 */ … … 746 746 while (b[j] != NULL) 747 747 j++; 748 748 749 749 all = _mesa_malloc((i + j + 1) * sizeof *all); 750 750 index = 0; … … 844 844 *value = *(unsigned int *) 845 845 ((char *) &config->modes + attribMap[index].offset); 846 846 847 847 break; 848 848 } -
trunk/src/VBox/Additions/common/crOpenGL/vboxdri_drv.c
r33540 r69310 31 31 * NOTES: 32 32 * -- 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 35 35 * device. 36 36 * -- 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 38 38 * fullscreen interface. 39 39 * -- HOWEVER: only a small number of pixelformats are supported, and … … 125 125 126 126 struct { 127 __DRIcontextPrivate *context; 128 __DRIscreenPrivate *screen; 127 __DRIcontextPrivate *context; 128 __DRIscreenPrivate *screen; 129 129 __DRIdrawablePrivate *drawable; /* drawable bound to this ctx */ 130 130 } dri; 131 131 132 132 } fbContext, *fbContextPtr; 133 133 … … 421 421 * This is the driver specific part of the createNewScreen entry point. 422 422 * Called when using legacy DRI. 423 * 423 * 424 424 * return the __GLcontextModes supported by this driver 425 425 */ … … 437 437 return NULL; 438 438 } 439 439 440 440 driInitExtensions( NULL, card_extensions, GL_FALSE ); 441 441 … … 476 476 shareCtx = NULL; 477 477 478 ctx = fbmesa->glCtx = _mesa_create_context(glVisual, shareCtx, 478 ctx = fbmesa->glCtx = _mesa_create_context(glVisual, shareCtx, 479 479 &functions, (void *) fbmesa); 480 480 if (!fbmesa->glCtx) { … … 542 542 { 543 543 struct gl_framebuffer *mesa_framebuffer; 544 544 545 545 if (isPixmap) { 546 546 return GL_FALSE; /* not implemented */ … … 551 551 const GLboolean swAccum = mesaVis->accumRedBits > 0; 552 552 const GLboolean swStencil = mesaVis->stencilBits > 0; 553 553 554 554 mesa_framebuffer = _mesa_create_framebuffer(mesaVis); 555 555 if (!mesa_framebuffer) … … 590 590 swAlpha, /* or always zero? */ 591 591 GL_FALSE /* aux */); 592 592 593 593 driDrawPriv->driverPrivate = mesa_framebuffer; 594 594 … … 620 620 fbContextPtr fbmesa = (fbContextPtr) dPriv->driContextPriv->driverPrivate; 621 621 GLcontext *ctx = fbmesa->glCtx; 622 622 623 623 if (ctx->Visual.doubleBufferMode) { 624 624 int i; … … 638 638 offset += currentPitch; 639 639 } 640 640 641 641 _mesa_free(tmp); 642 642 } … … 658 658 { 659 659 if ( driContextPriv ) { 660 fbContextPtr newFbCtx = 660 fbContextPtr newFbCtx = 661 661 (fbContextPtr) driContextPriv->driverPrivate; 662 662 663 663 newFbCtx->dri.drawable = driDrawPriv; 664 664 665 _mesa_make_current( newFbCtx->glCtx, 665 _mesa_make_current( newFbCtx->glCtx, 666 666 driDrawPriv->driverPrivate, 667 667 driReadPriv->driverPrivate); -
trunk/src/VBox/Additions/common/crOpenGL/wgl.c
-
Property svn:keywords
changed from
Id
toId Revision
r66826 r69310 42 42 static GLuint ComputeVisBits( HDC hdc ) 43 43 { 44 PIXELFORMATDESCRIPTOR pfd; 44 PIXELFORMATDESCRIPTOR pfd; 45 45 int iPixelFormat; 46 46 GLuint b = 0; … … 77 77 stubInit(); 78 78 79 /* 79 /* 80 80 * NOTE!!! 81 81 * Here we're telling the renderspu not to use the GDI … … 97 97 PFD_SWAP_EXCHANGE | 98 98 PFD_SWAP_COPY | 99 /* @todo:this is disabled due to VSG Open Inventor interop issues99 /** @todo this is disabled due to VSG Open Inventor interop issues 100 100 * it does not make any sense actually since reporting this 101 101 * as well as choosing a pixel format with this cap would not do anything … … 144 144 crError( "wglChoosePixelFormat; asked for too many depth bits\n" ); 145 145 } 146 146 147 147 if ( pfd->cDepthBits > 0 ) 148 148 desiredVisual |= CR_DEPTH_BIT; … … 241 241 CR_DDI_PROLOGUE(); 242 242 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; 246 246 * } */ 247 247 … … 605 605 stubInit(); 606 606 607 /* TODO: Need to check pfAttributes too ! */607 /** @todo : Need to check pfAttributes too ! */ 608 608 609 609 for ( pi = (int *)piAttributes; *pi != 0; pi++ ) … … 641 641 if (pi[1] > 0) 642 642 { 643 /* @todo:this is disabled due to VSG Open Inventor interop issues643 /** @todo this is disabled due to VSG Open Inventor interop issues 644 644 * it does not make any sense actually since reporting this 645 645 * as well as choosing a pixel format with this cap would not do anything … … 676 676 if (pi[1] > 0) 677 677 { 678 /* @todo:this is disabled due to VSG Open Inventor interop issues678 /** @todo this is disabled due to VSG Open Inventor interop issues 679 679 * it does not make any sense actually since reporting this 680 680 * as well as choosing a pixel format with this cap would not do anything … … 694 694 695 695 case WGL_PIXEL_TYPE_ARB: 696 if(pi[1]!=WGL_TYPE_RGBA_ARB) 696 if(pi[1]!=WGL_TYPE_RGBA_ARB) 697 697 { 698 698 crWarning("WGL_PIXEL_TYPE 0x%x not supported!", pi[1]); … … 748 748 break; 749 749 case WGL_STEREO_ARB: 750 /* @todo:this is disabled due to VSG Open Inventor interop issues750 /** @todo this is disabled due to VSG Open Inventor interop issues 751 751 * it does not make any sense actually since reporting this 752 752 * as well as choosing a pixel format with this cap would not do anything … … 827 827 break; 828 828 case WGL_SAMPLE_BUFFERS_EXT: 829 /* @todo:this is disabled due to VSG Open Inventor interop issues829 /** @todo this is disabled due to VSG Open Inventor interop issues 830 830 * it does not make any sense actually since reporting this 831 831 * as well as choosing a pixel format with this cap would not do anything … … 834 834 break; 835 835 case WGL_SAMPLES_EXT: 836 /* @todo:this is disabled due to VSG Open Inventor interop issues836 /** @todo this is disabled due to VSG Open Inventor interop issues 837 837 * it does not make any sense actually since reporting this 838 838 * as well as choosing a pixel format with this cap would not do anything … … 883 883 break; 884 884 case WGL_STEREO_ARB: 885 /* @todo:this is disabled due to VSG Open Inventor interop issues885 /** @todo this is disabled due to VSG Open Inventor interop issues 886 886 * it does not make any sense actually since reporting this 887 887 * as well as choosing a pixel format with this cap would not do anything … … 962 962 break; 963 963 case WGL_SAMPLE_BUFFERS_EXT: 964 /* @todo:this is disabled due to VSG Open Inventor interop issues964 /** @todo this is disabled due to VSG Open Inventor interop issues 965 965 * it does not make any sense actually since reporting this 966 966 * as well as choosing a pixel format with this cap would not do anything … … 969 969 break; 970 970 case WGL_SAMPLES_EXT: 971 /* @todo:this is disabled due to VSG Open Inventor interop issues971 /** @todo this is disabled due to VSG Open Inventor interop issues 972 972 * it does not make any sense actually since reporting this 973 973 * as well as choosing a pixel format with this cap would not do anything -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/windows_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
r63942 r69310 93 93 94 94 95 95 96 96 97 97 GenerateEntrypoints() -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/windows_getprocaddress.py
-
Property svn:keywords
changed from
Id
toId Revision
r63942 r69310 145 145 146 146 if (!crStrcmp(name, "wglSwapIntervalEXT")) return (CR_PROC) wglSwapIntervalEXT; 147 147 148 148 crDebug("Returning GetProcAddress:NULL for %s", name); 149 149 return NULL; -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/windows_i386_exports.py
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/crOpenGL/xfont.c
-
Property svn:keywords
set to
Id Revision
-
Property svn:keywords
set to
Note:
See TracChangeset
for help on using the changeset viewer.