VBoxMPTypes.h revision 635c83753ed04cf3637e019af0e15ba40e07f2fe
/* $Id$ */
/** @file
* VBox WDDM Miniport driver
*/
/*
* Copyright (C) 2011-2013 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 ___VBoxMPTypes_h___
#define ___VBoxMPTypes_h___
typedef struct _VBOXMP_DEVEXT *PVBOXMP_DEVEXT;
#ifdef VBOX_WITH_CROGL
typedef struct VBOXWDDM_SWAPCHAIN *PVBOXWDDM_SWAPCHAIN;
#endif
typedef struct VBOXWDDM_CONTEXT *PVBOXWDDM_CONTEXT;
typedef struct VBOXWDDM_ALLOCATION *PVBOXWDDM_ALLOCATION;
#include "common/wddm/VBoxMPIf.h"
#include "VBoxMPMisc.h"
#include "VBoxMPCm.h"
#include "VBoxMPVdma.h"
#include "VBoxMPShgsmi.h"
#include "VBoxMPVbva.h"
#include "VBoxMPCr.h"
#include "VBoxMPVModes.h"
#ifdef VBOX_WITH_CROGL
#include <cr_vreg.h>
#endif
#include <cr_sortarray.h>
#if 0
#endif
/* one page size */
#define VBOXWDDM_C_DMA_BUFFER_SIZE 0x1000
#define VBOXWDDM_C_DMA_PRIVATEDATA_SIZE 0x4000
#define VBOXWDDM_C_ALLOC_LIST_SIZE 0xc00
#define VBOXWDDM_C_PATH_LOCATION_LIST_SIZE 0xc00
#define VBOXWDDM_C_POINTER_MAX_WIDTH 64
#define VBOXWDDM_C_POINTER_MAX_HEIGHT 64
#ifdef VBOX_WITH_VDMA
#endif
#ifndef VBOXWDDM_RENDER_FROM_SHADOW
# ifndef VBOX_WITH_VDMA
# error "VBOX_WITH_VDMA must be defined!!!"
# endif
#endif
, 8)
typedef struct _VBOXWDDM_POINTER_INFO
{
union
{
} Attributes;
typedef struct _VBOXWDDM_GLOBAL_POINTER_INFO
{
#ifdef VBOX_WITH_VIDEOHWACCEL
typedef struct VBOXWDDM_VHWA
{
volatile uint32_t cOverlaysCreated;
#endif
typedef struct VBOXWDDM_ADDR
{
/* if SegmentId == NULL - the sysmem data is presented with pvMem */
union {
void * pvMem;
};
typedef struct VBOXWDDM_ALLOC_DATA
{
struct VBOXWDDM_SWAPCHAIN *pSwapchain;
#define VBOXWDDM_HGSYNC_F_SYNCED_DIMENSIONS 0x01
#define VBOXWDDM_HGSYNC_F_SYNCED_LOCATION 0x02
#define VBOXWDDM_HGSYNC_F_SYNCED_VISIBILITY 0x04
#define VBOXWDDM_HGSYNC_F_SYNCED_TOPOLOGY 0x08
#define VBOXWDDM_HGSYNC_F_SYNCED_ALL (VBOXWDDM_HGSYNC_F_SYNCED_DIMENSIONS | VBOXWDDM_HGSYNC_F_SYNCED_LOCATION | VBOXWDDM_HGSYNC_F_SYNCED_VISIBILITY | VBOXWDDM_HGSYNC_F_SYNCED_TOPOLOGY)
#define VBOXWDDM_HGSYNC_F_CHANGED_LOCATION_ONLY (VBOXWDDM_HGSYNC_F_SYNCED_ALL & ~VBOXWDDM_HGSYNC_F_SYNCED_LOCATION)
#define VBOXWDDM_HGSYNC_F_CHANGED_TOPOLOGY_ONLY (VBOXWDDM_HGSYNC_F_SYNCED_ALL & ~VBOXWDDM_HGSYNC_F_SYNCED_TOPOLOGY)
typedef struct VBOXWDDM_SOURCE
{
struct VBOXWDDM_ALLOCATION * pPrimaryAllocation;
#ifdef VBOX_WITH_CROGL
/* specifies whether the source has 3D overlay data visible */
#endif
#ifdef VBOX_WITH_VIDEOHWACCEL
/* @todo: in our case this seems more like a target property,
* but keep it here for now */
#endif
typedef struct VBOXWDDM_TARGET
{
/* since there coul be multiple state changes on auto-resize,
* we pend notifying host to avoid flickering */
bool fConnected;
bool fConfigured;
/* allocation */
//#define VBOXWDDM_ALLOCATIONINDEX_VOID (~0U)
typedef struct VBOXWDDM_ALLOCATION
{
#ifdef VBOX_WITH_VIDEOHWACCEL
#endif
#ifdef DEBUG
/* current for shared rc handling assumes that once resource has no opens, it can not be openned agaion */
#endif
struct VBOXWDDM_RESOURCE *pResource;
/* to return to the Runtime on DxgkDdiCreateAllocation */
/* helps tracking when to release wine shared resource */
#if 0
#endif
typedef struct VBOXWDDM_RESOURCE
{
typedef struct VBOXWDDM_OVERLAY
{
typedef enum
{
typedef struct VBOXWDDM_DEVICE
{
VBOXWDDM_DEVICE_TYPE enmType; /* device creation flags passed to DxgkDdiCreateDevice, not sure we need it */
typedef enum
{
#ifdef VBOX_WITH_CROGL
typedef struct VBOXWDDM_SWAPCHAIN
{
struct VBOXWDDM_CONTEXT *pContext;
#endif
typedef struct VBOXWDDM_CONTEXT
{
struct VBOXWDDM_DEVICE * pDevice;
#ifdef VBOX_WITH_CROGL
#endif
typedef struct VBOXWDDM_DMA_PRIVATEDATA_PRESENTHDR
{
#ifdef VBOXWDDM_RENDER_FROM_SHADOW
typedef struct VBOXWDDM_DMA_PRIVATEDATA_SHADOW2PRIMARY
{
#endif
typedef struct VBOXWDDM_DMA_PRIVATEDATA_BLT
{
typedef struct VBOXWDDM_DMA_PRIVATEDATA_FLIP
{
typedef struct VBOXWDDM_DMA_PRIVATEDATA_CLRFILL
{
typedef struct VBOXWDDM_UHGSMI_BUFFER_SUBMIT_INFO
{
typedef struct VBOXWDDM_DMA_PRIVATEDATA_CHROMIUM_CMD
{
typedef struct VBOXWDDM_DMA_PRIVATEDATA_ALLOCINFO_ON_SUBMIT
{
typedef struct VBOXWDDM_OPENALLOCATION
{
#define VBOX_VMODES_MAX_COUNT 128
typedef struct VBOX_VMODES
{
} VBOX_VMODES;
typedef struct VBOXWDDM_VMODES
{
/* note that we not use array indices to indentify modes, because indices may change due to element removal */
#endif /* #ifndef ___VBoxMPTypes_h___ */