VirtualBox

Changeset 82408 in vbox for trunk/src


Ignore:
Timestamp:
Dec 5, 2019 11:42:25 AM (5 years ago)
Author:
vboxsync
Message:

Devices/Graphics: OpenGL backend: move a code block to where is belongs, use a helper to get the surface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp

    r82165 r82408  
    63286328    }
    63296329
     6330    /* Flush any shader changes; after (!) checking the vertex declarations to deal with pre-transformed vertices. */
     6331    if (pContext->pShaderContext)
     6332    {
     6333        uint32_t rtHeight = 0;
     6334
     6335        if (pContext->state.aRenderTargets[SVGA3D_RT_COLOR0] != SVGA_ID_INVALID)
     6336        {
     6337            PVMSVGA3DSURFACE pRenderTarget;
     6338            rc = vmsvga3dSurfaceFromSid(pState, pContext->state.aRenderTargets[SVGA3D_RT_COLOR0], &pRenderTarget);
     6339            AssertRCReturn(rc, rc);
     6340
     6341            rtHeight = pRenderTarget->paMipmapLevels[0].mipmapSize.height;
     6342        }
     6343
     6344        ShaderUpdateState(pContext->pShaderContext, rtHeight);
     6345    }
     6346
    63306347    /*
    63316348     * D3D and OpenGL have a different meaning of value zero for the vertex array stride:
     
    63966413            Assert(pVertexDivisor[iVertexDivisor].s.count == 1);
    63976414        }
    6398     }
    6399 
    6400     /* Flush any shader changes; after (!) checking the vertex declarations to deal with pre-transformed vertices. */
    6401     if (pContext->pShaderContext)
    6402     {
    6403         uint32_t rtHeight = 0;
    6404 
    6405         if (pContext->state.aRenderTargets[SVGA3D_RT_COLOR0] != SVGA_ID_INVALID)
    6406         {
    6407             PVMSVGA3DSURFACE pRenderTarget = pState->papSurfaces[pContext->state.aRenderTargets[SVGA3D_RT_COLOR0]];
    6408             rtHeight = pRenderTarget->paMipmapLevels[0].mipmapSize.height;
    6409         }
    6410 
    6411         ShaderUpdateState(pContext->pShaderContext, rtHeight);
    64126415    }
    64136416
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