VBoxUhgsmiKmt.cpp revision d10b60270f0c0eeb87f45002a010cff8ba2126b1
/* $Id$ */
/** @file
* VBoxVideo Display D3D User mode dll
*/
/*
* Copyright (C) 2011 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"
#include <cr_protocol.h>
#ifndef NT_SUCCESS
#endif
#if 0
typedef struct VBOXUHGSMI_BUFFER_PRIVATE_KMT
{
{
if (NT_SUCCESS(Status))
{
return VINF_SUCCESS;
}
else
{
}
return VERR_GENERAL_FAILURE;
}
DECLCALLBACK(int) vboxUhgsmiKmtBufferLock(PVBOXUHGSMI_BUFFER pBuf, uint32_t offLock, uint32_t cbLock, VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags, void**pvLock)
{
D3DKMT_LOCK DdiLock = {0};
if (RT_FAILURE(rc))
return rc;
else
if (NT_SUCCESS(Status))
{
return VINF_SUCCESS;
}
else
{
}
return VERR_GENERAL_FAILURE;
}
{
if (NT_SUCCESS(Status))
return VINF_SUCCESS;
else
return VERR_GENERAL_FAILURE;
}
DECLCALLBACK(int) vboxUhgsmiKmtBufferCreate(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_KMT pBuf = (PVBOXUHGSMI_BUFFER_PRIVATE_KMT)RTMemAllocZ(RT_OFFSETOF(VBOXUHGSMI_BUFFER_PRIVATE_KMT, aLockPageIndices[cPages]));
if (pBuf)
{
struct
{
} Buf;
if (NT_SUCCESS(Status))
{
// pBuf->Base.pfnAdjustValidDataRange = vboxUhgsmiKmtBufferAdjustValidDataRange;
return VINF_SUCCESS;
}
else
{
}
}
else
rc = VERR_NO_MEMORY;
if (hSynch)
return rc;
}
DECLCALLBACK(int) vboxUhgsmiKmtBufferSubmit(PVBOXUHGSMI pHgsmi, PVBOXUHGSMI_BUFFER_SUBMIT aBuffers, uint32_t cBuffers)
{
if (RT_FAILURE(rc))
return rc;
D3DKMT_RENDER DdiRender = {0};
if (NT_SUCCESS(Status))
{
return VINF_SUCCESS;
}
else
{
}
return VERR_GENERAL_FAILURE;
}
#endif
{
{
{
{
NULL, 0);
{
return S_OK;
}
else
{
}
}
else
{
}
}
else
{
// WARN(("vboxDispKmtOpenAdapter failed, hr(0x%x)", hr));
}
}
else
{
}
return hr;
}
static DECLCALLBACK(int) vboxCrHhgsmiKmtEscape(struct VBOXUHGSMI_PRIVATE_BASE *pHgsmi, void *pvData, uint32_t cbData, BOOL fHwAccess)
{
D3DKMT_ESCAPE DdiEscape = {0};
if (NT_SUCCESS(Status))
{
return VINF_SUCCESS;
}
return VERR_GENERAL_FAILURE;
}
#if 0
{
#error "port me!"
}
#endif
{
}
{
{
{
{
return S_OK;
}
}
}
return hr;
}