VirtualBox

Ignore:
Timestamp:
Jun 9, 2010 10:17:57 AM (15 years ago)
Author:
vboxsync
Message:

wddm/3d: more impl

File:
1 edited

Legend:

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

    r30097 r30102  
    24692469static HRESULT APIENTRY vboxWddmDDevCreateVertexShaderFunc(HANDLE hDevice, D3DDDIARG_CREATEVERTEXSHADERFUNC* pData, CONST UINT* pCode)
    24702470{
    2471     vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    2472     AssertBreakpoint();
    2473     vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    2474     return E_FAIL;
     2471    vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
     2472    PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice;
     2473    Assert(pDevice);
     2474    Assert(pDevice->pDevice9If);
     2475    IDirect3DVertexShader9 *pShader;
     2476    Assert(*((UINT*)((uint8_t*)pCode + pData->Size-4)) == 0x0000FFFF /* end token */);
     2477    HRESULT hr = pDevice->pDevice9If->CreateVertexShader((const DWORD *)pCode, &pShader);
     2478    Assert(hr == S_OK);
     2479    if (hr == S_OK)
     2480    {
     2481        Assert(pShader);
     2482        pData->ShaderHandle = pShader;
     2483    }
     2484    vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr));
     2485    return hr;
    24752486}
    24762487static HRESULT APIENTRY vboxWddmDDevSetVertexShaderFunc(HANDLE hDevice, HANDLE hShaderHandle)
     
    24832494static HRESULT APIENTRY vboxWddmDDevDeleteVertexShaderFunc(HANDLE hDevice, HANDLE hShaderHandle)
    24842495{
    2485     vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    2486     AssertBreakpoint();
    2487     vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    2488     return E_FAIL;
     2496    vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
     2497    PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice;
     2498    Assert(pDevice);
     2499    Assert(pDevice->pDevice9If);
     2500    IDirect3DVertexShader9 *pShader = (IDirect3DVertexShader9*)hShaderHandle;
     2501    HRESULT hr = pShader->Release();
     2502    Assert(hr == S_OK);
     2503    vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr));
     2504    return hr;
    24892505}
    24902506static HRESULT APIENTRY vboxWddmDDevSetVertexShaderConstI(HANDLE hDevice, CONST D3DDDIARG_SETVERTEXSHADERCONSTI* pData, CONST INT* pRegisters)
     
    26352651static HRESULT APIENTRY vboxWddmDDevCreatePixelShader(HANDLE hDevice, D3DDDIARG_CREATEPIXELSHADER* pData, CONST UINT* pCode)
    26362652{
    2637     vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    2638     AssertBreakpoint();
    2639     vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    2640     return E_FAIL;
     2653    vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
     2654    PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice;
     2655    Assert(pDevice);
     2656    Assert(pDevice->pDevice9If);
     2657    IDirect3DPixelShader9 *pShader;
     2658    Assert(*((UINT*)((uint8_t*)pCode + pData->CodeSize-4)) == 0x0000FFFF /* end token */);
     2659    HRESULT hr = pDevice->pDevice9If->CreatePixelShader((const DWORD *)pCode, &pShader);
     2660    Assert(hr == S_OK);
     2661    if (hr == S_OK)
     2662    {
     2663        Assert(pShader);
     2664        pData->ShaderHandle = pShader;
     2665    }
     2666    vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr));
     2667    return hr;
    26412668}
    26422669static HRESULT APIENTRY vboxWddmDDevDeletePixelShader(HANDLE hDevice, HANDLE hShaderHandle)
    26432670{
    2644     vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    2645     AssertBreakpoint();
    2646     vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    2647     return E_FAIL;
     2671    vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
     2672    PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice;
     2673    Assert(pDevice);
     2674    Assert(pDevice->pDevice9If);
     2675    IDirect3DPixelShader9 *pShader = (IDirect3DPixelShader9*)hShaderHandle;
     2676    HRESULT hr = pShader->Release();
     2677    Assert(hr == S_OK);
     2678    vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr));
     2679    return hr;
    26482680}
    26492681static HRESULT APIENTRY vboxWddmDDevCreateDecodeDevice(HANDLE hDevice, D3DDDIARG_CREATEDECODEDEVICE* pData)
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