Changeset 44740 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
- Timestamp:
- Feb 18, 2013 5:02:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
r44529 r44740 20 20 #include "cr_string.h" 21 21 #include "cr_mem.h" 22 #include "cr_vreg.h" 22 23 #include "render/renderspu.h" 23 24 … … 315 316 CRASSERT(mural->aidFBOs[0]==0); 316 317 CRASSERT(mural->aidFBOs[1]==0); 318 CRASSERT(mural->width == mural->CEntry.Tex.width); 319 CRASSERT(mural->height == mural->CEntry.Tex.height); 317 320 318 321 pMuralContextInfo = cr_server.currentCtxInfo; … … 415 418 } 416 419 420 CRASSERT(mural->aidColorTexs[CR_SERVER_FBO_FB_IDX(mural)]); 421 CrVrScrCompositorEntryTexNameUpdate(&mural->CEntry, mural->aidColorTexs[CR_SERVER_FBO_FB_IDX(mural)]); 422 417 423 if (RestoreSpuWindow >= 0 && RestoreSpuContext >= 0) 418 424 { … … 512 518 GLuint idPBO; 513 519 CRContext *ctx = crStateGetCurrent(); 514 CR_BLITTER_TEXTURE Tex;520 VBOXVR_TEXTURE Tex; 515 521 516 522 CRASSERT(mural->fUseFBO); … … 524 530 if (!mural->width || !mural->height) 525 531 { 532 return; 533 } 534 535 if (!CrVrScrCompositorEntryIsInList(&mural->CEntry)) 536 return; 537 538 if (mural->fUseFBO == CR_SERVER_REDIR_FBO_BLT) 539 { 540 GLuint idDrawFBO, idReadFBO; 541 542 idDrawFBO = mural->aidFBOs[mural->iCurDrawBuffer]; 543 idReadFBO = mural->aidFBOs[mural->iCurReadBuffer]; 544 545 crStateSwitchPrepare(NULL, ctx, idDrawFBO, idReadFBO); 546 547 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, &mural->Compositor, &mural->CEntry); 548 549 crStateSwitchPostprocess(ctx, NULL, idDrawFBO, idReadFBO); 550 526 551 return; 527 552 } … … 532 557 Tex.hwid = mural->aidColorTexs[CR_SERVER_FBO_FB_IDX(mural)]; 533 558 CRASSERT(Tex.hwid); 534 535 if (mural->fUseFBO == CR_SERVER_REDIR_FBO_BLT)536 {537 int rc;538 PCR_BLITTER pBlitter = crServerGetFBOPresentBlitter(mural);539 if (!pBlitter)540 {541 static int cPrintedWarnings = 0;542 if (++cPrintedWarnings <= 5)543 {544 crWarning("crServerGetFBOPresentBlitter returned no blitter %d", cPrintedWarnings);545 if (cPrintedWarnings == 5)546 crWarning("won't print the above crServerGetFBOPresentBlitter warning any more", cPrintedWarnings);547 }548 return;549 }550 551 CrBltMuralSetCurrent(pBlitter, mural);552 rc = CrBltEnter(pBlitter, cr_server.currentCtxInfo, cr_server.currentMural);553 if (RT_SUCCESS(rc))554 {555 RTRECT Rect;556 Rect.xLeft = 0;557 Rect.yTop = 0;558 Rect.xRight = Tex.width;559 Rect.yBottom = Tex.height;560 561 CrBltBlitTexMural(pBlitter, &Tex, &Rect, &Rect, 1, 0);562 CrBltPresent(pBlitter);563 564 CrBltLeave(pBlitter);565 }566 else567 {568 crWarning("CrBltEnter failed rc %d", rc);569 return;570 }571 return;572 }573 559 574 560 if (cr_server.bUsePBOForReadback && !mural->idPBO) … … 687 673 cr_server.head_spu->dispatch_table.BindFramebufferEXT(GL_READ_FRAMEBUFFER, mural->aidFBOs[mural->iCurReadBuffer]); 688 674 } 689 } 675 Assert(mural->aidColorTexs[CR_SERVER_FBO_FB_IDX(mural)]); 676 CrVrScrCompositorEntryTexNameUpdate(&mural->CEntry, mural->aidColorTexs[CR_SERVER_FBO_FB_IDX(mural)]); 677 }
Note:
See TracChangeset
for help on using the changeset viewer.