source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/dmemmgr.h@ 1194

Last change on this file since 1194 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.0 KB
Line 
1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#ifndef __DMEMMGR_INCLUDED__
7#define __DMEMMGR_INCLUDED__
8
9#include <winapifamily.h>
10
11#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
12
13#define VMEMHEAP_LINEAR __MSABI_LONG(0x1)
14#define VMEMHEAP_RECTANGULAR __MSABI_LONG(0x2)
15#define VMEMHEAP_ALIGNMENT __MSABI_LONG(0x4)
16
17#define SURFACEALIGN_DISCARDABLE __MSABI_LONG(0x1)
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23 typedef ULONG_PTR FLATPTR;
24
25 typedef struct _SURFACEALIGNMENT {
26 __C89_NAMELESS union {
27 struct {
28 DWORD dwStartAlignment;
29 DWORD dwPitchAlignment;
30 DWORD dwFlags;
31 DWORD dwReserved2;
32 } Linear;
33 struct {
34 DWORD dwXAlignment;
35 DWORD dwYAlignment;
36 DWORD dwFlags;
37 DWORD dwReserved2;
38 } Rectangular;
39 };
40 } SURFACEALIGNMENT;
41
42 typedef struct _HEAPALIGNMENT {
43 DWORD dwSize;
44 DDSCAPS ddsCaps;
45 DWORD dwReserved;
46 SURFACEALIGNMENT ExecuteBuffer;
47 SURFACEALIGNMENT Overlay;
48 SURFACEALIGNMENT Texture;
49 SURFACEALIGNMENT ZBuffer;
50 SURFACEALIGNMENT AlphaBuffer;
51 SURFACEALIGNMENT Offscreen;
52 SURFACEALIGNMENT FlipTarget;
53 } HEAPALIGNMENT;
54
55 typedef struct _DD_GETHEAPALIGNMENTDATA {
56 ULONG_PTR dwInstance;
57 DWORD dwHeap;
58 HRESULT ddRVal;
59 VOID *GetHeapAlignment;
60 HEAPALIGNMENT Alignment;
61 } DD_GETHEAPALIGNMENTDATA;
62
63 typedef struct _VMEML {
64 struct _VMEML *next;
65 FLATPTR ptr;
66 DWORD size;
67 WINBOOL bDiscardable;
68 } VMEML,*LPVMEML,**LPLPVMEML;
69
70 typedef struct _VMEMR {
71 struct _VMEMR *next;
72 struct _VMEMR *prev;
73 struct _VMEMR *pUp;
74 struct _VMEMR *pDown;
75 struct _VMEMR *pLeft;
76 struct _VMEMR *pRight;
77 FLATPTR ptr;
78 DWORD size;
79 DWORD x;
80 DWORD y;
81 DWORD cx;
82 DWORD cy;
83 DWORD flags;
84 FLATPTR pBits;
85 WINBOOL bDiscardable;
86 } VMEMR,*LPVMEMR,**LPLPVMEMR;
87
88 typedef struct _VMEMHEAP {
89 DWORD dwFlags;
90 DWORD stride;
91 LPVOID freeList;
92 LPVOID allocList;
93 DWORD dwTotalSize;
94 FLATPTR fpGARTLin;
95 FLATPTR fpGARTDev;
96 DWORD dwCommitedSize;
97 DWORD dwCoalesceCount;
98 HEAPALIGNMENT Alignment;
99 DDSCAPSEX ddsCapsEx;
100 DDSCAPSEX ddsCapsExAlt;
101#ifndef IS_16
102 LARGE_INTEGER liPhysAGPBase;
103#endif
104 HANDLE hdevAGP;
105 LPVOID pvPhysRsrv;
106#if NTDDI_VERSION >= 0x05010000
107 BYTE *pAgpCommitMask;
108 DWORD dwAgpCommitMaskSize;
109#endif
110 } VMEMHEAP;
111
112#ifndef __NTDDKCOMP__
113 typedef struct _VIDMEM *LPVIDMEM;
114#else
115 typedef struct _VIDEOMEMORY *LPVIDMEM;
116#endif
117
118 typedef struct _SURFACEALIGNMENT *LPSURFACEALIGNMENT;
119 typedef struct _HEAPALIGNMENT *LPHEAPALIGNMENT;
120 typedef struct _DD_GETHEAPALIGNMENTDATA *PDD_GETHEAPALIGNMENTDATA;
121 typedef VMEMHEAP *LPVMEMHEAP;
122
123#ifndef __NTDDKCOMP__
124 extern FLATPTR WINAPI VidMemAlloc (LPVMEMHEAP pvmh, DWORD width, DWORD height);
125#endif
126 extern FLATPTR WINAPI HeapVidMemAllocAligned (LPVIDMEM lpVidMem, DWORD dwWidth, DWORD dwHeight, LPSURFACEALIGNMENT lpAlignment, LPLONG lpNewPitch);
127 extern void WINAPI VidMemFree (LPVMEMHEAP pvmh, FLATPTR ptr);
128
129#ifdef __cplusplus
130};
131#endif
132
133#endif
134#endif
Note: See TracBrowser for help on using the repository browser.