VirtualBox

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


Ignore:
Timestamp:
Mar 14, 2013 3:27:36 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: always use glDrawXxx for blitting to avoid GPU driver bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp

    r45027 r45042  
    101101        else
    102102        {
     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            }
    103120            pBlitter->pDispatch->BlitFramebufferEXT(
    104                     pSrcRect->xLeft, pSrc->height - pSrcRect->yTop, pSrcRect->xRight, pSrc->height - pSrcRect->yBottom,
    105                     pDstRect->xLeft, pDstSize->cy - pDstRect->yTop, pDstRect->xRight, pDstSize->cy - pDstRect->yBottom,
     121                    pSrcRect->xLeft, srcY1, pSrcRect->xRight, srcY2,
     122                    pDstRect->xLeft, dstY1, pDstRect->xRight, dstY2,
    106123                    GL_COLOR_BUFFER_BIT, filter);
    107124        }
     
    411428        crWarning("GL_EXT_framebuffer_object not supported, blitter can only blit to window");
    412429
    413     if (crStrstr(pszExtension, "GL_EXT_framebuffer_blit"))
     430    /* BlitFramebuffer seems to be buggy on Intel,
     431     * try always glDrawXxx for now */
     432    if (0 && crStrstr(pszExtension, "GL_EXT_framebuffer_blit"))
    414433    {
    415434        pBlitter->Flags.SupportsFBOBlit = 1;
     
    418437    else
    419438    {
    420         crWarning("GL_EXT_framebuffer_blit not supported, will use Draw functions for blitting, which might be less efficient");
     439//        crWarning("GL_EXT_framebuffer_blit not supported, will use Draw functions for blitting, which might be less efficient");
    421440        pBlitter->pfnBlt = crBltBlitTexBufImplDraw2D;
    422441    }
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