VirtualBox

Ignore:
Timestamp:
Oct 18, 2013 12:35:36 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90053
Message:

wddm/3d: ref d3d rt to avoid calling unloaded lib

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp

    r48944 r49180  
    3939
    4040/* the number of frames to collect data before doing dump/reset */
    41 #define VBOXDISPPROFILE_DDI_DUMP_FRAME_COUNT 0xffffffff
     41#define VBOXDISPPROFILE_DDI_DUMP_FRAME_COUNT 0x20
    4242
    4343struct VBOXDISPPROFILE_GLOBAL {
     
    54595459    Assert(hr == S_OK);
    54605460    if (hr == S_OK)
     5461    {
     5462        if (pDevice->hHgsmiTransportModule)
     5463            FreeLibrary(pDevice->hHgsmiTransportModule);
    54615464        RTMemFree(pDevice);
     5465    }
    54625466    vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    54635467    return hr;
     
    60096013                    if (hr == S_OK)
    60106014                    {
    6011     #ifdef VBOXDISP_EARLYCREATEDEVICE
     6015#ifdef VBOXDISP_EARLYCREATEDEVICE
    60126016                        PVBOXWDDMDISP_RESOURCE pRc = vboxResourceAlloc(2);
    60136017                        Assert(pRc);
     
    60456049                            hr = E_OUTOFMEMORY;
    60466050                        }
    6047     #else
     6051#else
    60486052//# define VBOXDISP_TEST_SWAPCHAIN
    60496053# ifdef VBOXDISP_TEST_SWAPCHAIN
     
    60516055# endif
    60526056                        break;
    6053     #endif
     6057#endif
    60546058
    60556059                        HRESULT tmpHr = vboxDispCmCtxDestroy(pDevice, &pDevice->DefaultContext);
     
    60736077        vboxVDbgPrintR((__FUNCTION__": RTMemAllocZ returned NULL\n"));
    60746078        hr = E_OUTOFMEMORY;
     6079    }
     6080
     6081    if (SUCCEEDED(hr))
     6082    {
     6083        if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
     6084                                (LPCWSTR)pDevice->RtCallbacks.pfnAllocateCb,
     6085                                &pDevice->hHgsmiTransportModule))
     6086        {
     6087            Assert(pDevice->hHgsmiTransportModule);
     6088        }
     6089        else
     6090        {
     6091            DWORD winEr = GetLastError();
     6092            WARN(("GetModuleHandleEx failed winEr %d, ignoring", winEr));
     6093            pDevice->hHgsmiTransportModule = 0;
     6094        }
    60756095    }
    60766096
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.h

    r48070 r49180  
    212212    struct VBOXWDDMDISP_RESOURCE *aSamplerTextures[VBOXWDDMDISP_TOTAL_SAMPLERS];
    213213
     214    HMODULE hHgsmiTransportModule;
     215
    214216#ifdef VBOX_WDDMDISP_WITH_PROFILE
    215217    VBoxDispProfileFpsCounter ProfileDdiFps;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette