summaryrefslogtreecommitdiff
path: root/src/VBox/Additions/WINNT/Graphics/Video/common
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Additions/WINNT/Graphics/Video/common
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Additions/WINNT/Graphics/Video/common')
-rw-r--r--src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoLog.h26
-rw-r--r--src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoTools.h2
-rw-r--r--src/VBox/Additions/WINNT/Graphics/Video/common/wddm/VBoxMPIf.h30
-rw-r--r--src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h9
-rw-r--r--src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoPortAPI.h2
5 files changed, 60 insertions, 9 deletions
diff --git a/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoLog.h b/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoLog.h
index e6e60205..b928bd67 100644
--- a/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoLog.h
+++ b/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoLog.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (C) 2011 Oracle Corporation
+ * 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;
@@ -96,19 +96,41 @@
# define _WARN_LOGGER VBOX_VIDEO_LOG_LOGGER
#endif
-#define WARN_NOBP(_a) _LOGMSG(VBOX_VIDEO_LOG_LOGGER, "WARNING! :", _a)
+#define WARN_NOBP(_a) _LOGMSG(_WARN_LOGGER, "WARNING! :", _a)
#define WARN(_a) \
do \
{ \
WARN_NOBP(_a); \
BP_WARN(); \
} while (0)
+
#define ASSERT_WARN(_a, _w) do {\
if(!(_a)) { \
WARN(_w); \
}\
} while (0)
+#define STOP_FATAL() do { \
+ AssertReleaseFailed(); \
+ } while (0)
+#define ERR(_a) do { \
+ _LOGMSG(VBOX_VIDEO_LOGREL_LOGGER, "FATAL! :", _a); \
+ STOP_FATAL(); \
+ } while (0)
+
+#define _DBGOP_N_TIMES(_count, _op) do { \
+ static int fDoWarnCount = (_count); \
+ if (fDoWarnCount) { \
+ --fDoWarnCount; \
+ _op; \
+ } \
+ } while (0)
+
+#define WARN_ONCE(_a) do { \
+ _DBGOP_N_TIMES(1, WARN(_a)); \
+ } while (0)
+
+
#define LOG(_a) _LOGMSG(VBOX_VIDEO_LOG_LOGGER, "", _a)
#define LOGREL(_a) _LOGMSG(VBOX_VIDEO_LOGREL_LOGGER, "", _a)
#define LOGF(_a) _LOGMSG(VBOX_VIDEO_LOGFLOW_LOGGER, "", _a)
diff --git a/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoTools.h b/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoTools.h
index d4b9cf6a..a1f7ec91 100644
--- a/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoTools.h
+++ b/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoTools.h
@@ -347,7 +347,7 @@ DECLINLINE(void) vboxWddmDirtyRegionAddRect(PVBOXWDDM_DIRTYREGION pInfo, const R
}
}
-DECLINLINE(void) vboxWddmDirtyRegionUnite(PVBOXWDDM_DIRTYREGION pInfo, const PVBOXWDDM_DIRTYREGION pInfo2)
+DECLINLINE(void) vboxWddmDirtyRegionUnite(PVBOXWDDM_DIRTYREGION pInfo, const VBOXWDDM_DIRTYREGION *pInfo2)
{
if (pInfo2->fFlags & VBOXWDDM_DIRTYREGION_F_VALID)
{
diff --git a/src/VBox/Additions/WINNT/Graphics/Video/common/wddm/VBoxMPIf.h b/src/VBox/Additions/WINNT/Graphics/Video/common/wddm/VBoxMPIf.h
index 32c90041..bd2776d9 100644
--- a/src/VBox/Additions/WINNT/Graphics/Video/common/wddm/VBoxMPIf.h
+++ b/src/VBox/Additions/WINNT/Graphics/Video/common/wddm/VBoxMPIf.h
@@ -13,7 +13,7 @@
*/
/*
- * Copyright (C) 2011 Oracle Corporation
+ * 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;
@@ -34,7 +34,7 @@
#include <VBox/VBoxGuest2.h>
/* One would increase this whenever definitions in this file are changed */
-#define VBOXVIDEOIF_VERSION 13
+#define VBOXVIDEOIF_VERSION 20
#define VBOXWDDM_NODE_ID_SYSTEM 0
#define VBOXWDDM_NODE_ID_3D (VBOXWDDM_NODE_ID_SYSTEM)
@@ -91,6 +91,7 @@ typedef struct VBOXWDDM_SURFACE_DESC
UINT pitch;
UINT depth;
UINT slicePitch;
+ UINT d3dWidth;
UINT cbSize;
D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
D3DDDI_RATIONAL RefreshRate;
@@ -104,6 +105,8 @@ typedef struct VBOXWDDM_ALLOCINFO
struct
{
D3DDDI_RESOURCEFLAGS fFlags;
+ /* id used to identify the allocation on the host */
+ uint32_t hostID;
uint64_t hSharedHandle;
VBOXWDDM_SURFACE_DESC SurfDesc;
};
@@ -111,7 +114,6 @@ typedef struct VBOXWDDM_ALLOCINFO
struct
{
uint32_t cbBuffer;
- uint64_t hSynch;
VBOXUHGSMI_BUFFER_TYPE_FLAGS fUhgsmiType;
};
};
@@ -179,7 +181,6 @@ typedef struct VBOXWDDM_DMA_PRIVATEDATA_BASEHDR
typedef struct VBOXWDDM_UHGSMI_BUFFER_UI_SUBMIT_INFO
{
- uint32_t bDoNotSignalCompletion;
uint32_t offData;
uint32_t cbData;
} VBOXWDDM_UHGSMI_BUFFER_UI_SUBMIT_INFO, *PVBOXWDDM_UHGSMI_BUFFER_UI_SUBMIT_INFO;
@@ -190,6 +191,7 @@ typedef struct VBOXWDDM_DMA_PRIVATEDATA_UM_CHROMIUM_CMD
VBOXWDDM_UHGSMI_BUFFER_UI_SUBMIT_INFO aBufInfos[1];
} VBOXWDDM_DMA_PRIVATEDATA_UM_CHROMIUM_CMD, *PVBOXWDDM_DMA_PRIVATEDATA_UM_CHROMIUM_CMD;
+
#define VBOXVHWA_F_ENABLED 0x00000001
#define VBOXVHWA_F_CKEY_DST 0x00000002
#define VBOXVHWA_F_CKEY_SRC 0x00000004
@@ -248,7 +250,11 @@ typedef enum
VBOXWDDM_CONTEXT_TYPE_CUSTOM_UHGSMI_3D,
VBOXWDDM_CONTEXT_TYPE_CUSTOM_UHGSMI_GL,
/* context created by the kernel->user communication mechanism for visible rects reporting, etc. */
- VBOXWDDM_CONTEXT_TYPE_CUSTOM_SESSION
+ VBOXWDDM_CONTEXT_TYPE_CUSTOM_SESSION,
+ /* context created by VBoxTray to handle resize operations */
+ VBOXWDDM_CONTEXT_TYPE_CUSTOM_DISPIF_RESIZE,
+ /* context created by VBoxTray to handle seamless operations */
+ VBOXWDDM_CONTEXT_TYPE_CUSTOM_DISPIF_SEAMLESS
} VBOXWDDM_CONTEXT_TYPE;
typedef struct VBOXWDDM_CREATECONTEXT_INFO
@@ -420,6 +426,7 @@ typedef struct VBOXSWAPCHAININFO
{
VBOXDISP_KMHANDLE hSwapchainKm; /* in, NULL if new is being created */
VBOXDISP_UMHANDLE hSwapchainUm; /* in, UMD private data */
+ int32_t winHostID;
RECT Rect;
UINT u32Reserved;
UINT cAllocs;
@@ -470,6 +477,15 @@ typedef struct VBOXDISPIFESCAPE_SHRC_REF
uint64_t hAlloc;
} VBOXDISPIFESCAPE_SHRC_REF, *PVBOXDISPIFESCAPE_SHRC_REF;
+typedef struct VBOXDISPIFESCAPE_SETALLOCHOSTID
+{
+ VBOXDISPIFESCAPE EscapeHdr;
+ int32_t rc;
+ uint32_t hostID;
+ uint64_t hAlloc;
+
+} VBOXDISPIFESCAPE_SETALLOCHOSTID, *PVBOXDISPIFESCAPE_SETALLOCHOSTID;
+
typedef struct VBOXDISPIFESCAPE_CRHGSMICTLCON_CALL
{
VBOXDISPIFESCAPE EscapeHdr;
@@ -480,6 +496,7 @@ typedef struct VBOXDISPIFESCAPE_CRHGSMICTLCON_CALL
typedef struct VBOXWDDM_QI
{
uint32_t u32Version;
+ uint32_t u32VBox3DCaps;
uint32_t cInfos;
VBOXVHWA_INFO aInfos[VBOX_VIDEO_MAX_SCREENS];
} VBOXWDDM_QI;
@@ -530,6 +547,7 @@ DECLINLINE(UINT) vboxWddmCalcBitsPerPixel(D3DDDIFORMAT enmFormat)
case D3DDDIFMT_A2R10G10B10:
return 32;
case D3DDDIFMT_A16B16G16R16:
+ case D3DDDIFMT_A16B16G16R16F:
return 64;
case D3DDDIFMT_A8P8:
return 16;
@@ -577,6 +595,8 @@ DECLINLINE(UINT) vboxWddmCalcBitsPerPixel(D3DDDIFORMAT enmFormat)
return 8;
case D3DDDIFMT_R32F:
return 32;
+ case D3DDDIFMT_R16F:
+ return 16;
default:
AssertBreakpoint();
return 0;
diff --git a/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h b/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h
index 6a759628..5fb97ac8 100644
--- a/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h
+++ b/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h
@@ -58,6 +58,10 @@
#define IOCTL_VIDEO_VHWA_QUERY_INFO \
CTL_CODE(FILE_DEVICE_VIDEO, 0x435, METHOD_BUFFERED, FILE_ANY_ACCESS)
+/* Called to get adapter's generic information */
+#define IOCTL_VIDEO_QUERY_VBOXVIDEO_INFO \
+ CTL_CODE(FILE_DEVICE_VIDEO, 0x436, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
/* ==================== Data structures used by Virtual Box VRPS's ==================== */
typedef void* HVBOXVIDEOHGSMI;
@@ -146,4 +150,9 @@ typedef struct _VHWAQUERYINFO
#endif
#pragma pack()
+/* IOCTL_VIDEO_QUERY_INFO */
+#define VBOXVIDEO_INFO_LEVEL_REGISTRY_FLAGS 1
+
+#define VBOXVIDEO_REGISTRY_FLAGS_DISABLE_BITMAP_CACHE 0x00000001
+
#endif /*VBOXVIDEOIOCTL_H*/
diff --git a/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoPortAPI.h b/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoPortAPI.h
index a49641f7..01147a58 100644
--- a/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoPortAPI.h
+++ b/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoPortAPI.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (C) 2011 Oracle Corporation
+ * 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;