VirtualBox

Changeset 53400 in vbox for trunk


Ignore:
Timestamp:
Nov 26, 2014 11:25:27 AM (10 years ago)
Author:
vboxsync
Message:

Restore 3D state: fix SEGFAULT on X11 host (Linux): bind to corresponding (frame-, render-) buffer before put data into it (tested on X11 only).

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_diff.c

    r52263 r53400  
    308308        {
    309309            CRFBDataElement *el = &data->aElements[i];
     310            bool fUseRenderBuffer =
     311                (el->enmFormat == GL_STENCIL_INDEX || el->enmFormat == GL_DEPTH_COMPONENT || el->enmFormat == GL_DEPTH_STENCIL);
    310312#if 0
    311313            char fname[200];
     
    343345            }
    344346
    345             diff_api.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, el->idFBO);
     347            /* Bind to corresponding buffer. */
     348            if (fUseRenderBuffer)
     349                diff_api.BindRenderbufferEXT(GL_RENDERBUFFER_EXT, el->idFBO);
     350            else
     351                diff_api.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, el->idFBO);
    346352
    347353            if (el->enmBuffer)
     
    380386                diff_api.Disable(GL_STENCIL_TEST);
    381387            }
     388
     389            /* Bind to window system default buffer. */
     390            if (fUseRenderBuffer)
     391                diff_api.BindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
     392            else
     393                diff_api.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, 0);
    382394        }
    383395
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r53233 r53400  
    13621362    {
    13631363        pEl = &pData->aElements[pData->cElements];
    1364         pEl->idFBO = pMural && pMural->fRedirected ? pMural->aidFBOs[CR_SERVER_FBO_FB_IDX(pMural)] : 0;
     1364        pEl->idFBO = pMural->idDepthStencilRB;
    13651365        pEl->enmBuffer = 0; /* we do not care */
    13661366        pEl->posX = 0;
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