VirtualBox

Changeset 45201 in vbox for trunk/src/VBox/GuestHost/OpenGL


Ignore:
Timestamp:
Mar 27, 2013 10:23:49 AM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: basics for BlitFramebuffer driver bugs work around

Location:
trunk/src/VBox/GuestHost/OpenGL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_blitter.h

    r45132 r45201  
    5454struct CR_BLITTER;
    5555
    56 typedef DECLCALLBACK(int) FNCRBLT_BLITTER(struct CR_BLITTER *pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags);
     56typedef DECLCALLBACK(int) FNCRBLT_BLITTER(struct CR_BLITTER *pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags);
    5757typedef FNCRBLT_BLITTER *PFNCRBLT_BLITTER;
    5858
    59 #define CRBLT_F_LINEAR    0x00000001
    60 #define CRBLT_F_OFFSCREEN 0x00000002
     59#define CRBLT_F_LINEAR            0x00000001
     60#define CRBLT_F_INVERT_SRC_YCOORDS 0x00000002
     61#define CRBLT_F_INVERT_DST_YCOORDS 0x00000004
     62#define CRBLT_F_INVERT_YCOORDS     (CRBLT_F_INVERT_SRC_YCOORDS | CRBLT_F_INVERT_DST_YCOORDS)
     63
     64#define CRBLT_FLAGS_FROM_FILTER(_f) ( ((_f) & GL_LINEAR) ? CRBLT_F_LINEAR : 0)
     65#define CRBLT_FILTER_FROM_FLAGS(_f) (((_f) & CRBLT_F_LINEAR) ? GL_LINEAR : GL_NEAREST)
    6166
    6267typedef struct CR_BLITTER_SPUITEM
     
    8590    CR_BLITTER_BUFFER Indicies;
    8691    RTRECTSIZE CurrentSetSize;
    87     CR_BLITTER_WINDOW *pCurrentMural;
     92    CR_BLITTER_WINDOW CurrentMural;
    8893    CR_BLITTER_CONTEXT CtxInfo;
    89     CR_BLITTER_CONTEXT *pRestoreCtxInfo;
    90     CR_BLITTER_WINDOW *pRestoreMural;
     94    const CR_BLITTER_CONTEXT *pRestoreCtxInfo;
     95    const CR_BLITTER_WINDOW *pRestoreMural;
    9196    int32_t i32MakeCurrentUserData;
    9297    SPUDispatchTable *pDispatch;
    9398} CR_BLITTER, *PCR_BLITTER;
    9499
    95 VBOXBLITTERDECL(int) CrBltInit(PCR_BLITTER pBlitter, CR_BLITTER_CONTEXT *pCtxBase, bool fCreateNewCtx, SPUDispatchTable *pDispatch);
     100DECLINLINE(GLboolean) CrBltIsInitialized(PCR_BLITTER pBlitter)
     101{
     102    return !!pBlitter->pDispatch;
     103}
     104
     105VBOXBLITTERDECL(int) CrBltInit(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pCtxBase, bool fCreateNewCtx, SPUDispatchTable *pDispatch);
    96106VBOXBLITTERDECL(void) CrBltTerm(PCR_BLITTER pBlitter);
    97107
     
    116126}
    117127
    118 VBOXBLITTERDECL(void) CrBltMuralSetCurrent(PCR_BLITTER pBlitter, CR_BLITTER_WINDOW *pMural);
    119 DECLINLINE(CR_BLITTER_WINDOW *) CrBltMuralGetCurrent(PCR_BLITTER pBlitter)
     128VBOXBLITTERDECL(void) CrBltMuralSetCurrent(PCR_BLITTER pBlitter, const CR_BLITTER_WINDOW *pMural);
     129DECLINLINE(const CR_BLITTER_WINDOW *) CrBltMuralGetCurrentInfo(PCR_BLITTER pBlitter)
    120130{
    121     return pBlitter->pCurrentMural;
     131    return &pBlitter->CurrentMural;
    122132}
    123133
    124134VBOXBLITTERDECL(void) CrBltLeave(PCR_BLITTER pBlitter);
    125 VBOXBLITTERDECL(int) CrBltEnter(PCR_BLITTER pBlitter, CR_BLITTER_CONTEXT *pRestoreCtxInfo, CR_BLITTER_WINDOW *pRestoreMural);
    126 VBOXBLITTERDECL(void) CrBltBlitTexMural(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags);
    127 VBOXBLITTERDECL(void) CrBltBlitTexTex(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *pSrcRect, VBOXVR_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags);
     135VBOXBLITTERDECL(int) CrBltEnter(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pRestoreCtxInfo, const CR_BLITTER_WINDOW *pRestoreMural);
     136VBOXBLITTERDECL(void) CrBltBlitTexMural(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags);
     137VBOXBLITTERDECL(void) CrBltBlitTexTex(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *pSrcRect, const VBOXVR_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags);
    128138VBOXBLITTERDECL(void) CrBltPresent(PCR_BLITTER pBlitter);
    129139/* */
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h

    r45148 r45201  
    1414#include "cr_glstate.h"
    1515#include "cr_vreg.h"
     16#include "cr_blitter.h"
    1617#include "spu_dispatch_table.h"
    1718
     
    320321     * we deal with the global RootVr data directly */
    321322    RTPOINT RootVrCurPoint;
     323
     324    CR_BLITTER Blitter;
    322325
    323326    /** configuration options */
  • trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp

    r45132 r45201  
    2929
    3030
    31 int CrBltInit(PCR_BLITTER pBlitter, CR_BLITTER_CONTEXT *pCtxBase, bool fCreateNewCtx, SPUDispatchTable *pDispatch)
    32 {
    33     memset(pBlitter, 0, sizeof (*pBlitter));
    34 
    35     pBlitter->pDispatch = pDispatch;
    36 
     31int CrBltInit(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pCtxBase, bool fCreateNewCtx, SPUDispatchTable *pDispatch)
     32{
    3733    if (pCtxBase->Base.id == 0 || pCtxBase->Base.id < -1)
    3834    {
     
    4137    }
    4238
     39    memset(pBlitter, 0, sizeof (*pBlitter));
     40
     41    pBlitter->pDispatch = pDispatch;
    4342    pBlitter->CtxInfo = *pCtxBase;
    4443    if (fCreateNewCtx)
     
    4746        if (!pBlitter->CtxInfo.Base.id)
    4847        {
     48            memset(pBlitter, 0, sizeof (*pBlitter));
    4949            crWarning("CreateContext failed!");
    5050            return VERR_GENERAL_FAILURE;
     
    6262}
    6363
    64 void CrBltMuralSetCurrent(PCR_BLITTER pBlitter, CR_BLITTER_WINDOW *pMural)
    65 {
    66     if (pBlitter->pCurrentMural == pMural)
    67         return;
    68 
    69     pBlitter->pCurrentMural = pMural;
     64void CrBltMuralSetCurrent(PCR_BLITTER pBlitter, const CR_BLITTER_WINDOW *pMural)
     65{
     66    if (pMural)
     67    {
     68        if (!memcmp(&pBlitter->CurrentMural, pMural, sizeof (pBlitter->CurrentMural)))
     69            return;
     70        memcpy(&pBlitter->CurrentMural, pMural, sizeof (pBlitter->CurrentMural));
     71    }
     72    else
     73    {
     74        if (!pBlitter->CurrentMural.Base.id)
     75            return;
     76        pBlitter->CurrentMural.Base.id = 0;
     77    }
     78
    7079    pBlitter->Flags.CurrentMuralChanged = 1;
    7180
     
    7988}
    8089
    81 #define CRBLT_FILTER_FROM_FLAGS(_f) (((_f) & CRBLT_F_LINEAR) ? GL_LINEAR : GL_NEAREST)
    82 
    83 static DECLCALLBACK(int) crBltBlitTexBufImplFbo(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags)
     90static DECLCALLBACK(int) crBltBlitTexBufImplFbo(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags)
    8491{
    8592    GLenum filter = CRBLT_FILTER_FROM_FLAGS(fFlags);
     
    9299        const RTRECT * pSrcRect = &paSrcRect[i];
    93100        const RTRECT * pDstRect = &paDstRect[i];
    94         if (CRBLT_F_OFFSCREEN & fFlags)
    95         {
    96             pBlitter->pDispatch->BlitFramebufferEXT(
    97                     pSrcRect->xLeft, pSrcRect->yTop, pSrcRect->xRight, pSrcRect->yBottom,
    98                     pDstRect->xLeft, pDstRect->yTop, pDstRect->xRight, pDstRect->yBottom,
     101        int32_t srcY1;
     102        int32_t srcY2;
     103        int32_t dstY1;
     104        int32_t dstY2;
     105        int32_t srcX1 = pSrcRect->xLeft;
     106        int32_t srcX2 = pSrcRect->xRight;
     107        int32_t dstX1 = pDstRect->xLeft;
     108        int32_t dstX2 = pDstRect->xRight;
     109
     110        if (CRBLT_F_INVERT_SRC_YCOORDS & fFlags)
     111        {
     112            srcY1 = pSrc->height - pSrcRect->yTop;
     113            srcY2 = pSrc->height - pSrcRect->yBottom;
     114        }
     115        else
     116        {
     117            srcY1 = pSrcRect->yTop;
     118            srcY2 = pSrcRect->yBottom;
     119        }
     120
     121        if (CRBLT_F_INVERT_DST_YCOORDS & fFlags)
     122        {
     123            dstY1 = pDstSize->cy - pDstRect->yTop;
     124            dstY2 = pDstSize->cy - pDstRect->yBottom;
     125        }
     126        else
     127        {
     128            dstY1 = pDstRect->yTop;
     129            dstY2 = pDstRect->yBottom;
     130        }
     131
     132        if (srcY1 > srcY2)
     133        {
     134            if (dstY1 > dstY2)
     135            {
     136                /* use srcY1 < srcY2 && dstY1 < dstY2 whenever possible to avoid GPU driver bugs */
     137                int32_t tmp = srcY1;
     138                srcY1 = srcY2;
     139                srcY2 = tmp;
     140                tmp = dstY1;
     141                dstY1 = dstY2;
     142                dstY2 = tmp;
     143            }
     144        }
     145
     146        if (srcX1 > srcX2)
     147        {
     148            if (dstX1 > dstX2)
     149            {
     150                /* use srcX1 < srcX2 && dstX1 < dstX2 whenever possible to avoid GPU driver bugs */
     151                int32_t tmp = srcX1;
     152                srcX1 = srcX2;
     153                srcX2 = tmp;
     154                tmp = dstX1;
     155                dstX1 = dstX2;
     156                dstX2 = tmp;
     157            }
     158        }
     159
     160        pBlitter->pDispatch->BlitFramebufferEXT(srcX1, srcY1, srcX2, srcY2,
     161                    dstX1, dstY1, dstX2, dstY2,
    99162                    GL_COLOR_BUFFER_BIT, filter);
    100         }
    101         else
    102         {
    103             int32_t srcY1 = pSrc->height - pSrcRect->yTop;
    104             int32_t srcY2 = pSrc->height - pSrcRect->yBottom;
    105             int32_t dstY1 = pDstSize->cy - pDstRect->yTop;
    106             int32_t dstY2 = pDstSize->cy - pDstRect->yBottom;
    107             if (srcY1 > srcY2)
    108             {
    109                 if (dstY1 > dstY2)
    110                 {
    111                     /* use srcY1 < srcY2 && dstY1 < dstY2 whenever possible to avoid GPU driver bugs */
    112                     int32_t tmp = srcY1;
    113                     srcY1 = srcY2;
    114                     srcY2 = tmp;
    115                     tmp = dstY1;
    116                     dstY1 = dstY2;
    117                     dstY2 = tmp;
    118                 }
    119             }
    120             pBlitter->pDispatch->BlitFramebufferEXT(
    121                     pSrcRect->xLeft, srcY1, pSrcRect->xRight, srcY2,
    122                     pDstRect->xLeft, dstY1, pDstRect->xRight, dstY2,
    123                     GL_COLOR_BUFFER_BIT, filter);
    124         }
    125163    }
    126164
     
    271309static void crBltCheckSetupViewport(PCR_BLITTER pBlitter, const RTRECTSIZE *pDstSize, bool fFBODraw)
    272310{
    273     if (!pBlitter->Flags.LastWasFBODraw != !fFBODraw
    274             || pBlitter->Flags.CurrentMuralChanged
    275             || pBlitter->CurrentSetSize.cx != pDstSize->cx
     311    bool fUpdateViewport = pBlitter->Flags.CurrentMuralChanged;
     312    if (pBlitter->CurrentSetSize.cx != pDstSize->cx
    276313            || pBlitter->CurrentSetSize.cy != pDstSize->cy)
    277314    {
    278 #if 0
    279         const GLdouble aProjection[] =
    280         {
    281                 2.0 / pDstSize->cx,               0.0,  0.0, 0.0,
    282                               0.0, 2.0 / pDstSize->cy,  0.0, 0.0,
    283                               0.0,               0.0,  2.0, 0.0,
    284                              -1.0,              -1.0, -1.0, 1.0
    285         };
    286         pBlitter->pDispatch->MatrixMode(GL_PROJECTION);
    287         pBlitter->pDispatch->LoadMatrixd(aProjection);
    288         pBlitter->pDispatch->Viewport(0, 0, pDstSize->cx, pDstSize->cy);
    289 #else
     315        pBlitter->CurrentSetSize = *pDstSize;
    290316        pBlitter->pDispatch->MatrixMode(GL_PROJECTION);
    291317        pBlitter->pDispatch->LoadIdentity();
    292         pBlitter->pDispatch->Viewport(0, 0, pDstSize->cx, pDstSize->cy);
    293318        pBlitter->pDispatch->Ortho(0, pDstSize->cx, 0, pDstSize->cy, -1, 1);
    294         pBlitter->pDispatch->MatrixMode(GL_TEXTURE);
    295         pBlitter->pDispatch->LoadIdentity();
    296         pBlitter->pDispatch->MatrixMode(GL_MODELVIEW);
    297         pBlitter->pDispatch->LoadIdentity();
    298 
    299         /* Clear background to transparent */
    300         pBlitter->pDispatch->ClearColor(0.0f, 0.0f, 0.0f, 0.0f);
    301 #endif
    302         pBlitter->CurrentSetSize.cx = pDstSize->cx;
    303         pBlitter->CurrentSetSize.cy = pDstSize->cy;
    304         pBlitter->Flags.LastWasFBODraw = fFBODraw;
    305         if (!fFBODraw)
    306             pBlitter->Flags.CurrentMuralChanged = 0;
    307     }
    308 }
    309 
    310 static DECLCALLBACK(int) crBltBlitTexBufImplDraw2D(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags)
     319        fUpdateViewport = true;
     320    }
     321
     322    if (fUpdateViewport)
     323    {
     324        pBlitter->pDispatch->Viewport(0, 0, pBlitter->CurrentSetSize.cx, pBlitter->CurrentSetSize.cy);
     325        pBlitter->Flags.CurrentMuralChanged = 0;
     326    }
     327
     328    pBlitter->Flags.LastWasFBODraw = fFBODraw;
     329}
     330
     331static DECLCALLBACK(int) crBltBlitTexBufImplDraw2D(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags)
    311332{
    312333    GLuint normalX, normalY;
    313     uint32_t height = (fFlags & CRBLT_F_OFFSCREEN) ? 0 : pDstSize->cy;
     334    uint32_t srcHeight = (fFlags & CRBLT_F_INVERT_SRC_YCOORDS) ? pSrc->height : 0;
     335    uint32_t dstHeight = (fFlags & CRBLT_F_INVERT_DST_YCOORDS) ? pDstSize->cy : 0;
     336    Assert(srcHeight == dstHeight);
    314337
    315338    switch (pSrc->target)
     
    343366    {
    344367        /* just optimizatino to draw a single rect with GL_TRIANGLE_FAN */
    345         bool bUseSameVerticies = paSrcRect == paDstRect && normalX == 1 && normalY == 1;
     368        bool bUseSameVerticies = paSrcRect == paDstRect && normalX == 1 && normalY == 1 && srcHeight == dstHeight;
    346369        GLfloat *pVerticies;
    347370        GLfloat *pTexCoords;
     
    350373        {
    351374            pVerticies = (GLfloat*)crBltBufGet(&pBlitter->Verticies, cElements * 2 * sizeof (*pVerticies));
    352             crBltVtRectTFNormalized(paDstRect, normalX, normalY, pVerticies, height);
     375            crBltVtRectTFNormalized(paDstRect, normalX, normalY, pVerticies, dstHeight);
    353376            pTexCoords = pVerticies;
    354377        }
     
    356379        {
    357380            pVerticies = (GLfloat*)crBltBufGet(&pBlitter->Verticies, cElements * 2 * 2 * sizeof (*pVerticies));
    358             pTexCoords = crBltVtRectTFNormalized(paDstRect, 1, 1, pVerticies, height);
    359             crBltVtRectTFNormalized(paSrcRect, normalX, normalY, pTexCoords, height);
     381            pTexCoords = crBltVtRectTFNormalized(paDstRect, 1, 1, pVerticies, dstHeight);
     382            crBltVtRectTFNormalized(paSrcRect, normalX, normalY, pTexCoords, srcHeight);
    360383        }
    361384
     
    377400    else
    378401    {
    379         bool bUseSameVerticies = paSrcRect == paDstRect && normalX == 1 && normalY == 1;
     402        bool bUseSameVerticies = paSrcRect == paDstRect && normalX == 1 && normalY == 1 && srcHeight == dstHeight;
    380403        GLfloat *pVerticies;
    381404        GLfloat *pTexCoords;
     
    387410        {
    388411            pVerticies = (GLfloat*)crBltBufGet(&pBlitter->Verticies, cElements * 2 * sizeof (*pVerticies) + cIndicies * sizeof (*pIndicies));
    389             crBltVtRectsITNormalized(paDstRect, cRects, normalX, normalY, pVerticies, &pIndicies, &iIdxBase, height);
     412            crBltVtRectsITNormalized(paDstRect, cRects, normalX, normalY, pVerticies, &pIndicies, &iIdxBase, dstHeight);
    390413            pTexCoords = pVerticies;
    391414        }
     
    393416        {
    394417            pVerticies = (GLfloat*)crBltBufGet(&pBlitter->Verticies, cElements * 2 * 2 * sizeof (*pVerticies) + cIndicies * sizeof (*pIndicies));
    395             pTexCoords = crBltVtRectsITNormalized(paDstRect, cRects, 1, 1, pVerticies, &pIndicies, &iIdxBase, height);
    396             crBltVtRectsITNormalized(paSrcRect, cRects, normalX, normalY, pTexCoords, NULL, NULL, height);
     418            pTexCoords = crBltVtRectsITNormalized(paDstRect, cRects, 1, 1, pVerticies, &pIndicies, &iIdxBase, dstHeight);
     419            crBltVtRectsITNormalized(paSrcRect, cRects, normalX, normalY, pTexCoords, NULL, NULL, srcHeight);
    397420        }
    398421
     
    441464    }
    442465
     466    /* defaults. but just in case */
     467    pBlitter->pDispatch->MatrixMode(GL_TEXTURE);
     468    pBlitter->pDispatch->LoadIdentity();
     469    pBlitter->pDispatch->MatrixMode(GL_MODELVIEW);
     470    pBlitter->pDispatch->LoadIdentity();
     471
    443472    return VINF_SUCCESS;
    444473}
     
    459488    if (pBlitter->pRestoreCtxInfo != &pBlitter->CtxInfo)
    460489    {
    461 
    462         pBlitter->pDispatch->MakeCurrent(pBlitter->pRestoreMural->Base.id, 0,
    463                 pBlitter->pRestoreCtxInfo->Base.id >= 0
    464                     ? pBlitter->pRestoreCtxInfo->Base.id : pBlitter->pRestoreCtxInfo->Base.id);
     490        pBlitter->pDispatch->MakeCurrent(pBlitter->pRestoreMural->Base.id, 0, pBlitter->pRestoreCtxInfo->Base.id);
    465491    }
    466492    else
     
    472498}
    473499
    474 int CrBltEnter(PCR_BLITTER pBlitter, CR_BLITTER_CONTEXT *pRestoreCtxInfo, CR_BLITTER_WINDOW *pRestoreMural)
    475 {
    476     if (!pBlitter->pCurrentMural)
     500int CrBltEnter(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pRestoreCtxInfo, const CR_BLITTER_WINDOW *pRestoreMural)
     501{
     502    if (!pBlitter->CurrentMural.Base.id)
    477503    {
    478504        crWarning("current mural not initialized!");
     
    498524    }
    499525
    500     pBlitter->pDispatch->MakeCurrent(pBlitter->pCurrentMural->Base.id, pBlitter->i32MakeCurrentUserData, pBlitter->CtxInfo.Base.id);
     526    pBlitter->pDispatch->MakeCurrent(pBlitter->CurrentMural.Base.id, pBlitter->i32MakeCurrentUserData, pBlitter->CtxInfo.Base.id);
    501527
    502528    if (pBlitter->Flags.Initialized)
     
    515541}
    516542
    517 static void crBltBlitTexBuf(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, GLenum enmDstBuff, const RTRECTSIZE *pDstSize, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags)
     543static void crBltBlitTexBuf(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, GLenum enmDstBuff, const RTRECTSIZE *pDstSize, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags)
    518544{
    519545    pBlitter->pDispatch->DrawBuffer(enmDstBuff);
     
    521547    crBltCheckSetupViewport(pBlitter, pDstSize, enmDstBuff == GL_DRAW_FRAMEBUFFER);
    522548
    523     pBlitter->pfnBlt(pBlitter, pSrc, paSrcRects, pDstSize, paDstRects, cRects, fFlags & CRBLT_F_OFFSCREEN);
    524 }
    525 
    526 void CrBltBlitTexMural(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags)
    527 {
    528     RTRECTSIZE DstSize = {pBlitter->pCurrentMural->width, pBlitter->pCurrentMural->height};
     549    pBlitter->pfnBlt(pBlitter, pSrc, paSrcRects, pDstSize, paDstRects, cRects, fFlags);
     550}
     551
     552void CrBltBlitTexMural(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags)
     553{
     554    RTRECTSIZE DstSize = {pBlitter->CurrentMural.width, pBlitter->CurrentMural.height};
    529555
    530556    pBlitter->pDispatch->BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, 0);
    531557
    532     crBltBlitTexBuf(pBlitter, pSrc, paSrcRects, GL_BACK, &DstSize, paDstRects, cRects, fFlags & (~CRBLT_F_OFFSCREEN));
    533 }
    534 
    535 void CrBltBlitTexTex(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *pSrcRect, VBOXVR_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags)
     558    crBltBlitTexBuf(pBlitter, pSrc, paSrcRects, GL_BACK, &DstSize, paDstRects, cRects, fFlags);
     559}
     560
     561void CrBltBlitTexTex(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *pSrcRect, const VBOXVR_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags)
    536562{
    537563    RTRECTSIZE DstSize = {(uint32_t)pDst->width, (uint32_t)pDst->height};
     
    552578{
    553579    if (pBlitter->CtxInfo.Base.visualBits & CR_DOUBLE_BIT)
    554         pBlitter->pDispatch->SwapBuffers(pBlitter->pCurrentMural->Base.id, 0);
     580        pBlitter->pDispatch->SwapBuffers(pBlitter->CurrentMural.Base.id, 0);
    555581    else
    556582        pBlitter->pDispatch->Flush();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette