VirtualBox

Ignore:
Timestamp:
May 16, 2022 3:17:36 PM (3 years ago)
Author:
vboxsync
Message:

Devices/Graphics: shaders; render targets; removed a wrong ClearState call: bugref:9830

File:
1 edited

Legend:

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

    r95022 r95023  
    947947    RT_NOREF(pBackend);
    948948
    949     if (pDevice->pImmediateContext)
    950     {
    951         dxDeviceFlush(pDevice); /* Make sure that any pending draw calls are finished. */
    952         pDevice->pImmediateContext->ClearState();
    953     }
    954 
    955949    D3D_RELEASE(pDevice->pStagingBuffer);
    956950
     
    50024996        VMSVGA3DBACKENDDXCONTEXT *pBackendDXContext = pDXContext->pBackendDXContext;
    50034997
     4998        if (pBackendDXContext->dxDevice.pImmediateContext)
     4999            dxDeviceFlush(&pBackendDXContext->dxDevice); /* Make sure that any pending draw calls are finished. */
     5000
    50045001        if (pBackendDXContext->paRenderTargetView)
    50055002        {
     
    53865383
    53875384    /* Make sure that the shader resource views exist. */
    5388     for (uint32_t idxShaderState = 0; idxShaderState < SVGA3D_NUM_SHADERTYPE_DX10 /** @todo SVGA3D_NUM_SHADERTYPE*/; ++idxShaderState)
     5385    for (uint32_t idxShaderState = 0; idxShaderState < SVGA3D_NUM_SHADERTYPE; ++idxShaderState)
    53895386    {
    53905387        for (uint32_t idxSR = 0; idxSR < SVGA3D_DX_MAX_SRVIEWS; ++idxSR)
     
    55935590     */
    55945591
    5595     for (uint32_t idxShaderState = 0; idxShaderState < SVGA3D_NUM_SHADERTYPE_DX10 /** @todo SVGA3D_NUM_SHADERTYPE*/; ++idxShaderState)
     5592    for (uint32_t idxShaderState = 0; idxShaderState < SVGA3D_NUM_SHADERTYPE; ++idxShaderState)
    55965593    {
    55975594        DXSHADER *pDXShader;
     
    56055602            {
    56065603                /* Create a new shader. */
    5607                 Log(("Shader: cid=%u shid=%u type=%d\n", pDXContext->cid, shaderId, pDXShader->enmShaderType));
     5604                Log(("Shader: cid=%u shid=%u type=%d, GuestSignatures %d\n", pDXContext->cid, shaderId, pDXShader->enmShaderType, pDXShader->shaderInfo.fGuestSignatures));
    56085605
    56095606                /* Apply resource types to a pixel shader. */
     
    62806277    }
    62816278
     6279    UINT NumRTVs = 0;
    62826280    ID3D11RenderTargetView *apRenderTargetViews[SVGA3D_MAX_RENDER_TARGETS];
    62836281    RT_ZERO(apRenderTargetViews);
     
    62896287            ASSERT_GUEST_RETURN(renderTargetViewId < pDXContext->pBackendDXContext->cRenderTargetView, VERR_INVALID_PARAMETER);
    62906288            apRenderTargetViews[i] = pDXContext->pBackendDXContext->paRenderTargetView[renderTargetViewId].u.pRenderTargetView;
     6289            ++NumRTVs;
    62916290        }
    62926291    }
     
    62976296        pDepthStencilView = pDXContext->pBackendDXContext->paDepthStencilView[depthStencilViewId].u.pDepthStencilView;
    62986297
    6299     pDevice->pImmediateContext->OMSetRenderTargets(pDXContext->cRenderTargets,
     6298    pDevice->pImmediateContext->OMSetRenderTargetsAndUnorderedAccessViews(NumRTVs,
    63006299                                                   apRenderTargetViews,
    6301                                                    pDepthStencilView);
    6302 //    Assert(NumUAVs == 0);
    6303     if (NumUAVs != 0)
    6304         pDevice->pImmediateContext->OMSetRenderTargetsAndUnorderedAccessViews(D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL,
    6305                                                        NULL,
    6306                                                        NULL,
    6307                                                        pDXContext->svgaDXContext.uavSpliceIndex,
    6308                                                        NumUAVs,
    6309                                                        apUnorderedAccessViews,
    6310                                                        aUAVInitialCounts);
     6300                                                   pDepthStencilView,
     6301                                                   NumRTVs /*pDXContext->svgaDXContext.uavSpliceIndex*/,
     6302                                                   NumUAVs,
     6303                                                   apUnorderedAccessViews,
     6304                                                   aUAVInitialCounts);
    63116305    return VINF_SUCCESS;
    63126306}
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