VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoIf.h@ 29488

Last change on this file since 29488 was 29488, checked in by vboxsync, 15 years ago

wddm: getcaps for d3d9, start impl 2D support

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/** @file
2 * Contains base definitions of constants & structures used
3 * to control & perform rendering,
4 * such as DMA commands types, allocation types, escape codes, etc.
5 * used by both miniport & display drivers.
6 *
7 * The latter uses these and only these defs to communicate with the former
8 * by posting appropriate requests via D3D RT Krnl Svc accessing callbacks.
9 */
10/*
11 * Copyright (C) 2010 Oracle Corporation
12 *
13 * This file is part of VirtualBox Open Source Edition (OSE), as
14 * available from http://www.virtualbox.org. This file is free software;
15 * you can redistribute it and/or modify it under the terms of the GNU
16 * General Public License (GPL) as published by the Free Software
17 * Foundation, in version 2 as it comes in the "COPYING" file of the
18 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
19 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
20 */
21#ifndef ___VBoxVideoIf_h___
22#define ___VBoxVideoIf_h___
23
24#include <VBox/VBoxVideo.h>
25
26/* create allocation func */
27typedef enum
28{
29 VBOXWDDM_ALLOC_TYPE_UNEFINED = 0,
30 VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE,
31 VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE,
32 VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE,
33 /* this one is win 7-specific and hence unused for now */
34 VBOXWDDM_ALLOC_TYPE_STD_GDISURFACE
35 /* custom allocation types requested from user-mode d3d module will go here */
36} VBOXWDDM_ALLOC_TYPE;
37
38typedef struct VBOXWDDM_SURFACE_DESC
39{
40 UINT width;
41 UINT height;
42 D3DDDIFORMAT format;
43 UINT bpp;
44 UINT pitch;
45} VBOXWDDM_SURFACE_DESC, *PVBOXWDDM_SURFACE_DESC;
46
47typedef struct VBOXWDDM_ALLOCINFO
48{
49 VBOXWDDM_ALLOC_TYPE enmType;
50 union
51 {
52 VBOXWDDM_SURFACE_DESC SurfInfo;
53 } u;
54} VBOXWDDM_ALLOCINFO, *PVBOXWDDM_ALLOCINFO;
55
56#define VBOXWDDM_ALLOCINFO_HEADSIZE() (sizeof (VBOXWDDM_ALLOCINFO))
57#define VBOXWDDM_ALLOCINFO_SIZE_FROMBODYSIZE(_s) (VBOXWDDM_ALLOCINFO_HEADSIZE() + (_s))
58#define VBOXWDDM_ALLOCINFO_SIZE(_tCmd) (VBOXWDDM_ALLOCINFO_SIZE_FROMBODYSIZE(sizeof(_tCmd)))
59#define VBOXWDDM_ALLOCINFO_BODY(_p, _t) ( (_t*)(((uint8_t*)(_p)) + VBOXWDDM_ALLOCINFO_HEADSIZE()) )
60#define VBOXWDDM_ALLOCINFO_HEAD(_pb) ((VBOXWDDM_ALLOCINFO*)((uint8_t *)(_pb) - VBOXWDDM_ALLOCATION_HEADSIZE()))
61
62/* query info func */
63typedef enum
64{
65 VBOXWDDM_QI_TYPE_UNEFINED = 0,
66#ifdef VBOX_WITH_VIDEOHWACCEL
67 /* VBOXVHWACMD_QUERYINFO1 */
68 VBOXWDDM_QI_TYPE_2D_1,
69 /* VBOXVHWACMD_QUERYINFO2 */
70 VBOXWDDM_QI_TYPE_2D_2
71#endif
72} VBOXWDDM_QI_TYPE;
73
74typedef struct VBOXWDDM_QI
75{
76 VBOXWDDM_QI_TYPE enmType;
77 int rc;
78} VBOXWDDM_QI;
79
80typedef struct VBOXWDDM_QI_2D_1
81{
82 VBOXWDDM_QI hdr;
83 VBOXVHWACMD_QUERYINFO1 Info;
84} VBOXWDDM_QI_2D_1;
85
86typedef struct VBOXWDDM_QI_2D_2
87{
88 VBOXWDDM_QI hdr;
89 VBOXVHWACMD_QUERYINFO2 Info;
90} VBOXWDDM_QI_2D_2;
91
92/* submit cmd func */
93
94#endif /* #ifndef ___VBoxVideoIf_h___ */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette