Changeset 48291 in vbox for trunk/src/VBox
- Timestamp:
- Sep 5, 2013 7:25:47 AM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_blitter.h
r48275 r48291 45 45 } 46 46 47 DECLINLINE(bool) CrGlslIsInited(const CR_GLSL_CACHE *pCache) 48 { 49 return !!pCache->pDispatch; 50 } 51 47 52 /* clients should set proper context before calling these funcs */ 48 53 VBOXBLITTERDECL(bool) CrGlslIsSupported(CR_GLSL_CACHE *pCache); … … 52 57 VBOXBLITTERDECL(int) CrGlslProgUseNoAlpha(const CR_GLSL_CACHE *pCache, GLenum enmTexTarget); 53 58 VBOXBLITTERDECL(void) CrGlslProgClear(const CR_GLSL_CACHE *pCache); 54 VBOXBLITTERDECL(bool) CrGlslNeedsCleanup( CR_GLSL_CACHE *pCache);59 VBOXBLITTERDECL(bool) CrGlslNeedsCleanup(const CR_GLSL_CACHE *pCache); 55 60 VBOXBLITTERDECL(void) CrGlslCleanup(CR_GLSL_CACHE *pCache); 56 61 VBOXBLITTERDECL(void) CrGlslTerm(CR_GLSL_CACHE *pCache); -
trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp
r48275 r48291 841 841 #define CR_GLSL_STR_V_120 "#version 120\n" 842 842 #define CR_GLSL_STR_EXT_TR "#extension GL_ARB_texture_rectangle : enable\n" 843 #define CR_GLSL_STR_ TEX2D "texture2D"844 #define CR_GLSL_STR_ TEX2DRECT "texture2DRect"843 #define CR_GLSL_STR_2D "2D" 844 #define CR_GLSL_STR_2DRECT "2DRect" 845 845 846 846 #define CR_GLSL_PATTERN_FS_NOALPHA(_ver, _ext, _tex) \ 847 847 _ver \ 848 848 _ext \ 849 "uniform sampler" _tex " sampler0;\n" \ 849 850 "void main()\n" \ 850 851 "{\n" \ 851 852 "vec2 srcCoord = vec2(gl_TexCoord[0]);\n" \ 852 "gl_FragData[0].xyz = ( " _tex "(0, srcCoord).xyz);\n" \853 "gl_FragData[0].xyz = (texture" _tex "(sampler0, srcCoord).xyz);\n" \ 853 854 "gl_FragData[0].w = 1.0;\n" \ 854 855 "}\n" … … 865 866 { 866 867 if (enmTexTarget == GL_TEXTURE_2D) 867 return CR_GLSL_PATTERN_FS_NOALPHA(CR_GLSL_STR_V_120, "", CR_GLSL_STR_ TEX2D);868 return CR_GLSL_PATTERN_FS_NOALPHA(CR_GLSL_STR_V_120, "", CR_GLSL_STR_2D); 868 869 else if (enmTexTarget == GL_TEXTURE_RECTANGLE_ARB) 869 return CR_GLSL_PATTERN_FS_NOALPHA(CR_GLSL_STR_V_120, CR_GLSL_STR_EXT_TR, CR_GLSL_STR_ TEX2DRECT);870 return CR_GLSL_PATTERN_FS_NOALPHA(CR_GLSL_STR_V_120, CR_GLSL_STR_EXT_TR, CR_GLSL_STR_2DRECT); 870 871 871 872 crWarning("invalid enmTexTarget %#x", enmTexTarget); … … 875 876 { 876 877 if (enmTexTarget == GL_TEXTURE_2D) 877 return CR_GLSL_PATTERN_FS_NOALPHA("", "", CR_GLSL_STR_ TEX2D);878 return CR_GLSL_PATTERN_FS_NOALPHA("", "", CR_GLSL_STR_2D); 878 879 else if (enmTexTarget == GL_TEXTURE_RECTANGLE_ARB) 879 return CR_GLSL_PATTERN_FS_NOALPHA("", CR_GLSL_STR_EXT_TR, CR_GLSL_STR_ TEX2DRECT);880 return CR_GLSL_PATTERN_FS_NOALPHA("", CR_GLSL_STR_EXT_TR, CR_GLSL_STR_2DRECT); 880 881 881 882 crWarning("invalid enmTexTarget %#x", enmTexTarget); … … 901 902 GLchar * pBuf = NULL; 902 903 GLuint uiProgram = 0; 904 GLint iUniform = -1; 903 905 GLuint uiShader = pCache->pDispatch->CreateShader(GL_FRAGMENT_SHADER); 904 906 if (!uiShader) … … 924 926 #ifdef DEBUG_misha 925 927 if (compiled) 926 crDebug("compile success:\n-------------------\n% d\n--------\n", pBuf);928 crDebug("compile success:\n-------------------\n%s\n--------\n", pBuf); 927 929 else 928 930 #endif 929 931 { 930 crWarning("compile FAILURE:\n-------------------\n%d\n--------\n", pBuf); 932 Assert(0); 933 crWarning("compile FAILURE:\n-------------------\n%s\n--------\n", pBuf); 931 934 rc = VERR_NOT_SUPPORTED; 932 935 goto end; … … 958 961 #ifdef DEBUG_misha 959 962 if (linked) 960 crDebug("link success:\n-------------------\n% d\n--------\n", pBuf);963 crDebug("link success:\n-------------------\n%s\n--------\n", pBuf); 961 964 else 962 965 #endif 963 966 { 964 crWarning("link FAILURE:\n-------------------\n%d\n--------\n", pBuf); 967 Assert(0); 968 crWarning("link FAILURE:\n-------------------\n%s\n--------\n", pBuf); 965 969 rc = VERR_NOT_SUPPORTED; 966 970 goto end; … … 969 973 970 974 Assert(linked); 975 976 iUniform = pCache->pDispatch->GetUniformLocation(uiProgram, "sampler0"); 977 if (iUniform == -1) 978 { 979 crWarning("GetUniformLocation failed for sampler0"); 980 } 981 else 982 { 983 pCache->pDispatch->Uniform1i(iUniform, 0); 984 } 971 985 972 986 *puiProgram = uiProgram; … … 1088 1102 } 1089 1103 1090 VBOXBLITTERDECL(bool) CrGlslNeedsCleanup( CR_GLSL_CACHE *pCache)1104 VBOXBLITTERDECL(bool) CrGlslNeedsCleanup(const CR_GLSL_CACHE *pCache) 1091 1105 { 1092 1106 return pCache->uNoAlpha2DProg || pCache->uNoAlpha2DRectProg; -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r48275 r48291 298 298 if (render_spu.defaultSharedContext == context) 299 299 { 300 renderspuContextRelease(render_spu.defaultSharedContext); 301 render_spu.defaultSharedContext = NULL; 300 renderspuSetDefaultSharedContext(NULL); 302 301 } 303 302 … … 317 316 } 318 317 319 320 void RENDER_APIENTRY 321 renderspuMakeCurrent(GLint crWindow, GLint nativeWindow, GLint ctx) 322 { 323 WindowInfo *window; 324 ContextInfo *context; 325 326 /* 327 crDebug("%s win=%d native=0x%x ctx=%d", __FUNCTION__, crWindow, (int) nativeWindow, ctx); 328 */ 329 330 window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, crWindow); 331 context = (ContextInfo *) crHashtableSearch(render_spu.contextTable, ctx); 332 318 WindowInfo* renderspuGetDummyWindow(GLint visBits) 319 { 320 WindowInfo *window = (WindowInfo *) crHashtableSearch(render_spu.dummyWindowTable, visBits); 321 if (!window) 322 { 323 window = (WindowInfo *)crAlloc(sizeof (*window)); 324 if (!window) 325 { 326 crWarning("crAlloc failed"); 327 return NULL; 328 } 329 330 if (!renderspuWindowInit(window, NULL, visBits, -1)) 331 { 332 crWarning("renderspuWindowInit failed"); 333 crFree(window); 334 return NULL; 335 } 336 337 crHashtableAdd(render_spu.dummyWindowTable, visBits, window); 338 } 339 340 return window; 341 } 342 343 void renderspuPerformMakeCurrent(WindowInfo *window, GLint nativeWindow, ContextInfo *context) 344 { 333 345 if (window && context) 334 346 { … … 341 353 if (!window) 342 354 { 343 crDebug("Render SPU: MakeCurrent invalid window id: %d", crWindow);355 crDebug("Render SPU: MakeCurrent invalid window id: %d", window->BltInfo.Base.id); 344 356 return; 345 357 } 346 358 if (!context) 347 359 { 348 crDebug("Render SPU: MakeCurrent invalid context id: %d", c tx);360 crDebug("Render SPU: MakeCurrent invalid context id: %d", context->BltInfo.Base.id); 349 361 return; 350 362 } … … 367 379 context->everCurrent = GL_TRUE; 368 380 } 369 if ( crWindow== CR_RENDER_DEFAULT_WINDOW_ID && window->mapPending &&381 if (window->BltInfo.Base.id == CR_RENDER_DEFAULT_WINDOW_ID && window->mapPending && 370 382 !render_spu.render_to_app_window && !render_spu.render_to_crut_window) { 371 383 /* Window[CR_RENDER_DEFAULT_CONTEXT_ID] is special, it's the default window and normally hidden. … … 378 390 window->everCurrent = GL_TRUE; 379 391 } 380 else if (! crWindow && !ctx)392 else if (!window && !context) 381 393 { 382 394 renderspu_SystemMakeCurrent( NULL, 0, NULL ); … … 389 401 else 390 402 { 391 crError("renderspuMakeCurrent invalid ids: crWindow(%d), ctx(%d)", crWindow, ctx); 392 } 393 } 394 395 GLboolean renderspuWindowInit( WindowInfo *window, VisualInfo *visual, GLboolean showIt, GLint id ) 403 crError("renderspuMakeCurrent invalid ids: crWindow(%d), ctx(%d)", 404 window ? window->BltInfo.Base.id : 0, 405 context ? context->BltInfo.Base.id : 0); 406 } 407 } 408 409 void RENDER_APIENTRY 410 renderspuMakeCurrent(GLint crWindow, GLint nativeWindow, GLint ctx) 411 { 412 WindowInfo *window = NULL; 413 ContextInfo *context = NULL; 414 415 /* 416 crDebug("%s win=%d native=0x%x ctx=%d", __FUNCTION__, crWindow, (int) nativeWindow, ctx); 417 */ 418 419 if (crWindow) 420 { 421 window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, crWindow); 422 if (!window) 423 { 424 crWarning("invalid window %d specified", crWindow); 425 return; 426 } 427 } 428 429 if (ctx) 430 { 431 context = (ContextInfo *) crHashtableSearch(render_spu.contextTable, ctx); 432 if (!context) 433 { 434 crWarning("invalid context %d specified", ctx); 435 return; 436 } 437 } 438 439 if (!context != !window) 440 { 441 crWarning("either window %d or context %d are zero", crWindow, ctx); 442 return; 443 } 444 445 renderspuPerformMakeCurrent(window, nativeWindow, context); 446 } 447 448 GLboolean renderspuWindowInitWithVisual( WindowInfo *window, VisualInfo *visual, GLboolean showIt, GLint id ) 396 449 { 397 450 crMemset(window, 0, sizeof (*window)); … … 449 502 * Window functions 450 503 */ 451 452 GLint renderspuWindowCreateEx( const char *dpyName, GLint visBits, GLint id ) 453 { 454 WindowInfo *window; 504 GLboolean renderspuWindowInit(WindowInfo *pWindow, const char *dpyName, GLint visBits, GLint id) 505 { 455 506 VisualInfo *visual; 456 GLboolean showIt; 457 458 if (id <= 0) 459 { 460 id = (GLint)crHashtableAllocKeys(render_spu.windowTable, 1); 461 if (id <= 0) 462 { 463 crWarning("failed to allocate window id"); 464 return -1; 465 } 466 } 467 else 468 { 469 if (crHashtableIsKeyUsed(render_spu.windowTable, id)) 470 { 471 crWarning("the specified window key %d is in use", id); 472 return -1; 473 } 474 } 475 507 508 crMemset(pWindow, 0, sizeof (*pWindow)); 476 509 477 510 if (!dpyName || crStrlen(render_spu.display_string) > 0) … … 482 515 { 483 516 crWarning( "Render SPU: Couldn't create a window, renderspuFindVisual returned NULL" ); 484 return -1; 485 } 486 487 /* Allocate WindowInfo */ 488 window = (WindowInfo *) crCalloc(sizeof(WindowInfo)); 489 if (!window) 490 { 491 crWarning( "Render SPU: Couldn't create a window" ); 492 return -1; 493 } 494 495 crHashtableAdd(render_spu.windowTable, id, window); 496 497 showIt = 0; 517 return GL_FALSE; 518 } 498 519 499 520 /* … … 501 522 */ 502 523 /* Have GLX/WGL/AGL create the window */ 503 if (!renderspuWindowInit( window, visual, showIt, id )) 504 { 524 if (!renderspuWindowInitWithVisual( pWindow, visual, 0, id )) 525 { 526 crWarning( "Render SPU: Couldn't create a window, renderspu_SystemCreateWindow failed" ); 527 return GL_FALSE; 528 } 529 530 return GL_TRUE; 531 } 532 533 GLint renderspuWindowCreateEx( const char *dpyName, GLint visBits, GLint id ) 534 { 535 WindowInfo *window; 536 537 GLboolean showIt; 538 539 if (id <= 0) 540 { 541 id = (GLint)crHashtableAllocKeys(render_spu.windowTable, 1); 542 if (id <= 0) 543 { 544 crWarning("failed to allocate window id"); 545 return -1; 546 } 547 } 548 else 549 { 550 if (crHashtableIsKeyUsed(render_spu.windowTable, id)) 551 { 552 crWarning("the specified window key %d is in use", id); 553 return -1; 554 } 555 } 556 557 /* Allocate WindowInfo */ 558 window = (WindowInfo *) crCalloc(sizeof(WindowInfo)); 559 if (!window) 560 { 561 crWarning( "Render SPU: Couldn't create a window" ); 562 return -1; 563 } 564 565 if (!renderspuWindowInit(window, dpyName, visBits, id)) 566 { 567 crWarning("renderspuWindowInit failed"); 505 568 crFree(window); 506 crWarning( "Render SPU: Couldn't create a window, renderspu_SystemCreateWindow failed" );507 569 return -1; 508 570 } 509 571 572 crHashtableAdd(render_spu.windowTable, id, window); 510 573 return window->BltInfo.Base.id; 511 574 } … … 1260 1323 * Misc functions 1261 1324 */ 1262 1325 void renderspuSetDefaultSharedContext(ContextInfo *pCtx) 1326 { 1327 if (pCtx == render_spu.defaultSharedContext) 1328 return; 1329 1330 renderspu_SystemDefaultSharedContextChanged(render_spu.defaultSharedContext, pCtx); 1331 1332 if (render_spu.defaultSharedContext) 1333 renderspuContextRelease(render_spu.defaultSharedContext); 1334 1335 renderspuContextRetain(pCtx); 1336 render_spu.defaultSharedContext = pCtx; 1337 } 1263 1338 1264 1339 … … 1269 1344 { 1270 1345 case GL_HH_SET_DEFAULT_SHARED_CTX: 1271 if (render_spu.defaultSharedContext) 1272 { 1273 renderspuContextRelease(render_spu.defaultSharedContext); 1274 render_spu.defaultSharedContext = NULL; 1275 } 1276 1346 { 1347 ContextInfo * pCtx = NULL; 1277 1348 if (value) 1278 { 1279 render_spu.defaultSharedContext = (ContextInfo *) crHashtableSearch(render_spu.contextTable, value); 1280 if (render_spu.defaultSharedContext) 1281 renderspuContextRetain(render_spu.defaultSharedContext); 1282 else 1283 crWarning("invalid default shared context id %d", value); 1284 } 1285 1349 pCtx = (ContextInfo *)crHashtableSearch(render_spu.contextTable, value); 1350 else 1351 crWarning("invalid default shared context id %d", value); 1352 1353 renderspuSetDefaultSharedContext(pCtx); 1286 1354 break; 1355 } 1287 1356 default: 1288 1357 // crWarning("Unhandled target in renderspuChromiumParameteriCR()"); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
r48079 r48291 259 259 CRHashTable *contextTable; 260 260 261 CRHashTable *dummyWindowTable; 262 261 263 ContextInfo *defaultSharedContext; 262 264 … … 308 310 309 311 #ifdef RT_OS_DARWIN 310 # ifndef VBOX_WITH_COCOA_QT 312 # ifdef VBOX_WITH_COCOA_QT 313 CR_GLSL_CACHE GlobalShaders; 314 # else 311 315 RgnHandle hRootVisibleRegion; 312 316 RTSEMFASTMUTEX syncMutex; … … 364 368 365 369 366 370 extern void renderspuSetDefaultSharedContext(ContextInfo *pCtx); 367 371 extern void renderspuSetVBoxConfiguration( RenderSPU *spu ); 368 372 extern void renderspuMakeVisString( GLbitfield visAttribs, char *s ); … … 379 383 extern void renderspu_SystemWindowPosition( WindowInfo *window, GLint x, GLint y ); 380 384 extern void renderspu_SystemWindowVisibleRegion(WindowInfo *window, GLint cRects, const GLint* pRects); 381 382 #ifdef GLX383 385 extern int renderspu_SystemInit(); 384 386 extern int renderspu_SystemTerm(); 385 #endif 387 extern void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext); 386 388 extern void renderspu_SystemShowWindow( WindowInfo *window, GLboolean showIt ); 387 389 extern void renderspu_SystemMakeCurrent( WindowInfo *window, GLint windowInfor, ContextInfo *context ); … … 405 407 extern PCR_BLITTER renderspuVBoxPresentBlitterEnsureCreated( WindowInfo *window, int32_t i32MakeCurrentUserData ); 406 408 extern void renderspuWindowTerm( WindowInfo *window ); 407 extern GLboolean renderspuWindowInit( WindowInfo *window, VisualInfo *visual, GLboolean showIt, GLint id ); 409 extern WindowInfo* renderspuGetDummyWindow(GLint visBits); 410 extern void renderspuPerformMakeCurrent(WindowInfo *window, GLint nativeWindow, ContextInfo *context); 411 extern GLboolean renderspuWindowInit(WindowInfo *pWindow, const char *dpyName, GLint visBits, GLint id); 412 extern GLboolean renderspuWindowInitWithVisual( WindowInfo *window, VisualInfo *visual, GLboolean showIt, GLint id ); 408 413 extern GLboolean renderspuInitVisual(VisualInfo *pVisInfo, const char *displayName, GLbitfield visAttribs); 409 414 extern void renderspuVBoxCompositorBlit ( struct VBOXVR_SCR_COMPOSITOR * pCompositor, PCR_BLITTER pBlitter); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_agl.c
r45132 r48291 887 887 } 888 888 889 int renderspu_SystemInit() 890 { 891 return VINF_SUCCESS; 892 } 893 894 int renderspu_SystemTerm() 895 { 896 return VINF_SUCCESS; 897 } 898 899 void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext) 900 { 901 902 } -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa.c
r45132 r48291 187 187 { 188 188 } 189 190 int renderspu_SystemInit() 191 { 192 return VINF_SUCCESS; 193 } 194 195 int renderspu_SystemTerm() 196 { 197 CrGlslTerm(&render_spu.GlobalShaders); 198 return VINF_SUCCESS; 199 } 200 201 typedef struct CR_RENDER_CTX_INFO 202 { 203 ContextInfo * pContext; 204 WindowInfo * pWindow; 205 } CR_RENDER_CTX_INFO; 206 207 void renderspuCtxInfoInitCurrent(CR_RENDER_CTX_INFO *pInfo) 208 { 209 GET_CONTEXT(pCurCtx); 210 pInfo->pContext = pCurCtx; 211 pInfo->pWindow = pCurCtx->currentWindow; 212 } 213 214 void renderspuCtxInfoRestoreCurrent(CR_RENDER_CTX_INFO *pInfo) 215 { 216 GET_CONTEXT(pCurCtx); 217 if (pCurCtx == pInfo->pContext && (!pCurCtx || pCurCtx->currentWindow == pInfo->pWindow)) 218 return; 219 renderspuPerformMakeCurrent(pInfo->pWindow, 0, pInfo->pContext); 220 } 221 222 GLboolean renderspuCtxSetCurrentWithAnyWindow(ContextInfo * pContext, CR_RENDER_CTX_INFO *pInfo) 223 { 224 WindowInfo * window; 225 renderspuCtxInfoInitCurrent(pInfo); 226 227 if (pInfo->pContext == pContext) 228 return GL_TRUE; 229 230 window = pContext->currentWindow; 231 if (!window) 232 { 233 window = renderspuGetDummyWindow(pContext->BltInfo.Base.visualBits); 234 if (!window) 235 { 236 crWarning("renderspuGetDummyWindow failed"); 237 return GL_FALSE; 238 } 239 } 240 241 Assert(window); 242 243 renderspuPerformMakeCurrent(window, 0, pContext); 244 return GL_TRUE; 245 } 246 247 void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext) 248 { 249 CRASSERT(fromContext != toContext); 250 251 if (!CrGlslIsInited(&render_spu.GlobalShaders)) 252 { 253 CrGlslInit(&render_spu.GlobalShaders, render_spu.blitterDispatch); 254 } 255 256 if (fromContext) 257 { 258 if (CrGlslNeedsCleanup(&render_spu.GlobalShaders)) 259 { 260 CR_RENDER_CTX_INFO Info; 261 if (renderspuCtxSetCurrentWithAnyWindow(fromContext, &Info)) 262 { 263 CrGlslCleanup(&render_spu.GlobalShaders); 264 renderspuCtxInfoRestoreCurrent(&Info); 265 } 266 else 267 crWarning("renderspuCtxSetCurrentWithAnyWindow failed!"); 268 } 269 } 270 else 271 { 272 CRASSERT(!CrGlslNeedsCleanup(&render_spu.GlobalShaders)); 273 } 274 275 CRASSERT(!CrGlslNeedsCleanup(&render_spu.GlobalShaders)); 276 277 if (toContext) 278 { 279 CR_RENDER_CTX_INFO Info; 280 if (renderspuCtxSetCurrentWithAnyWindow(toContext, &Info)) 281 { 282 int rc = CrGlslProgGenAllNoAlpha(&render_spu.GlobalShaders); 283 if (!RT_SUCCESS(rc)) 284 crWarning("CrGlslProgGenAllNoAlpha failed, rc %d", rc); 285 286 renderspuCtxInfoRestoreCurrent(&Info); 287 } 288 else 289 crWarning("renderspuCtxSetCurrentWithAnyWindow failed!"); 290 } 291 } -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m
r48275 r48291 1089 1089 if (m_pBlitter) 1090 1090 { 1091 int rc = CrBltInit(m_pBlitter, NULL, false, false, NULL, render_spu.blitterDispatch);1091 int rc = CrBltInit(m_pBlitter, NULL, false, false, &render_spu.GlobalShaders, render_spu.blitterDispatch); 1092 1092 if (RT_SUCCESS(rc)) 1093 1093 { … … 1328 1328 } 1329 1329 1330 CrBltBlitTexMural(m_pBlitter, true, &pEntry->Tex, pSrcRect, pDstRect, 1, fFlags );1330 CrBltBlitTexMural(m_pBlitter, true, &pEntry->Tex, pSrcRect, pDstRect, 1, fFlags | CRBLT_F_NOALPHA); 1331 1331 } 1332 1332 CrBltLeave(m_pBlitter); … … 1452 1452 } 1453 1453 1454 CrBltBlitTexMural(m_pBlitter, true, &pEntry->Tex, pSrcRect, pDstRect, 1, fFlags );1454 CrBltBlitTexMural(m_pBlitter, true, &pEntry->Tex, pSrcRect, pDstRect, 1, fFlags | CRBLT_F_NOALPHA); 1455 1455 } 1456 1456 CrBltLeave(m_pBlitter); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_glx.c
r45581 r48291 448 448 if (bRc) 449 449 { 450 bRc = renderspuWindowInit (&render_spu.WinCmdWindow, &render_spu.WinCmdVisual, GL_FALSE, CR_RENDER_WINCMD_ID);450 bRc = renderspuWindowInitWithVisual(&render_spu.WinCmdWindow, &render_spu.WinCmdVisual, GL_FALSE, CR_RENDER_WINCMD_ID); 451 451 if (bRc) 452 452 { … … 458 458 else 459 459 { 460 crError("renderspuWindowInit failed");460 crError("renderspuWindowInitWithVisual failed"); 461 461 } 462 462 /* there is no visual destroy impl currently … … 2078 2078 XSync(window->visual->dpy, False); 2079 2079 } 2080 2081 void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext) 2082 { 2083 2084 } -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_init.c
r48079 r48291 142 142 WindowInfo *windowInfo; 143 143 const char * pcpwSetting; 144 int rc; 144 145 145 146 (void) child; … … 194 195 render_spu.contextTable = crAllocHashtableEx(1, INT32_MAX); 195 196 render_spu.windowTable = crAllocHashtableEx(1, INT32_MAX); 197 198 render_spu.dummyWindowTable = crAllocHashtable(); 196 199 197 200 pcpwSetting = crGetenv("CR_RENDER_ENABLE_SINGLE_PRESENT_CONTEXT"); … … 217 220 CRASSERT(render_spu.default_visual & CR_RGB_BIT); 218 221 219 #ifdef GLX 220 { 221 int rc = renderspu_SystemInit(); 222 if (!RT_SUCCESS(rc)) 223 { 224 crError("renderspu_SystemInit failed rc %d", rc); 225 return NULL; 226 } 227 } 228 #endif 229 222 rc = renderspu_SystemInit(); 223 if (!RT_SUCCESS(rc)) 224 { 225 crError("renderspu_SystemInit failed rc %d", rc); 226 return NULL; 227 } 230 228 #ifdef USE_OSMESA 231 229 if (render_spu.use_osmesa) { … … 444 442 { 445 443 crHashtableWalk(render_spu.windowTable, renderspuBlitterCleanupCB, NULL); 446 } 447 448 if (render_spu.defaultSharedContext) 449 { 450 renderspuContextRelease(render_spu.defaultSharedContext); 451 render_spu.defaultSharedContext = NULL; 452 } 444 445 crHashtableWalk(render_spu.dummyWindowTable, renderspuBlitterCleanupCB, NULL); 446 } 447 448 renderspuSetDefaultSharedContext(NULL); 453 449 454 450 crFreeHashtable(render_spu.contextTable, DeleteContextCallback); … … 456 452 crFreeHashtable(render_spu.windowTable, DeleteWindowCallback); 457 453 render_spu.windowTable = NULL; 454 crFreeHashtable(render_spu.dummyWindowTable, DeleteWindowCallback); 455 render_spu.dummyWindowTable = NULL; 458 456 crFreeHashtable(render_spu.barrierHash, crFree); 459 457 render_spu.barrierHash = NULL; -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c
r46887 r48291 1678 1678 SetParent(window->hWnd, (HWND)render_spu_parent_window_id); 1679 1679 } 1680 1681 int renderspu_SystemInit() 1682 { 1683 return VINF_SUCCESS; 1684 } 1685 1686 int renderspu_SystemTerm() 1687 { 1688 return VINF_SUCCESS; 1689 } 1690 1691 void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext) 1692 { 1693 1694 }
Note:
See TracChangeset
for help on using the changeset viewer.