VirtualBox

Ignore:
Timestamp:
Jul 22, 2010 10:16:21 AM (14 years ago)
Author:
vboxsync
Message:

wddm/3d: color fill operation impl

File:
1 edited

Legend:

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

    r30942 r30978  
    41984198        case VBOXDISP_D3DIFTYPE_TEXTURE:
    41994199        {
     4200            Assert(pRc->cAllocations == 1); /* <- vboxWddmSurfGet is typically used in Blt & ColorFill functions
     4201                                             * in this case, if texture is used as a destination,
     4202                                             * we should update sub-layers as well which is not done currently
     4203                                             * so for now check vboxWddmSurfGet is used for one-level textures */
    42004204            IDirect3DTexture9 *pD3DIfTex = (IDirect3DTexture9*)pRc->aAllocations[0].pD3DIf;
    42014205            IDirect3DSurface9 *pSurfaceLevel;
     
    44754479static HRESULT APIENTRY vboxWddmDDevColorFill(HANDLE hDevice, CONST D3DDDIARG_COLORFILL* pData)
    44764480{
    4477     vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    4478     Assert(0);
    4479     vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
    4480     return E_FAIL;
     4481    vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice));
     4482    PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice;
     4483    Assert(pDevice);
     4484    Assert(pDevice->pDevice9If);
     4485    PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hResource;
     4486    Assert(pRc);
     4487    IDirect3DSurface9 *pSurfIf = NULL;
     4488    HRESULT hr = vboxWddmSurfGet(pRc, pData->SubResourceIndex, &pSurfIf);
     4489    Assert(hr == S_OK);
     4490    if (hr == S_OK)
     4491    {
     4492        Assert(pSurfIf);
     4493        hr = pDevice->pDevice9If->ColorFill(pSurfIf, &pData->DstRect, pData->Color);
     4494        Assert(hr == S_OK);
     4495        /* @todo: check what need to do when PresentToDwm flag is set */
     4496        Assert(pData->Flags.Value == 0);
     4497
     4498        pSurfIf->Release();
     4499    }
     4500    vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr));
     4501    return hr;
    44814502}
    44824503static HRESULT APIENTRY vboxWddmDDevDepthFill(HANDLE hDevice, CONST D3DDDIARG_DEPTHFILL* 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