/* $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.
*/
#ifndef ___VBoxDispD3D_h___
#define ___VBoxDispD3D_h___
#include "VBoxDispD3DIf.h"
#include "../../common/wddm/VBoxMPIf.h"
#ifdef VBOX_WITH_CRHGSMI
#include "VBoxUhgsmiDisp.h"
#endif
#ifdef VBOX_WDDMDISP_WITH_PROFILE
extern volatile uint32_t g_u32VBoxDispProfileFunctionLoggerIndex;
# define VBOXDISPPROFILE_FUNCTION_LOGGER_INDEX_GEN() ASMAtomicIncU32(&g_u32VBoxDispProfileFunctionLoggerIndex);
# include "VBoxDispProfile.h"
#endif
#define VBOXWDDMDISP_SAMPLER_IDX_IS_SPECIAL(_i) ((_i) >= D3DDMAPSAMPLER && (_i) <= D3DVERTEXTEXTURESAMPLER3)
#define VBOXWDDMDISP_SAMPLER_IDX_SPECIAL(_i) (VBOXWDDMDISP_SAMPLER_IDX_IS_SPECIAL(_i) ? (int)((_i) - D3DDMAPSAMPLER + VBOXWDDMDISP_MAX_TEX_SAMPLERS) : (int)-1)
#define VBOXWDDMDISP_SAMPLER_IDX(_i) (((_i) < VBOXWDDMDISP_MAX_TEX_SAMPLERS) ? (int)(_i) : VBOXWDDMDISP_SAMPLER_IDX_SPECIAL(_i))
/* maximum number of direct render targets to be used before
* switching to offscreen rendering */
#ifdef VBOXWDDMDISP_DEBUG
#else
#endif
#ifdef VBOX_WITH_VIDEOHWACCEL
typedef struct VBOXDISPVHWA_INFO
{
/* represents settings secific to
* display device (head) on the multiple-head graphics card
* currently used for 2D (overlay) only since in theory its settings
* can differ per each frontend's framebuffer. */
typedef struct VBOXWDDMDISP_HEAD
{
#endif
typedef struct VBOXWDDMDISP_ADAPTER
{
#ifdef VBOX_WDDMDISP_WITH_PROFILE
#endif
#ifdef VBOX_WITH_VIDEOHWACCEL
#endif
typedef struct VBOXWDDMDISP_CONTEXT
{
typedef struct VBOXWDDMDISP_STREAMSOURCEUM
{
typedef struct VBOXWDDMDISP_INDICIESUM
{
struct VBOXWDDMDISP_ALLOCATION;
typedef struct VBOXWDDMDISP_STREAM_SOURCE_INFO
{
typedef struct VBOXWDDMDISP_INDICES_INFO
{
const void *pvIndicesUm;
typedef struct VBOXWDDMDISP_RENDERTGT_FLAGS
{
union
{
struct
{
};
};
typedef struct VBOXWDDMDISP_RENDERTGT
{
#define VBOXWDDMDISP_INDEX_UNDEFINED (~0)
typedef struct VBOXWDDMDISP_SWAPCHAIN_FLAGS
{
union
{
struct
{
UINT bSwitchReportingPresent : 1; /* switch to use VBox extension method for performing present on next present */
};
};
typedef struct VBOXWDDMDISP_SWAPCHAIN
{
#ifndef VBOXWDDM_WITH_VISIBLE_FB
#endif
/* a read-only hWnd we receive from wine
* we use it for visible region notifications only,
* it MUST NOT be destroyed on swapchain destruction,
* wine will handle that for us */
typedef struct VBOXWDDMDISP_DEVICE
{
/* number of StreamSources set */
/* need to cache the ViewPort data because IDirect3DDevice9::SetViewport
* is split into two calls : SetViewport & SetZRange */
#ifdef VBOX_WITH_CRHGSMI
#endif
/* no lock is needed for this since we're guaranteed the per-device calls are not reentrant */
#ifdef VBOX_WDDMDISP_WITH_PROFILE
#endif
#ifdef VBOXWDDMDISP_DEBUG_TIMER
#endif
typedef struct VBOXWDDMDISP_LOCKINFO
{
union {
};
union {
};
#ifdef VBOXWDDMDISP_DEBUG
#endif
typedef enum
{
typedef struct VBOXWDDMDISP_ALLOCATION
{
void* pvMem;
/* object type is defined by enmD3DIfType enum */
/* list entry used to add allocation to the dirty alloc list */
typedef struct VBOXWDDMDISP_RESOURCE
{
typedef struct VBOXWDDMDISP_QUERY
{
typedef struct VBOXWDDMDISP_TSS_LOOKUP
{
typedef struct VBOXWDDMDISP_OVERLAY
{
#define VBOXDISP_CUBEMAP_INDEX_TO_FACE(pRc, idx) ((D3DCUBEMAP_FACES)(D3DCUBEMAP_FACE_POSITIVE_X+(idx)%VBOXDISP_CUBEMAP_LEVELS_COUNT(pRc)))
{
return pAlloc->pSwapchain;
}
{
}
/* if swapchain contains only one surface returns this surface */
{
if (pSwapchain->cRTs)
{
}
return NULL;
}
{
if (pSwapchain->cRTs)
{
}
return NULL;
}
#ifndef IN_VBOXCRHGSMI
PVBOXWDDMDISP_SWAPCHAIN vboxWddmSwapchainFindCreate(PVBOXWDDMDISP_DEVICE pDevice, PVBOXWDDMDISP_ALLOCATION pBbAlloc, BOOL *pbNeedPresent);
HRESULT vboxWddmSwapchainChkCreateIf(PVBOXWDDMDISP_DEVICE pDevice, PVBOXWDDMDISP_SWAPCHAIN pSwapchain);
#endif
#endif /* #ifndef ___VBoxDispD3D_h___ */