VBoxUhgsmiDisp.cpp revision c7814cf6e1240a519cbec0441e033d0e2470ed00
/* $Id$ */
/** @file
* VBoxVideo Display D3D User mode dll
*/
/*
* Copyright (C) 2011-2012 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"
#define VBOXUHGSMID3D_GET_PRIVATE(_p, _t) ((_t*)(((uint8_t*)_p) - RT_OFFSETOF(_t, BasePrivate.Base)))
#if 0
typedef struct VBOXUHGSMI_BUFFER_PRIVATE_D3D
{
{
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)
{
D3DDDICB_LOCK DdiLock = {0};
DdiLock.PrivateDriverData = 0;
if (RT_FAILURE(rc))
return rc;
else
{
return VINF_SUCCESS;
}
return VERR_GENERAL_FAILURE;
}
{
return VINF_SUCCESS;
return VERR_GENERAL_FAILURE;
}
DECLCALLBACK(int) vboxUhgsmiD3DBufferCreate(PVBOXUHGSMI pHgsmi, uint32_t cbBuf, VBOXUHGSMI_BUFFER_TYPE_FLAGS fUhgsmiType, PVBOXUHGSMI_BUFFER* ppBuf)
{
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[cPages]));
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 (hSynch)
return rc;
}
DECLCALLBACK(int) vboxUhgsmiD3DBufferSubmit(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;
}
#endif
static DECLCALLBACK(int) vboxCrHhgsmiDispEscape(struct VBOXUHGSMI_PRIVATE_BASE *pHgsmi, void *pvData, uint32_t cbData, BOOL fHwAccess)
{
D3DDDICB_ESCAPE DdiEscape = {0};
{
return VINF_SUCCESS;
}
return VERR_GENERAL_FAILURE;
}
{
}