VirtualBox

Changeset 104813 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 29, 2024 6:39:22 PM (6 months ago)
Author:
vboxsync
Message:

Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp: removed obsolete code which used multiple D3D11 devices: cleanup. bugref:9830

File:
1 edited

Legend:

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

    r104812 r104813  
    311311typedef struct VMSVGA3DBACKENDDXCONTEXT
    312312{
    313     DXDEVICE                   dxDevice;               /* DX device interfaces for this context operations. */
    314 
    315313    /* Arrays for Context-Object Tables. Number of entries depends on COTable size. */
    316314    uint32_t                   cBlendState;            /* Number of entries in the papBlendState array. */
     
    11711169    int rc = VINF_SUCCESS;
    11721170
    1173     if (pBackend->dxDevice.pDevice)
    1174     {
    1175         pDXDevice->pDevice = pBackend->dxDevice.pDevice;
    1176         pDXDevice->pDevice->AddRef();
    1177 
    1178         pDXDevice->pImmediateContext = pBackend->dxDevice.pImmediateContext;
    1179         pDXDevice->pImmediateContext->AddRef();
    1180 
    1181         pDXDevice->pDxgiFactory = pBackend->dxDevice.pDxgiFactory;
    1182         pDXDevice->pDxgiFactory->AddRef();
    1183 
    1184         pDXDevice->FeatureLevel = pBackend->dxDevice.FeatureLevel;
    1185 
    1186         pDXDevice->pVideoDevice = pBackend->dxDevice.pVideoDevice;
    1187         if (pDXDevice->pVideoDevice)
    1188             pDXDevice->pVideoDevice->AddRef();
    1189 
    1190         pDXDevice->pVideoContext = pBackend->dxDevice.pVideoContext;
    1191         if (pDXDevice->pVideoContext)
    1192             pDXDevice->pVideoContext->AddRef();
    1193 
    1194 #ifdef DX_COMMON_STAGING_BUFFER
    1195         pDXDevice->pStagingBuffer = 0;
    1196         pDXDevice->cbStagingBuffer = 0;
    1197 #endif
    1198 
    1199         BlitInit(&pDXDevice->Blitter, pDXDevice->pDevice, pDXDevice->pImmediateContext);
    1200         return rc;
    1201     }
    1202 
    12031171    IDXGIAdapter *pAdapter = NULL; /* Default adapter. */
    12041172    static D3D_FEATURE_LEVEL const s_aFeatureLevels[] =
     
    14571425
    14581426
    1459 /// @todo Rename, parameters
    1460 static DXDEVICE *dxDeviceFromCid(uint32_t cid, PVMSVGA3DSTATE pState)
    1461 {
    1462     RT_NOREF(cid);
    1463     return &pState->pBackend->dxDevice;
    1464 }
    1465 
    1466 
    1467 /// @todo Rename, parameters
    1468 static DXDEVICE *dxDeviceFromContext(PVMSVGA3DSTATE p3dState, VMSVGA3DDXCONTEXT *pDXContext)
    1469 {
    1470     RT_NOREF(pDXContext);
     1427static DXDEVICE *dxDeviceGet(PVMSVGA3DSTATE p3dState)
     1428{
    14711429    DXDEVICE *pDXDevice = &p3dState->pBackend->dxDevice;
    14721430#ifdef DEBUG
     
    15021460
    15031461
    1504 /// @todo Parameters
    1505 static ID3D11Resource *dxResource(PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface, VMSVGA3DDXCONTEXT *pDXContext)
    1506 {
    1507     RT_NOREF(pState, pDXContext);
     1462static ID3D11Resource *dxResource(PVMSVGA3DSURFACE pSurface)
     1463{
    15081464    VMSVGA3DBACKENDSURFACE *pBackendSurface = pSurface->pBackendSurface;
    15091465    if (!pBackendSurface)
    15101466        AssertFailedReturn(NULL);
    1511 
    15121467    return pBackendSurface->u.pResource;
    15131468}
     
    18511806
    18521807
    1853 static HRESULT dxRenderTargetViewCreate(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGACOTableDXRTViewEntry const *pEntry, VMSVGA3DSURFACE *pSurface, ID3D11RenderTargetView **pp)
    1854 {
    1855     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
    1856 
    1857     ID3D11Resource *pResource = dxResource(pThisCC->svga.p3dState, pSurface, pDXContext);
     1808static HRESULT dxRenderTargetViewCreate(PVGASTATECC pThisCC, SVGACOTableDXRTViewEntry const *pEntry, VMSVGA3DSURFACE *pSurface, ID3D11RenderTargetView **pp)
     1809{
     1810    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
     1811
     1812    ID3D11Resource *pResource = dxResource(pSurface);
    18581813
    18591814    D3D11_RENDER_TARGET_VIEW_DESC desc;
     
    19281883
    19291884
    1930 static HRESULT dxShaderResourceViewCreate(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGACOTableDXSRViewEntry const *pEntry, VMSVGA3DSURFACE *pSurface, ID3D11ShaderResourceView **pp)
    1931 {
    1932     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
    1933 
    1934     ID3D11Resource *pResource = dxResource(pThisCC->svga.p3dState, pSurface, pDXContext);
     1885static HRESULT dxShaderResourceViewCreate(PVGASTATECC pThisCC, SVGACOTableDXSRViewEntry const *pEntry, VMSVGA3DSURFACE *pSurface, ID3D11ShaderResourceView **pp)
     1886{
     1887    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
     1888
     1889    ID3D11Resource *pResource = dxResource(pSurface);
    19351890
    19361891    D3D11_SHADER_RESOURCE_VIEW_DESC desc;
     
    20201975
    20211976
    2022 static HRESULT dxUnorderedAccessViewCreate(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGACOTableDXUAViewEntry const *pEntry, VMSVGA3DSURFACE *pSurface, ID3D11UnorderedAccessView **pp)
    2023 {
    2024     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
    2025 
    2026     ID3D11Resource *pResource = dxResource(pThisCC->svga.p3dState, pSurface, pDXContext);
     1977static HRESULT dxUnorderedAccessViewCreate(PVGASTATECC pThisCC, SVGACOTableDXUAViewEntry const *pEntry, VMSVGA3DSURFACE *pSurface, ID3D11UnorderedAccessView **pp)
     1978{
     1979    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
     1980
     1981    ID3D11Resource *pResource = dxResource(pSurface);
    20271982
    20281983    D3D11_UNORDERED_ACCESS_VIEW_DESC desc;
     
    20822037
    20832038
    2084 static HRESULT dxDepthStencilViewCreate(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGACOTableDXDSViewEntry const *pEntry, VMSVGA3DSURFACE *pSurface, ID3D11DepthStencilView **pp)
    2085 {
    2086     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
    2087 
    2088     ID3D11Resource *pResource = dxResource(pThisCC->svga.p3dState, pSurface, pDXContext);
     2039static HRESULT dxDepthStencilViewCreate(PVGASTATECC pThisCC, SVGACOTableDXDSViewEntry const *pEntry, VMSVGA3DSURFACE *pSurface, ID3D11DepthStencilView **pp)
     2040{
     2041    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
     2042
     2043    ID3D11Resource *pResource = dxResource(pSurface);
    20892044
    20902045    D3D11_DEPTH_STENCIL_VIEW_DESC desc;
     
    21392094static HRESULT dxShaderCreate(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, DXSHADER *pDXShader)
    21402095{
    2141     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     2096    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    21422097
    21432098    HRESULT hr = S_OK;
     
    22012156static void dxShaderSet(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderType type, DXSHADER *pDXShader)
    22022157{
    2203     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     2158    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    22042159
    22052160    switch (type)
     
    22142169        {
    22152170            Assert(!pDXShader || (pDXShader->soid == pDXContext->svgaDXContext.streamOut.soid));
     2171            RT_NOREF(pDXContext);
    22162172            pDevice->pImmediateContext->GSSetShader(pDXShader ? pDXShader->pGeometryShader : NULL, NULL, 0);
    22172173        } break;
     
    23512307
    23522308    return BindFlags;
    2353 }
    2354 
    2355 
    2356 /// @todo Parameters
    2357 static DXDEVICE *dxSurfaceDevice(PVMSVGA3DSTATE p3dState, PVMSVGA3DSURFACE pSurface, PVMSVGA3DDXCONTEXT pDXContext, UINT *pMiscFlags)
    2358 {
    2359     RT_NOREF(pSurface, pDXContext);
    2360     *pMiscFlags = 0;
    2361     return &p3dState->pBackend->dxDevice;
    23622309}
    23632310
     
    24822429
    24832430
    2484 static int vmsvga3dBackSurfaceCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSURFACE pSurface)
     2431static int vmsvga3dBackSurfaceCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DSURFACE pSurface)
    24852432{
    24862433    PVMSVGA3DSTATE p3dState = pThisCC->svga.p3dState;
     
    24902437    AssertReturn(pBackend, VERR_INVALID_STATE);
    24912438
    2492     UINT MiscFlags;
    2493     DXDEVICE *pDXDevice = dxSurfaceDevice(p3dState, pSurface, pDXContext, &MiscFlags);
     2439    UINT MiscFlags = 0;
     2440    DXDEVICE *pDXDevice = &p3dState->pBackend->dxDevice;
    24942441    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    24952442
     
    28252772static int vmsvga3dBackSurfaceCreateBuffer(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSURFACE pSurface)
    28262773{
    2827     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     2774    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    28282775    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    28292776
     
    29152862#endif
    29162863
    2917 static int vmsvga3dBackSurfaceCreateSoBuffer(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSURFACE pSurface)
    2918 {
    2919     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     2864static int vmsvga3dBackSurfaceCreateSoBuffer(PVGASTATECC pThisCC, PVMSVGA3DSURFACE pSurface)
     2865{
     2866    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    29202867    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    29212868
     
    29892936static int vmsvga3dBackSurfaceCreateConstantBuffer(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSURFACE pSurface, uint32_t offsetInBytes, uint32_t sizeInBytes)
    29902937{
    2991     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     2938    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    29922939    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    29932940
     
    30543001#endif
    30553002
    3056 static int vmsvga3dBackSurfaceCreateResource(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSURFACE pSurface)
    3057 {
    3058     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     3003static int vmsvga3dBackSurfaceCreateResource(PVGASTATECC pThisCC, PVMSVGA3DSURFACE pSurface)
     3004{
     3005    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    30593006    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    30603007
     
    31953142
    31963143
    3197 static int dxEnsureResource(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t sid,
     3144static int dxEnsureResource(PVGASTATECC pThisCC, uint32_t sid,
    31983145                            PVMSVGA3DSURFACE *ppSurface, ID3D11Resource **ppResource)
    31993146{
     
    32083155        /** @todo One function to create all resources from surfaces. */
    32093156        if (pSurface->format != SVGA3D_BUFFER)
    3210             rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDXContext, pSurface);
     3157            rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pSurface);
    32113158        else
    3212             rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDXContext, pSurface);
     3159            rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pSurface);
    32133160
    32143161        AssertRCReturn(rc, rc);
     
    32163163    }
    32173164
    3218     ID3D11Resource *pResource = dxResource(pThisCC->svga.p3dState, pSurface, pDXContext);
     3165    ID3D11Resource *pResource = dxResource(pSurface);
    32193166    AssertReturn(pResource, VERR_INVALID_STATE);
    32203167
     
    36123559    ASSERT_GUEST_RETURN(RT_SUCCESS(rc), rc);
    36133560
    3614     /* A surface is always mapped by the DX context which has created the surface. */
    3615     DXDEVICE *pDevice = dxDeviceFromCid(pSurface->idAssociatedContext, pState);
    3616     AssertReturn(pDevice && pDevice->pDevice, VERR_INVALID_STATE);
     3561    DXDEVICE *pDevice = &pBackend->dxDevice;
     3562    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    36173563
    36183564    SVGA3dBox clipBox;
     
    38073753    ASSERT_GUEST_RETURN(RT_SUCCESS(rc), rc);
    38083754
    3809     /* A surface is always mapped by the DX context which has created the surface. */
    3810     DXDEVICE *pDevice = dxDeviceFromCid(pSurface->idAssociatedContext, pState);
    3811     AssertReturn(pDevice && pDevice->pDevice, VERR_INVALID_STATE);
     3755    DXDEVICE *pDevice = &pBackend->dxDevice;
     3756    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    38123757
    38133758    if (   pBackendSurface->enmResType == VMSVGA3D_RESTYPE_TEXTURE_1D
     
    39713916        {
    39723917            /* Create the actual texture. */
    3973             rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, NULL, pSurface);
     3918            rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pSurface);
    39743919            AssertRCReturn(rc, rc);
    39753920        }
     
    46564601             pDstSurface->pBackendSurface ? "" : " sysmem", pDstSurface->id));
    46574602
    4658     //DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     4603    //DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    46594604    //AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    46604605
     
    46634608        if (pDstSurface->pBackendSurface == NULL)
    46644609        {
    4665             rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, NULL, pDstSurface);
     4610            rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDstSurface);
    46664611            AssertRCReturn(rc, rc);
    46674612        }
     
    47024647            ID3D11Resource *pDstResource;
    47034648            ID3D11Resource *pSrcResource;
    4704             pDstResource = dxResource(pState, pDstSurface, NULL);
    4705             pSrcResource = dxResource(pState, pSrcSurface, NULL);
     4649            pDstResource = dxResource(pDstSurface);
     4650            pSrcResource = dxResource( pSrcSurface);
    47064651
    47074652            pDXDevice->pImmediateContext->CopySubresourceRegion(pDstResource, DstSubresource, DstX, DstY, DstZ,
     
    53885333static DECLCALLBACK(int) vmsvga3dBackDXDefineContext(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext)
    53895334{
    5390     PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
     5335    RT_NOREF(pThisCC);
    53915336
    53925337    /* Allocate a backend specific context structure. */
     
    53965341
    53975342    LogFunc(("cid %d\n", pDXContext->cid));
    5398 
    5399     int rc = dxDeviceCreate(pBackend, &pBackendDXContext->dxDevice);
    5400     return rc;
     5343    return VINF_SUCCESS;
    54015344}
    54025345
     
    54105353    if (pDXContext->pBackendDXContext)
    54115354    {
     5355        /* Make sure that any pending draw calls are finished. */
     5356        dxDeviceFlush(&pBackend->dxDevice);
     5357
    54125358        /* Clean up context resources. */
    54135359        VMSVGA3DBACKENDDXCONTEXT *pBackendDXContext = pDXContext->pBackendDXContext;
     
    54185364            D3D_RELEASE_ARRAY(RT_ELEMENTS(pBackendDXContext->resources.shaderState[idxShaderState].constantBuffers), papConstantBuffer);
    54195365        }
    5420 
    5421         if (pBackendDXContext->dxDevice.pImmediateContext)
    5422             dxDeviceFlush(&pBackendDXContext->dxDevice); /* Make sure that any pending draw calls are finished. */
    54235366
    54245367        if (pBackendDXContext->paRenderTargetView)
     
    55155458        RTMemFreeZ(pBackendDXContext->paVideoProcessorOutputView, sizeof(pBackendDXContext->paVideoProcessorOutputView[0]) * pBackendDXContext->cVideoProcessorOutputView);
    55165459
    5517         dxDeviceDestroy(pBackend, &pBackendDXContext->dxDevice);
    5518 
    55195460        RTMemFreeZ(pBackendDXContext, sizeof(*pBackendDXContext));
    55205461        pDXContext->pBackendDXContext = NULL;
     
    55635504    RT_NOREF(pBackend);
    55645505
    5565     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     5506    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    55665507    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    55675508
     
    56385579static int dxSetShaderResources(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderType type)
    56395580{
    5640     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     5581    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    56415582    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    56425583
     
    56775618{
    56785619    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    5679     RT_NOREF(pBackend);
    5680 
    5681     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     5620    RT_NOREF(pBackend, pDXContext);
     5621
     5622    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    56825623    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    56835624
     
    56935634    RT_NOREF(pBackend);
    56945635
    5695     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     5636    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    56965637    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    56975638
     
    59385879static void dxCreateInputLayout(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dElementLayoutId elementLayoutId, DXSHADER *pDXShader)
    59395880{
    5940     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     5881    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    59415882    AssertReturnVoid(pDevice->pDevice);
    59425883
     
    59855926//DEBUG_BREAKPOINT_TEST();
    59865927    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    5987     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     5928    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    59885929    VMSVGA3DBACKENDDXCONTEXT *pBackendDXContext = pDXContext->pBackendDXContext;
    59895930
     
    60535994            PVMSVGA3DSURFACE pSurface;
    60545995            ID3D11Resource *pResource;
    6055             int rc = dxEnsureResource(pThisCC, pDXContext, pBufferPipeline->bufferId, &pSurface, &pResource);
     5996            int rc = dxEnsureResource(pThisCC, pBufferPipeline->bufferId, &pSurface, &pResource);
    60565997            if (   RT_SUCCESS(rc)
    60575998                && pSurface->pBackendSurface->enmResType == VMSVGA3D_RESTYPE_BUFFER)
     
    60756016    }
    60766017
    6077     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     6018    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    60786019    LogFunc(("idxMinSlot = %d, idxMaxSlot = %d\n", idxMinSlot, idxMaxSlot));
    60796020    if (idxMaxSlot >= 0)
     
    61146055        PVMSVGA3DSURFACE pSurface;
    61156056        ID3D11Resource *pResource;
    6116         int rc = dxEnsureResource(pThisCC, pDXContext, pPipelineState->inputAssembly.indexBufferSid, &pSurface, &pResource);
     6057        int rc = dxEnsureResource(pThisCC, pPipelineState->inputAssembly.indexBufferSid, &pSurface, &pResource);
    61176058        if (   RT_SUCCESS(rc)
    61186059            && pSurface->pBackendSurface->enmResType == VMSVGA3D_RESTYPE_BUFFER)
     
    61366077    }
    61376078
    6138     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     6079    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    61396080    pDXDevice->pImmediateContext->IASetIndexBuffer(pBuffer, enmDxgiFormat, Offset);
    61406081}
     
    63696310static void dxDbgDumpIndexedVertexData(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t indexCount, uint32_t startIndexLocation, int32_t baseVertexLocation)
    63706311{
    6371     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     6312    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    63726313
    63736314    uint32_t const indexBufferSid = pDXContext->svgaDXContext.inputAssembly.indexBufferSid;
     
    65606501    PVMSVGA3DSURFACE pSurface;
    65616502    ID3D11Resource *pResource;
    6562     int rc = dxEnsureResource(pThisCC, pDXContext, pEntry->sid, &pSurface, &pResource);
     6503    int rc = dxEnsureResource(pThisCC, pEntry->sid, &pSurface, &pResource);
    65636504    AssertRCReturn(rc, rc);
    65646505
     
    65676508
    65686509    ID3D11RenderTargetView *pRenderTargetView;
    6569     HRESULT hr = dxRenderTargetViewCreate(pThisCC, pDXContext, pEntry, pSurface, &pRenderTargetView);
     6510    HRESULT hr = dxRenderTargetViewCreate(pThisCC, pEntry, pSurface, &pRenderTargetView);
    65706511    AssertReturn(SUCCEEDED(hr), VERR_INVALID_STATE);
    65716512
     
    65946535    PVMSVGA3DSURFACE pSurface;
    65956536    ID3D11Resource *pResource;
    6596     int rc = dxEnsureResource(pThisCC, pDXContext, pEntry->sid, &pSurface, &pResource);
     6537    int rc = dxEnsureResource(pThisCC, pEntry->sid, &pSurface, &pResource);
    65976538    AssertRCReturn(rc, rc);
    65986539
     
    66016542
    66026543    ID3D11DepthStencilView *pDepthStencilView;
    6603     HRESULT hr = dxDepthStencilViewCreate(pThisCC, pDXContext, pEntry, pSurface, &pDepthStencilView);
     6544    HRESULT hr = dxDepthStencilViewCreate(pThisCC, pEntry, pSurface, &pDepthStencilView);
    66046545    AssertReturn(SUCCEEDED(hr), VERR_INVALID_STATE);
    66056546
     
    66286569    PVMSVGA3DSURFACE pSurface;
    66296570    ID3D11Resource *pResource;
    6630     int rc = dxEnsureResource(pThisCC, pDXContext, pEntry->sid, &pSurface, &pResource);
     6571    int rc = dxEnsureResource(pThisCC, pEntry->sid, &pSurface, &pResource);
    66316572    AssertRCReturn(rc, rc);
    66326573
     
    66356576
    66366577    ID3D11ShaderResourceView *pShaderResourceView;
    6637     HRESULT hr = dxShaderResourceViewCreate(pThisCC, pDXContext, pEntry, pSurface, &pShaderResourceView);
     6578    HRESULT hr = dxShaderResourceViewCreate(pThisCC, pEntry, pSurface, &pShaderResourceView);
    66386579    AssertReturn(SUCCEEDED(hr), VERR_INVALID_STATE);
    66396580
     
    66626603    PVMSVGA3DSURFACE pSurface;
    66636604    ID3D11Resource *pResource;
    6664     int rc = dxEnsureResource(pThisCC, pDXContext, pEntry->sid, &pSurface, &pResource);
     6605    int rc = dxEnsureResource(pThisCC, pEntry->sid, &pSurface, &pResource);
    66656606    AssertRCReturn(rc, rc);
    66666607
     
    66696610
    66706611    ID3D11UnorderedAccessView *pUnorderedAccessView;
    6671     HRESULT hr = dxUnorderedAccessViewCreate(pThisCC, pDXContext, pEntry, pSurface, &pUnorderedAccessView);
     6612    HRESULT hr = dxUnorderedAccessViewCreate(pThisCC, pEntry, pSurface, &pUnorderedAccessView);
    66726613    AssertReturn(SUCCEEDED(hr), VERR_INVALID_STATE);
    66736614
     
    67016642
    67026643    /* Unbind render target views because they mught be (re-)used as shader resource views. */
    6703     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     6644    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    67046645    pDXDevice->pImmediateContext->OMSetRenderTargetsAndUnorderedAccessViews(0, NULL, NULL, 0, 0, NULL, NULL);
    67056646    for (unsigned i = 0; i < SVGA3D_DX11_1_MAX_UAVIEWS; ++i)
     
    67876728     */
    67886729
    6789     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     6730    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    67906731    AssertReturnVoid(pDevice->pDevice);
    67916732
     
    70166957    RT_NOREF(pBackend);
    70176958
    7018     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     6959    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    70196960    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    70206961
     
    73367277    RT_NOREF(pBackend);
    73377278
    7338     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7279    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    73397280    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    73407281
     
    73677308    RT_NOREF(pBackend);
    73687309
    7369     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7310    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    73707311    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    73717312
     
    73957336    RT_NOREF(pBackend);
    73967337
    7397     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7338    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    73987339    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    73997340
     
    74227363    RT_NOREF(pBackend);
    74237364
    7424     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7365    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    74257366    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    74267367
     
    74427383{
    74437384    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    7444     RT_NOREF(pBackend);
    7445 
    7446     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7385    RT_NOREF(pBackend, pDXContext);
     7386
     7387    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    74477388    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    74487389
     
    75247465{
    75257466    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    7526     RT_NOREF(pBackend);
    7527 
    7528     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7467    RT_NOREF(pBackend, pDXContext);
     7468
     7469    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    75297470    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    75307471
     
    75377478static int dxSetRenderTargets(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext)
    75387479{
    7539     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7480    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    75407481    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    75417482
     
    76007541{
    76017542    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    7602     RT_NOREF(pBackend);
    7603 
    7604     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7543    RT_NOREF(pBackend, pDXContext);
     7544
     7545    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    76057546    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    76067547
     
    76167557    RT_NOREF(pBackend);
    76177558
    7618     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7559    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    76197560    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    76207561
     
    76367577    RT_NOREF(pBackend);
    76377578
    7638     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7579    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    76397580    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    76407581
     
    76547595{
    76557596    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    7656     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7597    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    76577598    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    76587599
     
    77237664static int dxDefineQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dQueryId queryId, SVGACOTableDXQueryEntry const *pEntry)
    77247665{
    7725     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7666    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    77267667    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    77277668
     
    77757716static int dxBeginQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dQueryId queryId, DXQUERY *pDXQuery)
    77767717{
    7777     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7718    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    77787719    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    77797720
     
    78027743                            SVGADXQueryResultUnion *pQueryResult, uint32_t *pcbOut)
    78037744{
    7804     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7745    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    78057746    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    78067747
     
    78847825                      SVGADXQueryResultUnion *pQueryResult, uint32_t *pcbOut)
    78857826{
    7886     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7827    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    78877828    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    78887829
     
    79117852    RT_NOREF(pBackend);
    79127853
    7913     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7854    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    79147855    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    79157856
     
    79497890    RT_NOREF(pBackend);
    79507891
    7951     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7892    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    79527893    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    79537894
     
    79747915            {
    79757916                /* Create the resource. */
    7976                 rc = vmsvga3dBackSurfaceCreateSoBuffer(pThisCC, pDXContext, pSurface);
     7917                rc = vmsvga3dBackSurfaceCreateSoBuffer(pThisCC, pSurface);
    79777918                AssertRCReturn(rc, rc);
    79787919            }
     
    80007941{
    80017942    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    8002     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7943    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    80037944    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    80047945
    8005     RT_NOREF(pBackend);
     7946    RT_NOREF(pBackend, pDXContext);
    80067947
    80077948    /* D3D11_VIEWPORT is identical to SVGA3dViewport. */
     
    80167957{
    80177958    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    8018     RT_NOREF(pBackend);
    8019 
    8020     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7959    RT_NOREF(pBackend, pDXContext);
     7960
     7961    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    80217962    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    80227963
     
    80317972static DECLCALLBACK(int) vmsvga3dBackDXClearRenderTargetView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRenderTargetViewId renderTargetViewId, SVGA3dRGBAFloat const *pRGBA)
    80327973{
    8033     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7974    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    80347975    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    80357976
     
    80467987                                                                     SVGA3dRGBAFloat const *pColor, uint32_t cRect, SVGASignedRect const *paRect)
    80477988{
    8048     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     7989    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    80497990    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    80507991
     
    80608001static DECLCALLBACK(int) vmsvga3dBackDXClearDepthStencilView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t flags, SVGA3dDepthStencilViewId depthStencilViewId, float depth, uint8_t stencil)
    80618002{
    8062     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8003    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    80638004    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    80648005
     
    80818022{
    80828023    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    8083     RT_NOREF(pBackend);
    8084 
    8085     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8024    RT_NOREF(pBackend, pDXContext);
     8025
     8026    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    80868027    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    80878028
     
    80988039        /* Create the resource. */
    80998040        if (pSrcSurface->format != SVGA3D_BUFFER)
    8100             rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDXContext, pSrcSurface);
     8041            rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pSrcSurface);
    81018042        else
    8102             rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDXContext, pSrcSurface);
     8043            rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pSrcSurface);
    81038044        AssertRCReturn(rc, rc);
    81048045    }
     
    81088049        /* Create the resource. */
    81098050        if (pSrcSurface->format != SVGA3D_BUFFER)
    8110             rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDXContext, pDstSurface);
     8051            rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDstSurface);
    81118052        else
    8112             rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDXContext, pDstSurface);
     8053            rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDstSurface);
    81138054        AssertRCReturn(rc, rc);
    81148055    }
     
    81568097    ID3D11Resource *pSrcResource;
    81578098
    8158     pDstResource = dxResource(pThisCC->svga.p3dState, pDstSurface, pDXContext);
    8159     pSrcResource = dxResource(pThisCC->svga.p3dState, pSrcSurface, pDXContext);
     8099    pDstResource = dxResource(pDstSurface);
     8100    pSrcResource = dxResource(pSrcSurface);
    81608101
    81618102    pDevice->pImmediateContext->CopySubresourceRegion(pDstResource, DstSubresource, DstX, DstY, DstZ,
     
    81858126{
    81868127    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    8187     RT_NOREF(pBackend);
    8188 
    8189     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8128    RT_NOREF(pBackend, pDXContext);
     8129
     8130    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    81908131    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    81918132
     
    82028143        /* Create the resource. */
    82038144        if (pSrcSurface->format != SVGA3D_BUFFER)
    8204             rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDXContext, pSrcSurface);
     8145            rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pSrcSurface);
    82058146        else
    8206             rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDXContext, pSrcSurface);
     8147            rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pSrcSurface);
    82078148        AssertRCReturn(rc, rc);
    82088149    }
     
    82128153        /* Create the resource. */
    82138154        if (pSrcSurface->format != SVGA3D_BUFFER)
    8214             rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDXContext, pDstSurface);
     8155            rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDstSurface);
    82158156        else
    8216             rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDXContext, pDstSurface);
     8157            rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDstSurface);
    82178158        AssertRCReturn(rc, rc);
    82188159    }
     
    82228163             (pDstSurface->f.surfaceFlags & SVGA3D_SURFACE_SCREENTARGET) ? " st" : "", pDstSurface->id));
    82238164
    8224     ID3D11Resource *pDstResource = dxResource(pThisCC->svga.p3dState, pDstSurface, pDXContext);
    8225     ID3D11Resource *pSrcResource = dxResource(pThisCC->svga.p3dState, pSrcSurface, pDXContext);
     8165    ID3D11Resource *pDstResource = dxResource(pDstSurface);
     8166    ID3D11Resource *pSrcResource = dxResource(pSrcSurface);
    82268167
    82278168    pDevice->pImmediateContext->CopyResource(pDstResource, pSrcResource);
     
    84838424                                                  SVGA3dDXPresentBltMode mode)
    84848425{
    8485     RT_NOREF(mode);
     8426    RT_NOREF(pDXContext, mode);
    84868427
    84878428    ASSERT_GUEST_RETURN(pBoxDst->z == 0 && pBoxDst->d == 1, VERR_INVALID_PARAMETER);
     
    84918432    RT_NOREF(pBackend);
    84928433
    8493     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8434    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    84948435    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    84958436
     
    85068447        /* Create the resource. */
    85078448        if (pSrcSurface->format != SVGA3D_BUFFER)
    8508             rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDXContext, pSrcSurface);
     8449            rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pSrcSurface);
    85098450        else
    8510             rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDXContext, pSrcSurface);
     8451            rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pSrcSurface);
    85118452        AssertRCReturn(rc, rc);
    85128453    }
     
    85168457        /* Create the resource. */
    85178458        if (pSrcSurface->format != SVGA3D_BUFFER)
    8518             rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDXContext, pDstSurface);
     8459            rc = vmsvga3dBackSurfaceCreateTexture(pThisCC, pDstSurface);
    85198460        else
    8520             rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDXContext, pDstSurface);
     8461            rc = vmsvga3dBackSurfaceCreateResource(pThisCC, pDstSurface);
    85218462        AssertRCReturn(rc, rc);
    85228463    }
     
    85558496    vmsvgaR3ClipBox(&pDstMipLevel->mipmapSize, &clipBoxDst);
    85568497
    8557     ID3D11Resource *pDstResource = dxResource(pThisCC->svga.p3dState, pDstSurface, pDXContext);
    8558     ID3D11Resource *pSrcResource = dxResource(pThisCC->svga.p3dState, pSrcSurface, pDXContext);
     8498    ID3D11Resource *pDstResource = dxResource(pDstSurface);
     8499    ID3D11Resource *pSrcResource = dxResource(pSrcSurface);
    85598500
    85608501    D3D11_RENDER_TARGET_VIEW_DESC RTVDesc;
     
    85978538static DECLCALLBACK(int) vmsvga3dBackDXGenMips(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderResourceViewId shaderResourceViewId)
    85988539{
    8599     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8540    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    86008541    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    86018542
     
    86888629{
    86898630    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    8690     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8631    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    86918632    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    86928633
     
    87198660                              SVGA3dBlendStateId blendId, SVGACOTableDXBlendStateEntry const *pEntry)
    87208661{
    8721     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8662    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    87228663    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    87238664
     
    87518692static int dxDefineDepthStencilState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilStateId depthStencilId, SVGACOTableDXDepthStencilEntry const *pEntry)
    87528693{
    8753     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8694    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    87548695    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    87558696
     
    87828723static int dxDefineRasterizerState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRasterizerStateId rasterizerId, SVGACOTableDXRasterizerStateEntry const *pEntry)
    87838724{
    8784     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8725    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    87858726    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    87868727
     
    88138754static int dxDefineSamplerState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSamplerId samplerId, SVGACOTableDXSamplerEntry const *pEntry)
    88148755{
    8815     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8756    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    88168757    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    88178758
     
    88948835{
    88958836    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    8896     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     8837    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    88978838    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    88988839
     
    95689509        ID3D11Resource *pDstResource;
    95699510        ID3D11Resource *pSrcResource;
    9570         pDstResource = dxResource(pState, pSurface, NULL);
     9511        pDstResource = dxResource(pSurface);
    95719512        pSrcResource = pDstResource;
    95729513
     
    96169557                                                   SVGA3dSurfaceId srcSid, uint32_t srcSubResource, SVGA3dSurfaceFormat copyFormat)
    96179558{
    9618     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     9559    RT_NOREF(pDXContext);
     9560
     9561    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    96199562    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    96209563
    96219564    PVMSVGA3DSURFACE pSrcSurface;
    96229565    ID3D11Resource *pSrcResource;
    9623     int rc = dxEnsureResource(pThisCC, pDXContext, srcSid, &pSrcSurface, &pSrcResource);
     9566    int rc = dxEnsureResource(pThisCC, srcSid, &pSrcSurface, &pSrcResource);
    96249567    AssertRCReturn(rc, rc);
    96259568
    96269569    PVMSVGA3DSURFACE pDstSurface;
    96279570    ID3D11Resource *pDstResource;
    9628     rc = dxEnsureResource(pThisCC, pDXContext, dstSid, &pDstSurface, &pDstResource);
     9571    rc = dxEnsureResource(pThisCC, dstSid, &pDstSurface, &pDstResource);
    96299572    AssertRCReturn(rc, rc);
    96309573
     
    96989641static DECLCALLBACK(int) vmsvga3dBackDXClearUAViewUint(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dUAViewId uaViewId, uint32_t const aValues[4])
    96999642{
    9700     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     9643    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    97019644    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    97029645
     
    97129655static DECLCALLBACK(int) vmsvga3dBackDXClearUAViewFloat(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dUAViewId uaViewId, float const aValues[4])
    97139656{
    9714     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     9657    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    97159658    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    97169659
     
    97269669static DECLCALLBACK(int) vmsvga3dBackDXCopyStructureCount(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dUAViewId srcUAViewId, SVGA3dSurfaceId destSid, uint32_t destByteOffset)
    97279670{
    9728     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     9671    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    97299672    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    97309673
     
    97359678        PVMSVGA3DSURFACE pSurface;
    97369679        ID3D11Resource *pResource;
    9737         int rc = dxEnsureResource(pThisCC, pDXContext, destSid, &pSurface, &pResource);
     9680        int rc = dxEnsureResource(pThisCC, destSid, &pSurface, &pResource);
    97389681        AssertRCReturn(rc, rc);
    97399682        AssertReturn(pSurface->pBackendSurface->enmResType == VMSVGA3D_RESTYPE_BUFFER, VERR_INVALID_STATE);
     
    97729715    RT_NOREF(pBackend);
    97739716
    9774     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     9717    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    97759718    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    97769719
     
    97819724        PVMSVGA3DSURFACE pSurface;
    97829725        ID3D11Resource *pResource;
    9783         int rc = dxEnsureResource(pThisCC, pDXContext, argsBufferSid, &pSurface, &pResource);
     9726        int rc = dxEnsureResource(pThisCC, argsBufferSid, &pSurface, &pResource);
    97849727        AssertRCReturn(rc, rc);
    97859728        AssertReturn(pSurface->pBackendSurface->enmResType == VMSVGA3D_RESTYPE_BUFFER, VERR_INVALID_STATE);
     
    98099752    RT_NOREF(pBackend);
    98109753
    9811     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     9754    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    98129755    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    98139756
     
    98189761        PVMSVGA3DSURFACE pSurface;
    98199762        ID3D11Resource *pResource;
    9820         int rc = dxEnsureResource(pThisCC, pDXContext, argsBufferSid, &pSurface, &pResource);
     9763        int rc = dxEnsureResource(pThisCC, argsBufferSid, &pSurface, &pResource);
    98219764        AssertRCReturn(rc, rc);
    98229765        AssertReturn(pSurface->pBackendSurface->enmResType == VMSVGA3D_RESTYPE_BUFFER, VERR_INVALID_STATE);
     
    98469789    RT_NOREF(pBackend);
    98479790
    9848     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     9791    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    98499792    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    98509793
     
    99639906static int dxSetCSUnorderedAccessViews(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext)
    99649907{
    9965     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     9908    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    99669909    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    99679910
     
    99979940{
    99989941    PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend;
    9999     RT_NOREF(pBackend);
    10000 
    10001     DXDEVICE *pDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     9942    RT_NOREF(pBackend, pDXContext);
     9943
     9944    DXDEVICE *pDevice = dxDeviceGet(pThisCC->svga.p3dState);
    100029945    AssertReturn(pDevice->pDevice, VERR_INVALID_STATE);
    100039946
     
    1035210295static int dxCreateVideoDecoderOutputView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId, VBSVGACOTableDXVideoDecoderOutputViewEntry const *pEntry)
    1035310296{
    10354     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10297    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1035510298    AssertReturn(pDXDevice->pVideoDevice, VERR_INVALID_STATE);
    1035610299
    1035710300    PVMSVGA3DSURFACE pSurface;
    1035810301    ID3D11Resource *pResource;
    10359     int rc = dxEnsureResource(pThisCC, pDXContext, pEntry->sid, &pSurface, &pResource);
     10302    int rc = dxEnsureResource(pThisCC, pEntry->sid, &pSurface, &pResource);
    1036010303    AssertRCReturn(rc, rc);
    1036110304
     
    1037910322static int dxCreateVideoProcessorInputView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorInputViewId videoProcessorInputViewId, VBSVGACOTableDXVideoProcessorInputViewEntry const *pEntry)
    1038010323{
    10381     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10324    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1038210325    AssertReturn(pDXDevice->pVideoDevice, VERR_INVALID_STATE);
    1038310326
    1038410327    PVMSVGA3DSURFACE pSurface;
    1038510328    ID3D11Resource *pResource;
    10386     int rc = dxEnsureResource(pThisCC, pDXContext, pEntry->sid, &pSurface, &pResource);
     10329    int rc = dxEnsureResource(pThisCC, pEntry->sid, &pSurface, &pResource);
    1038710330    AssertRCReturn(rc, rc);
    1038810331
     
    1042510368static int dxCreateVideoProcessorOutputView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId, VBSVGACOTableDXVideoProcessorOutputViewEntry const *pEntry)
    1042610369{
    10427     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10370    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1042810371    AssertReturn(pDXDevice->pVideoDevice, VERR_INVALID_STATE);
    1042910372
    1043010373    PVMSVGA3DSURFACE pSurface;
    1043110374    ID3D11Resource *pResource;
    10432     int rc = dxEnsureResource(pThisCC, pDXContext, pEntry->sid, &pSurface, &pResource);
     10375    int rc = dxEnsureResource(pThisCC, pEntry->sid, &pSurface, &pResource);
    1043310376    AssertRCReturn(rc, rc);
    1043410377
     
    1052810471                                    VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId)
    1052910472{
    10530     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10473    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1053110474    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1053210475
     
    1062110564static int dxCreateVideoProcessor(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorId videoProcessorId, VBSVGACOTableDXVideoProcessorEntry const *pEntry)
    1062210565{
    10623     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10566    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1062410567    AssertReturn(pDXDevice->pVideoDevice, VERR_INVALID_STATE);
    1062510568
     
    1066110604    HRESULT hr;
    1066210605
    10663     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10606    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1066410607    AssertReturn(pDXDevice->pVideoDevice, VERR_INVALID_STATE);
    1066510608
     
    1074910692    HRESULT hr;
    1075010693
    10751     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10694    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1075210695    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1075310696
     
    1081410757static DECLCALLBACK(int) vmsvga3dBackVBDXVideoDecoderEndFrame(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoDecoderId videoDecoderId)
    1081510758{
    10816     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10759    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1081710760    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1081810761
     
    1084510788                                                           uint32_t OutputFrame, uint32_t StreamCount, VBSVGA3dVideoProcessorStream const *pVideoProcessorStreams)
    1084610789{
    10847     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10790    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1084810791    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1084910792
     
    1102610969static DECLCALLBACK(int) vmsvga3dBackVBDXVideoProcessorSetOutputTargetRect(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorId videoProcessorId, uint8 enable, SVGASignedRect const &outputRect)
    1102710970{
    11028     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10971    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1102910972    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1103010973
     
    1103710980static DECLCALLBACK(int) vmsvga3dBackVBDXVideoProcessorSetOutputBackgroundColor(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorId videoProcessorId, uint32 YCbCr, VBSVGA3dVideoColor const &color)
    1103810981{
    11039     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10982    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1104010983    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1104110984
     
    1104810991static DECLCALLBACK(int) vmsvga3dBackVBDXVideoProcessorSetOutputColorSpace(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorId videoProcessorId, VBSVGA3dVideoProcessorColorSpace const &colorSpace)
    1104910992{
    11050     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     10993    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1105110994    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1105210995
     
    1105911002static DECLCALLBACK(int) vmsvga3dBackVBDXVideoProcessorSetOutputAlphaFillMode(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorId videoProcessorId, VBSVGA3dVideoProcessorAlphaFillMode fillMode, uint32 streamIndex)
    1106011003{
    11061     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11004    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1106211005    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1106311006
     
    1107011013static DECLCALLBACK(int) vmsvga3dBackVBDXVideoProcessorSetOutputConstriction(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorId videoProcessorId, uint32 enabled, uint32 width, uint32 height)
    1107111014{
    11072     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11015    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1107311016    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1107411017
     
    1108111024static DECLCALLBACK(int) vmsvga3dBackVBDXVideoProcessorSetOutputStereoMode(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorId videoProcessorId, uint32 enable)
    1108211025{
    11083     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11026    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1108411027    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1108511028
     
    1109211035static DECLCALLBACK(int) vmsvga3dBackVBDXVideoProcessorSetStreamFrameFormat(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorId videoProcessorId, uint32 streamIndex, VBSVGA3dVideoFrameFormat format)
    1109311036{
    11094     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11037    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1109511038    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1109611039
     
    1110311046static DECLCALLBACK(int) vmsvga3dBackVBDXVideoProcessorSetStreamColorSpace(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoProcessorId videoProcessorId, uint32 streamIndex, VBSVGA3dVideoProcessorColorSpace colorSpace)
    1110411047{
    11105     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11048    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1110611049    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1110711050
     
    1111511058                                                                           uint32 streamIndex, VBSVGA3dVideoProcessorOutputRate outputRate, uint32 repeatFrame, SVGA3dFraction64 const &customRate)
    1111611059{
    11117     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11060    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1111811061    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1111911062
     
    1112711070                                                                           uint32 streamIndex, uint32 enable, SVGASignedRect const &sourceRect)
    1112811071{
    11129     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11072    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1113011073    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1113111074
     
    1113911082                                                                         uint32 streamIndex, uint32 enable, SVGASignedRect const &destRect)
    1114011083{
    11141     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11084    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1114211085    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1114311086
     
    1115111094                                                                      uint32 streamIndex, uint32 enable, float alpha)
    1115211095{
    11153     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11096    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1115411097    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1115511098
     
    1116311106                                                                        uint32 streamIndex, uint32_t cEntries, uint32_t const *paEntries)
    1116411107{
    11165     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11108    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1116611109    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1116711110
     
    1117511118                                                                                 uint32 streamIndex, uint32 enable, SVGA3dFraction64 const &sourceRatio, SVGA3dFraction64 const &destRatio)
    1117611119{
    11177     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11120    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1117811121    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1117911122
     
    1118711130                                                                        uint32 streamIndex, uint32 enable, float lower, float upper)
    1118811131{
    11189     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11132    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1119011133    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1119111134
     
    1120011143                                                                             uint8 leftViewFrame0, uint8 baseViewFrame0, VBSVGA3dVideoProcessorStereoFlipMode flipMode, int32 monoOffset)
    1120111144{
    11202     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11145    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1120311146    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1120411147
     
    1121311156                                                                                   uint32 streamIndex, uint32 enable)
    1121411157{
    11215     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11158    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1121611159    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1121711160
     
    1122511168                                                                       uint32 streamIndex, uint32 enable, VBSVGA3dVideoProcessorFilter filter, int32 level)
    1122611169{
    11227     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11170    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1122811171    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1122911172
     
    1123711180                                                                         uint32 streamIndex, uint32 enable, VBSVGA3dVideoProcessorRotation rotation)
    1123811181{
    11239     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11182    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1124011183    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1124111184
     
    1147811421static DECLCALLBACK(int) vmsvga3dBackVBDXGetVideoCapability(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, VBSVGA3dVideoCapability capability, void *pvData, uint32 cbData, uint32 *pcbOut)
    1147911422{
    11480     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11423    RT_NOREF(pDXContext);
     11424
     11425    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1148111426    AssertReturn(pDXDevice->pVideoContext, VERR_INVALID_STATE);
    1148211427
     
    1150011445                                                  SVGA3dRGBAFloat const *pColor, uint32_t cRect, SVGASignedRect const *paRect)
    1150111446{
    11502     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11447    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1150311448    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    1150411449
     
    1151511460                                                   SVGA3dRGBAFloat const *pColor, uint32_t cRect, SVGASignedRect const *paRect)
    1151611461{
    11517     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11462    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1151811463    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    1151911464
     
    1153011475                                                   SVGA3dRGBAFloat const *pColor, uint32_t cRect, SVGASignedRect const *paRect)
    1153111476{
    11532     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11477    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1153311478    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    1153411479
     
    1154511490                                                   SVGA3dRGBAFloat const *pColor, uint32_t cRect, SVGASignedRect const *paRect)
    1154611491{
    11547     DXDEVICE *pDXDevice = dxDeviceFromContext(pThisCC->svga.p3dState, pDXContext);
     11492    DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState);
    1154811493    AssertReturn(pDXDevice->pDevice, VERR_INVALID_STATE);
    1154911494
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