VBoxUhgsmiDisp.cpp revision 5cf075f1173d07b89c26db295070415dffc6109d
/** @file
*
* VBoxVideo Display D3D User mode dll
*
* Copyright (C) 2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "VBoxDispD3DCmn.h"
typedef struct VBOXUHGSMI_BUFFER_PRIVATE_D3D
{
#define VBOXUHGSMID3D_GET_PRIVATE(_p, _t) ((_t*)(((uint8_t*)_p) - RT_OFFSETOF(_t, BasePrivate.Base)))
{
DdiDealloc.hResource = 0;
{
{
}
return VINF_SUCCESS;
}
return VERR_GENERAL_FAILURE;
}
DECLCALLBACK(int) vboxUhgsmiD3DBufferLock(PVBOXUHGSMI_BUFFER pBuf, uint32_t offLock, uint32_t cbLock, VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags, void**pvLock)
{
DdiLock.PrivateDriverData = 0;
if (RT_FAILURE(rc))
return rc;
{
return VINF_SUCCESS;
}
return VERR_GENERAL_FAILURE;
}
{
return VINF_SUCCESS;
return VERR_GENERAL_FAILURE;
}
{
bool bSynchCreated = false;
if (!cbBuf)
return VERR_INVALID_PARAMETER;
if (RT_FAILURE(rc))
return rc;
PVBOXUHGSMI_BUFFER_PRIVATE_D3D pBuf = (PVBOXUHGSMI_BUFFER_PRIVATE_D3D)RTMemAllocZ(RT_OFFSETOF(VBOXUHGSMI_BUFFER_PRIVATE_D3D, aLockPageIndices));
if (pBuf)
{
struct
{
} Buf;
HRESULT hr = pPrivate->pDevice->RtCallbacks.pfnAllocateCb(pPrivate->pDevice->hDevice, &Buf.DdiAlloc);
{
// pBuf->Base.pfnAdjustValidDataRange = vboxUhgsmiD3DBufferAdjustValidDataRange;
return VINF_SUCCESS;
}
}
else
rc = VERR_NO_MEMORY;
if (bSynchCreated)
return rc;
}
DECLCALLBACK(int) vboxUhgsmiD3DBufferSubmitAsynch(PVBOXUHGSMI pHgsmi, PVBOXUHGSMI_BUFFER_SUBMIT aBuffers, uint32_t cBuffers)
{
pDevice->DefaultContext.ContextInfo.pAllocationList, pDevice->DefaultContext.ContextInfo.AllocationListSize,
pDevice->DefaultContext.ContextInfo.pPatchLocationList, pDevice->DefaultContext.ContextInfo.PatchLocationListSize);
if (RT_FAILURE(rc))
return rc;
D3DDDICB_RENDER DdiRender = {0};
DdiRender.CommandOffset = 0;
// DdiRender.NewCommandBufferSize = sizeof (VBOXVDMACMD) + 4 * (100);
// DdiRender.NewAllocationListSize = 100;
// DdiRender.NewPatchLocationListSize = 100;
{
return VINF_SUCCESS;
}
return VERR_GENERAL_FAILURE;
}
{
return S_OK;
}