[UFFS]
[reactos.git] / rostests / dxtest / win32kdxtest / dump.c
1 /* All testcase are base how windows 2000 sp4 acting */
2
3
4 #include <stdio.h>
5 #include <windows.h>
6 #include <wingdi.h>
7 #include <winddi.h>
8 #include <d3dnthal.h>
9
10 #include "test.h"
11
12 /* this flag are only set for dx5 and lower but we need check see if we getting it back from win32k or not */
13 #define D3DLIGHTCAPS_GLSPOT 0x00000010
14
15 /* this flag are only set for dx6 and lower but we need check see if we getting it back from win32k or not */
16 #define D3DLIGHTCAPS_PARALLELPOINT 0x00000008
17
18 #define checkflag(dwflag,dwvalue,text) \
19 if (dwflag & dwvalue) \
20 { \
21 if (count!=0) \
22 { \
23 printf("| "); \
24 } \
25 dwflag = (ULONG)dwflag - (ULONG)dwvalue; \
26 printf("%s ",text); \
27 count++; \
28 }
29
30 #define endcheckflag(dwflag,text) \
31 if (count==0) \
32 printf("0x%08lx\n", (ULONG) dwflag);\
33 else \
34 printf("\n");\
35 if (flag != 0) \
36 printf("undoc value in %s flags value %08lx\n",text, (ULONG) dwflag);
37
38
39
40 void
41 dump_CallBackFlags(DWORD *pCallBackFlags, char *text)
42 {
43 UINT flag;
44 INT count;
45
46 printf("dumping the CallBackFlags from %s\n",text);
47 printf("pCallBackFlags[0] : ");
48
49 flag=pCallBackFlags[0];
50 count=0;
51 checkflag(flag,DDHAL_CB32_CANCREATESURFACE,"DDHAL_CB32_CANCREATESURFACE");
52 checkflag(flag,DDHAL_CB32_CREATEPALETTE,"DDHAL_CB32_CREATEPALETTE");
53 checkflag(flag,DDHAL_CB32_CREATESURFACE,"DDHAL_CB32_CREATESURFACE");
54 checkflag(flag,DDHAL_CB32_GETSCANLINE,"DDHAL_CB32_GETSCANLINE");
55 checkflag(flag,DDHAL_CB32_MAPMEMORY,"DDHAL_CB32_MAPMEMORY");
56 checkflag(flag,DDHAL_CB32_SETCOLORKEY,"DDHAL_CB32_SETCOLORKEY");
57 checkflag(flag,DDHAL_CB32_SETMODE,"DDHAL_CB32_SETMODE");
58 checkflag(flag,DDHAL_CB32_WAITFORVERTICALBLANK,"DDHAL_CB32_WAITFORVERTICALBLANK");
59 endcheckflag(flag,"pCallBackFlags[0]");
60
61 /* SURFACE callback */
62 printf("pCallBackFlags[1] : ");
63 flag = pCallBackFlags[1];
64 count = 0;
65 checkflag(flag,DDHAL_SURFCB32_ADDATTACHEDSURFACE,"DDHAL_SURFCB32_ADDATTACHEDSURFACE");
66 checkflag(flag,DDHAL_SURFCB32_BLT,"DDHAL_SURFCB32_BLT");
67 checkflag(flag,DDHAL_SURFCB32_DESTROYSURFACE,"DDHAL_SURFCB32_DESTROYSURFACE");
68 checkflag(flag,DDHAL_SURFCB32_FLIP,"DDHAL_SURFCB32_FLIP");
69 checkflag(flag,DDHAL_SURFCB32_GETBLTSTATUS,"DDHAL_SURFCB32_GETBLTSTATUS");
70 checkflag(flag,DDHAL_SURFCB32_GETFLIPSTATUS,"DDHAL_SURFCB32_GETFLIPSTATUS");
71 checkflag(flag,DDHAL_SURFCB32_LOCK,"DDHAL_SURFCB32_LOCK");
72 checkflag(flag,DDHAL_SURFCB32_RESERVED4,"DDHAL_SURFCB32_RESERVED4");
73 checkflag(flag,DDHAL_SURFCB32_SETCLIPLIST,"DDHAL_SURFCB32_SETCLIPLIST");
74 checkflag(flag,DDHAL_SURFCB32_SETCOLORKEY,"DDHAL_SURFCB32_SETCOLORKEY");
75 checkflag(flag,DDHAL_SURFCB32_SETOVERLAYPOSITION,"DDHAL_SURFCB32_SETOVERLAYPOSITION");
76 checkflag(flag,DDHAL_SURFCB32_SETPALETTE,"DDHAL_SURFCB32_SETPALETTE");
77 checkflag(flag,DDHAL_SURFCB32_UNLOCK,"DDHAL_SURFCB32_UNLOCK");
78 checkflag(flag,DDHAL_SURFCB32_UPDATEOVERLAY,"DDHAL_SURFCB32_UPDATEOVERLAY");
79 endcheckflag(flag,"pCallBackFlags[1]");
80
81
82 /* palleted */
83 printf("pCallBackFlags[2] : ");
84 flag = pCallBackFlags[2];
85 count = 0;
86 checkflag(flag,DDHAL_PALCB32_DESTROYPALETTE,"DDHAL_PALCB32_DESTROYPALETTE");
87 checkflag(flag,DDHAL_PALCB32_SETENTRIES,"DDHAL_PALCB32_SETENTRIES");
88 endcheckflag(flag,"pCallBackFlags[2]");
89 }
90
91 void
92 dump_halinfo(DD_HALINFO *pHalInfo, char *text)
93 {
94 printf("dumping the DD_HALINFO from %s\n",text);
95
96 if (pHalInfo->dwSize == sizeof(DD_HALINFO_V4))
97 {
98 DD_HALINFO_V4 *pHalInfo4 = (DD_HALINFO_V4 *) pHalInfo;
99 int t;
100
101 printf("DD_HALINFO Version NT4 found \n");
102 printf(" pHalInfo4->dwSize : 0x%08lx\n",(long)pHalInfo4->dwSize);
103 printf(" pHalInfo4->vmiData->fpPrimary : 0x%08lx\n",(long)pHalInfo4->vmiData.fpPrimary);
104 printf(" pHalInfo4->vmiData->dwFlags : 0x%08lx\n",(long)pHalInfo4->vmiData.dwFlags);
105 printf(" pHalInfo4->vmiData->dwDisplayWidth : 0x%08lx\n",(long)pHalInfo4->vmiData.dwDisplayWidth);
106 printf(" pHalInfo4->vmiData->dwDisplayHeight : 0x%08lx\n",(long)pHalInfo4->vmiData.dwDisplayHeight);
107 printf(" pHalInfo4->vmiData->lDisplayPitch : 0x%08lx\n",(long)pHalInfo4->vmiData.lDisplayPitch);
108
109 printf(" pHalInfo4->vmiData->ddpfDisplay.dwSize : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwSize);
110 printf(" pHalInfo4->vmiData->ddpfDisplay.dwFlags : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwFlags);
111 printf(" pHalInfo4->vmiData->ddpfDisplay.dwFourCC : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwFourCC);
112 printf(" pHalInfo4->vmiData->ddpfDisplay.dwRGBBitCount : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwRGBBitCount);
113 printf(" pHalInfo4->vmiData->ddpfDisplay.dwRBitMask : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwRBitMask);
114 printf(" pHalInfo4->vmiData->ddpfDisplay.dwGBitMask : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwGBitMask);
115 printf(" pHalInfo4->vmiData->ddpfDisplay.dwBBitMask : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwBBitMask);
116 printf(" pHalInfo4->vmiData->ddpfDisplay.dwRGBAlphaBitMask : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwRGBAlphaBitMask);
117
118 printf(" pHalInfo4->vmiData->dwOffscreenAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwOffscreenAlign);
119 printf(" pHalInfo4->vmiData->dwOverlayAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwOverlayAlign);
120 printf(" pHalInfo4->vmiData->dwTextureAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwTextureAlign);
121 printf(" pHalInfo4->vmiData->dwZBufferAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwZBufferAlign);
122 printf(" pHalInfo4->vmiData->dwAlphaAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwAlphaAlign);
123 printf(" pHalInfo4->vmiData->pvPrimary : 0x%08lx\n",(long)pHalInfo4->vmiData.pvPrimary);
124
125 printf(" pHalInfo4->ddCaps.dwSize : 0x%08lx\n",pHalInfo4->ddCaps.dwSize);
126 printf(" pHalInfo4->ddCaps.dwCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwCaps);
127 printf(" pHalInfo4->ddCaps.dwCaps2 : 0x%08lx\n",pHalInfo4->ddCaps.dwCaps2);
128 printf(" pHalInfo4->ddCaps.dwCKeyCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwCKeyCaps);
129 printf(" pHalInfo4->ddCaps.dwFXCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwFXCaps);
130 printf(" pHalInfo4->ddCaps.dwFXAlphaCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwFXAlphaCaps);
131 printf(" pHalInfo4->ddCaps.dwPalCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwPalCaps);
132 printf(" pHalInfo4->ddCaps.dwSVCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSVCaps);
133 printf(" pHalInfo4->ddCaps.dwAlphaBltConstBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaBltConstBitDepths);
134 printf(" pHalInfo4->ddCaps.dwAlphaBltPixelBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaBltPixelBitDepths);
135 printf(" pHalInfo4->ddCaps.dwAlphaBltSurfaceBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaBltSurfaceBitDepths);
136 printf(" pHalInfo4->ddCaps.dwAlphaOverlayConstBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaOverlayConstBitDepths);
137 printf(" pHalInfo4->ddCaps.dwAlphaOverlayPixelBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaOverlayPixelBitDepths);
138 printf(" pHalInfo4->ddCaps.dwAlphaOverlaySurfaceBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaOverlaySurfaceBitDepths);
139 printf(" pHalInfo4->ddCaps.dwZBufferBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwZBufferBitDepths);
140 printf(" pHalInfo4->ddCaps.dwVidMemTotal : 0x%08lx\n",pHalInfo4->ddCaps.dwVidMemTotal);
141 printf(" pHalInfo4->ddCaps.dwVidMemFree : 0x%08lx\n",pHalInfo4->ddCaps.dwVidMemFree);
142 printf(" pHalInfo4->ddCaps.dwMaxVisibleOverlays : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxVisibleOverlays);
143 printf(" pHalInfo4->ddCaps.dwCurrVisibleOverlays : 0x%08lx\n",pHalInfo4->ddCaps.dwCurrVisibleOverlays);
144 printf(" pHalInfo4->ddCaps.dwNumFourCCCodes : 0x%08lx\n",pHalInfo4->ddCaps.dwNumFourCCCodes);
145 printf(" pHalInfo4->ddCaps.dwAlignBoundarySrc : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignBoundarySrc);
146 printf(" pHalInfo4->ddCaps.dwAlignSizeSrc : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignSizeSrc);
147 printf(" pHalInfo4->ddCaps.dwAlignBoundaryDes : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignBoundaryDest);
148 printf(" pHalInfo4->ddCaps.dwAlignSizeDest : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignSizeDest);
149 printf(" pHalInfo4->ddCaps.dwAlignStrideAlign : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignStrideAlign);
150 for (t=0;t<DD_ROP_SPACE;t++)
151 {
152 printf(" pHalInfo4->ddCaps.dwRops[0x%04x] : 0x%08lx\n",t,pHalInfo4->ddCaps.dwRops[t]);
153 }
154 printf(" pHalInfo4->ddCaps.ddsCaps.dwCaps : 0x%08lx\n",pHalInfo4->ddCaps.ddsCaps.dwCaps);
155 printf(" pHalInfo4->ddCaps.dwMinOverlayStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMinOverlayStretch);
156 printf(" pHalInfo4->ddCaps.dwMaxOverlayStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxOverlayStretch);
157 printf(" pHalInfo4->ddCaps.dwMinLiveVideoStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMinLiveVideoStretch);
158 printf(" pHalInfo4->ddCaps.dwMaxLiveVideoStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxLiveVideoStretch);
159 printf(" pHalInfo4->ddCaps.dwMinHwCodecStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMinHwCodecStretch);
160 printf(" pHalInfo4->ddCaps.dwMaxHwCodecStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxHwCodecStretch);
161 printf(" pHalInfo4->ddCaps.dwReserved1 : 0x%08lx\n",pHalInfo4->ddCaps.dwReserved1);
162 printf(" pHalInfo4->ddCaps.dwReserved2 : 0x%08lx\n",pHalInfo4->ddCaps.dwReserved2);
163 printf(" pHalInfo4->ddCaps.dwReserved3 : 0x%08lx\n",pHalInfo4->ddCaps.dwReserved3);
164 printf(" pHalInfo4->ddCaps.dwSVBCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSVBCaps);
165 printf(" pHalInfo4->ddCaps.dwSVBCKeyCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSVBCKeyCaps);
166 printf(" pHalInfo4->ddCaps.dwSVBFXCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSVBFXCaps);
167 for (t=0;t<DD_ROP_SPACE;t++)
168 {
169 printf(" pHalInfo4->ddCaps.dwSVBRops[0x%04x] : 0x%08lx\n",t,pHalInfo4->ddCaps.dwSVBRops[t]);
170 }
171 printf(" pHalInfo4->ddCaps.dwVSBCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwVSBCaps);
172 printf(" pHalInfo4->ddCaps.dwVSBCKeyCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwVSBCKeyCaps);
173 printf(" pHalInfo4->ddCaps.dwVSBFXCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwVSBFXCaps);
174 for (t=0;t<DD_ROP_SPACE;t++)
175 {
176 printf(" pHalInfo4->ddCaps.dwVSBRops[0x%04x] : 0x%08lx\n",t,pHalInfo4->ddCaps.dwVSBRops[t]);
177 }
178 printf(" pHalInfo4->ddCaps.dwSSBCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSSBCaps);
179 printf(" pHalInfo4->ddCaps.dwSSBCKeyCa : 0x%08lx\n",pHalInfo4->ddCaps.dwSSBCKeyCaps);
180 printf(" pHalInfo4->ddCaps.dwSSBFXCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSSBFXCaps);
181 for (t=0;t<DD_ROP_SPACE;t++)
182 {
183 printf(" pHalInfo4->ddCaps.dwSSBRops[0x%04x] : 0x%08lx\n",t,pHalInfo4->ddCaps.dwSSBRops[t]);
184 }
185
186 printf(" pHalInfo4->ddCaps.dwMaxVideoPorts : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxVideoPorts);
187 printf(" pHalInfo4->ddCaps.dwCurrVideoPorts : 0x%08lx\n",pHalInfo4->ddCaps.dwCurrVideoPorts);
188 printf(" pHalInfo4->ddCaps.dwSVBCaps2 : 0x%08lx\n",pHalInfo4->ddCaps.dwSVBCaps2);
189
190
191 printf(" pHalInfo4->GetDriverInfo : 0x%08lx\n",(long)pHalInfo4->GetDriverInfo);
192 printf(" pHalInfo4->dwFlags : 0x%08lx\n",(long)pHalInfo4->dwFlags);
193
194 }
195 else if (pHalInfo->dwSize == sizeof(DD_HALINFO))
196 {
197 int t;
198 UINT flag;
199 INT count=0;
200
201 printf("DD_HALINFO Version NT 2000/XP/2003 found \n");
202 printf(" pHalInfo->dwSize : 0x%08lx\n",(long)pHalInfo->dwSize);
203
204 printf(" pHalInfo->vmiData->fpPrimary : 0x%08lx\n",(long)pHalInfo->vmiData.fpPrimary);
205 printf(" pHalInfo->vmiData->dwFlags : 0x%08lx\n",(long)pHalInfo->vmiData.dwFlags);
206 printf(" pHalInfo->vmiData->dwDisplayWidth : 0x%08lx\n",(long)pHalInfo->vmiData.dwDisplayWidth);
207 printf(" pHalInfo->vmiData->dwDisplayHeight : 0x%08lx\n",(long)pHalInfo->vmiData.dwDisplayHeight);
208 printf(" pHalInfo->vmiData->lDisplayPitch : 0x%08lx\n",(long)pHalInfo->vmiData.lDisplayPitch);
209
210 printf(" pHalInfo->vmiData->ddpfDisplay.dwSize : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwSize);
211 printf(" pHalInfo->vmiData->ddpfDisplay.dwFlags : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwFlags);
212 printf(" pHalInfo->vmiData->ddpfDisplay.dwFourCC : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwFourCC);
213 printf(" pHalInfo->vmiData->ddpfDisplay.dwRGBBitCount : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwRGBBitCount);
214 printf(" pHalInfo->vmiData->ddpfDisplay.dwRBitMask : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwRBitMask);
215 printf(" pHalInfo->vmiData->ddpfDisplay.dwGBitMask : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwGBitMask);
216 printf(" pHalInfo->vmiData->ddpfDisplay.dwBBitMask : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwBBitMask);
217 printf(" pHalInfo->vmiData->ddpfDisplay.dwRGBAlphaBitMask : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwRGBAlphaBitMask);
218
219
220 printf(" pHalInfo->vmiData->dwOffscreenAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwOffscreenAlign);
221 printf(" pHalInfo->vmiData->dwOverlayAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwOverlayAlign);
222 printf(" pHalInfo->vmiData->dwTextureAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwTextureAlign);
223 printf(" pHalInfo->vmiData->dwZBufferAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwZBufferAlign);
224 printf(" pHalInfo->vmiData->dwAlphaAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwAlphaAlign);
225 printf(" pHalInfo->vmiData->pvPrimary : 0x%08lx\n",(long)pHalInfo->vmiData.pvPrimary);
226
227 printf(" pHalInfo->ddCaps.dwSize : 0x%08lx\n",pHalInfo->ddCaps.dwSize);
228 printf(" pHalInfo->ddCaps.dwCaps : ");
229 flag = pHalInfo->ddCaps.dwCaps;
230 count = 0;
231 checkflag(flag,DDCAPS_3D,"DDCAPS_3D");
232 checkflag(flag,DDCAPS_ALIGNBOUNDARYDEST,"DDCAPS_ALIGNBOUNDARYDEST");
233 checkflag(flag,DDCAPS_ALIGNBOUNDARYSRC,"DDCAPS_ALIGNBOUNDARYSRC");
234 checkflag(flag,DDCAPS_ALIGNSIZEDEST,"DDCAPS_ALIGNSIZEDEST");
235 checkflag(flag,DDCAPS_ALIGNSIZESRC,"DDCAPS_ALIGNSIZESRC");
236 checkflag(flag,DDCAPS_ALIGNSTRIDE,"DDCAPS_ALIGNSTRIDE");
237 checkflag(flag,DDCAPS_ALPHA,"DDCAPS_ALPHA");
238 checkflag(flag,DDCAPS_BANKSWITCHED,"DDCAPS_BANKSWITCHED");
239 checkflag(flag,DDCAPS_BLT,"DDCAPS_BLT");
240 checkflag(flag,DDCAPS_BLTCOLORFILL,"DDCAPS_BLTCOLORFILL");
241 checkflag(flag,DDCAPS_BLTDEPTHFILL,"DDCAPS_BLTDEPTHFILL");
242 checkflag(flag,DDCAPS_BLTFOURCC,"DDCAPS_BLTFOURCC");
243 checkflag(flag,DDCAPS_BLTQUEUE,"DDCAPS_BLTQUEUE");
244 checkflag(flag,DDCAPS_BLTSTRETCH,"DDCAPS_BLTSTRETCH");
245 checkflag(flag,DDCAPS_CANBLTSYSMEM,"DDCAPS_CANBLTSYSMEM");
246 checkflag(flag,DDCAPS_CANCLIP,"DDCAPS_CANCLIP");
247 checkflag(flag,DDCAPS_CANCLIPSTRETCHED,"DDCAPS_CANCLIPSTRETCHED");
248 checkflag(flag,DDCAPS_COLORKEY,"DDCAPS_COLORKEY");
249 checkflag(flag,DDCAPS_COLORKEYHWASSIST,"DDCAPS_COLORKEYHWASSIST");
250 checkflag(flag,DDCAPS_GDI,"DDCAPS_GDI");
251 checkflag(flag,DDCAPS_NOHARDWARE,"DDCAPS_NOHARDWARE");
252 checkflag(flag,DDCAPS_OVERLAY,"DDCAPS_OVERLAY");
253 checkflag(flag,DDCAPS_OVERLAYCANTCLIP,"DDCAPS_OVERLAYCANTCLIP");
254 checkflag(flag,DDCAPS_OVERLAYFOURCC,"DDCAPS_OVERLAYFOURCC");
255 checkflag(flag,DDCAPS_OVERLAYSTRETCH,"DDCAPS_OVERLAYSTRETCH");
256 checkflag(flag,DDCAPS_PALETTE,"DDCAPS_PALETTE");
257 checkflag(flag,DDCAPS_PALETTEVSYNC,"DDCAPS_PALETTEVSYNC");
258 checkflag(flag,DDCAPS_READSCANLINE,"DDCAPS_READSCANLINE");
259 checkflag(flag,DDCAPS_STEREOVIEW,"DDCAPS_STEREOVIEW");
260 checkflag(flag,DDCAPS_VBI,"DDCAPS_VBI");
261 checkflag(flag,DDCAPS_ZBLTS,"DDCAPS_ZBLTS");
262 checkflag(flag,DDCAPS_ZOVERLAYS,"DDCAPS_ZOVERLAYS");
263 endcheckflag(flag,"pHalInfo->ddCaps.dwCaps");
264
265 printf(" pHalInfo->ddCaps.dwCaps2 : ");
266 flag = pHalInfo->ddCaps.dwCaps2;
267 count = 0;
268 checkflag(flag,DDCAPS2_AUTOFLIPOVERLAY,"DDCAPS2_AUTOFLIPOVERLAY");
269 checkflag(flag,DDCAPS2_CANAUTOGENMIPMAP,"DDCAPS2_CANAUTOGENMIPMAP");
270 checkflag(flag,DDCAPS2_CANBOBHARDWARE,"DDCAPS2_CANBOBHARDWARE");
271 checkflag(flag,DDCAPS2_CANBOBINTERLEAVED,"DDCAPS2_CANBOBINTERLEAVED");
272 checkflag(flag,DDCAPS2_CANBOBNONINTERLEAVED,"DDCAPS2_CANBOBNONINTERLEAVED");
273 checkflag(flag,DDCAPS2_CANCALIBRATEGAMMA,"DDCAPS2_CANCALIBRATEGAMMA");
274 checkflag(flag,DDCAPS2_CANDROPZ16BIT,"DDCAPS2_CANDROPZ16BIT");
275 checkflag(flag,DDCAPS2_CANFLIPODDEVEN,"DDCAPS2_CANFLIPODDEVEN");
276 checkflag(flag,DDCAPS2_CANMANAGERESOURCE,"DDCAPS2_CANMANAGERESOURCE");
277 checkflag(flag,DDCAPS2_CANMANAGETEXTURE,"DDCAPS2_CANMANAGETEXTURE");
278
279 checkflag(flag,DDCAPS2_CANRENDERWINDOWED,"DDCAPS2_CANRENDERWINDOWED");
280 checkflag(flag,DDCAPS2_CERTIFIED,"DDCAPS2_CERTIFIED");
281 checkflag(flag,DDCAPS2_COLORCONTROLOVERLAY,"DDCAPS2_COLORCONTROLOVERLAY");
282 checkflag(flag,DDCAPS2_COLORCONTROLPRIMARY,"DDCAPS2_COLORCONTROLPRIMARY");
283 checkflag(flag,DDCAPS2_COPYFOURCC,"DDCAPS2_COPYFOURCC");
284 checkflag(flag,DDCAPS2_FLIPINTERVAL,"DDCAPS2_FLIPINTERVAL");
285 checkflag(flag,DDCAPS2_FLIPNOVSYNC,"DDCAPS2_FLIPNOVSYNC");
286 checkflag(flag,DDCAPS2_NO2DDURING3DSCENE,"DDCAPS2_NO2DDURING3DSCENE");
287 checkflag(flag,DDCAPS2_NONLOCALVIDMEM,"DDCAPS2_NONLOCALVIDMEM");
288 checkflag(flag,DDCAPS2_NONLOCALVIDMEMCAPS,"DDCAPS2_NONLOCALVIDMEMCAPS");
289 checkflag(flag,DDCAPS2_NOPAGELOCKREQUIRED,"DDCAPS2_NOPAGELOCKREQUIRED");
290 checkflag(flag,DDCAPS2_PRIMARYGAMMA,"DDCAPS2_PRIMARYGAMMA");
291 checkflag(flag,DDCAPS2_VIDEOPORT,"DDCAPS2_VIDEOPORT");
292 checkflag(flag,DDCAPS2_WIDESURFACES,"DDCAPS2_WIDESURFACES");
293 endcheckflag(flag,"pHalInfo->ddCaps.dwCaps2");
294
295 printf(" pHalInfo->ddCaps.dwCKeyCaps : ");
296 flag = pHalInfo->ddCaps.dwCKeyCaps;
297 count = 0;
298 checkflag(flag,DDCKEYCAPS_DESTBLT,"DDCKEYCAPS_DESTBLT");
299 checkflag(flag,DDCKEYCAPS_DESTBLTCLRSPACE,"DDCKEYCAPS_DESTBLTCLRSPACE");
300 checkflag(flag,DDCKEYCAPS_DESTBLTCLRSPACEYUV,"DDCKEYCAPS_DESTBLTCLRSPACEYUV");
301 checkflag(flag,DDCKEYCAPS_DESTBLTYUV,"DDCKEYCAPS_DESTBLTYUV");
302 checkflag(flag,DDCKEYCAPS_DESTOVERLAY,"DDCKEYCAPS_DESTOVERLAY");
303 checkflag(flag,DDCKEYCAPS_DESTOVERLAYCLRSPACE,"DDCKEYCAPS_DESTOVERLAYCLRSPACE");
304 checkflag(flag,DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV,"DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV");
305 checkflag(flag,DDCKEYCAPS_DESTOVERLAYONEACTIVE,"DDCKEYCAPS_DESTOVERLAYONEACTIVE");
306 checkflag(flag,DDCKEYCAPS_DESTOVERLAYYUV,"DDCKEYCAPS_DESTOVERLAYYUV");
307 checkflag(flag,DDCKEYCAPS_NOCOSTOVERLAY,"DDCKEYCAPS_NOCOSTOVERLAY");
308 checkflag(flag,DDCKEYCAPS_SRCBLT,"DDCKEYCAPS_SRCBLT");
309 checkflag(flag,DDCKEYCAPS_SRCBLTCLRSPACE,"DDCKEYCAPS_SRCBLTCLRSPACE");
310 checkflag(flag,DDCKEYCAPS_SRCBLTCLRSPACEYUV,"DDCKEYCAPS_SRCBLTCLRSPACEYUV");
311 checkflag(flag,DDCKEYCAPS_SRCBLTYUV,"DDCKEYCAPS_SRCBLTYUV");
312 checkflag(flag,DDCKEYCAPS_SRCOVERLAY,"DDCKEYCAPS_SRCOVERLAY");
313 checkflag(flag,DDCKEYCAPS_SRCOVERLAYCLRSPACE,"DDCKEYCAPS_SRCOVERLAYCLRSPACE");
314 checkflag(flag,DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV,"DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV");
315 checkflag(flag,DDCKEYCAPS_SRCOVERLAYONEACTIVE,"DDCKEYCAPS_SRCOVERLAYONEACTIVE");
316 checkflag(flag,DDCKEYCAPS_SRCOVERLAYYUV,"DDCKEYCAPS_SRCOVERLAYYUV");
317 endcheckflag(flag,"pHalInfo->ddCaps.dwCKeyCaps");
318
319 printf(" pHalInfo->ddCaps.dwFXCaps : ");
320 flag = pHalInfo->ddCaps.dwFXCaps;
321 count = 0;
322 checkflag(flag,DDFXCAPS_BLTARITHSTRETCHY,"DDFXCAPS_BLTARITHSTRETCHY");
323 checkflag(flag,DDFXCAPS_BLTARITHSTRETCHYN,"DDFXCAPS_BLTARITHSTRETCHYN");
324 checkflag(flag,DDFXCAPS_BLTMIRRORLEFTRIGHT,"DDFXCAPS_BLTMIRRORLEFTRIGHT");
325 checkflag(flag,DDFXCAPS_BLTMIRRORUPDOWN,"DDFXCAPS_BLTMIRRORUPDOWN");
326 checkflag(flag,DDFXCAPS_BLTROTATION,"DDFXCAPS_BLTROTATION");
327 checkflag(flag,DDFXCAPS_BLTROTATION90,"DDFXCAPS_BLTROTATION90");
328 checkflag(flag,DDFXCAPS_BLTSHRINKX,"DDFXCAPS_BLTSHRINKX");
329 checkflag(flag,DDFXCAPS_BLTSHRINKXN,"DDFXCAPS_BLTSHRINKXN");
330 checkflag(flag,DDFXCAPS_BLTSHRINKY,"DDFXCAPS_BLTSHRINKY");
331 checkflag(flag,DDFXCAPS_BLTSHRINKYN,"DDFXCAPS_BLTSHRINKYN");
332 checkflag(flag,DDFXCAPS_BLTSTRETCHX,"DDFXCAPS_BLTSTRETCHX");
333 checkflag(flag,DDFXCAPS_BLTSTRETCHXN,"DDFXCAPS_BLTSTRETCHXN");
334 checkflag(flag,DDFXCAPS_BLTSTRETCHY,"DDFXCAPS_BLTSTRETCHY");
335 checkflag(flag,DDFXCAPS_BLTSTRETCHYN,"DDFXCAPS_BLTSTRETCHYN");
336 checkflag(flag,DDFXCAPS_OVERLAYARITHSTRETCHY,"DDFXCAPS_OVERLAYARITHSTRETCHY");
337 checkflag(flag,DDFXCAPS_OVERLAYARITHSTRETCHYN,"DDFXCAPS_OVERLAYARITHSTRETCHYN");
338 checkflag(flag,DDFXCAPS_OVERLAYMIRRORLEFTRIGHT,"DDFXCAPS_OVERLAYMIRRORLEFTRIGHT");
339 checkflag(flag,DDFXCAPS_OVERLAYMIRRORUPDOWN,"DDFXCAPS_OVERLAYMIRRORUPDOWN");
340 checkflag(flag,DDFXCAPS_OVERLAYSHRINKX,"DDFXCAPS_OVERLAYSHRINKX");
341 checkflag(flag,DDFXCAPS_OVERLAYSHRINKXN,"DDFXCAPS_OVERLAYSHRINKXN");
342 checkflag(flag,DDFXCAPS_OVERLAYSHRINKY,"DDFXCAPS_OVERLAYSHRINKY");
343 checkflag(flag,DDFXCAPS_OVERLAYSHRINKYN,"DDFXCAPS_OVERLAYSHRINKYN");
344 checkflag(flag,DDFXCAPS_OVERLAYSTRETCHX,"DDFXCAPS_OVERLAYSTRETCHX");
345 checkflag(flag,DDFXCAPS_OVERLAYSTRETCHX,"DDFXCAPS_OVERLAYSTRETCHX");
346 checkflag(flag,DDFXCAPS_OVERLAYSTRETCHY,"DDFXCAPS_OVERLAYSTRETCHY");
347 checkflag(flag,DDFXCAPS_OVERLAYSTRETCHYN,"DDFXCAPS_OVERLAYSTRETCHYN");
348 endcheckflag(flag,"pHalInfo->ddCaps.dwFXCaps");
349
350 printf(" pHalInfo->ddCaps.dwFXAlphaCaps : 0x%08lx\n",pHalInfo->ddCaps.dwFXAlphaCaps);
351 printf(" pHalInfo->ddCaps.dwPalCaps : 0x%08lx\n",pHalInfo->ddCaps.dwPalCaps);
352
353 printf(" pHalInfo->ddCaps.dwSVCaps : ");
354 flag = pHalInfo->ddCaps.dwSVCaps;
355 count = 0;
356 checkflag(flag,DDSVCAPS_ENIGMA,"DDSVCAPS_ENIGMA");
357 checkflag(flag,DDSVCAPS_FLICKER,"DDSVCAPS_FLICKER");
358 checkflag(flag,DDSVCAPS_REDBLUE,"DDSVCAPS_REDBLUE");
359 checkflag(flag,DDSVCAPS_SPLIT,"DDSVCAPS_SPLIT");
360 endcheckflag(flag,"pHalInfo->ddCaps.dwSVCaps");
361
362 printf(" pHalInfo->ddCaps.dwAlphaBltConstBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaBltConstBitDepths);
363 printf(" pHalInfo->ddCaps.dwAlphaBltPixelBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaBltPixelBitDepths);
364 printf(" pHalInfo->ddCaps.dwAlphaBltSurfaceBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaBltSurfaceBitDepths);
365 printf(" pHalInfo->ddCaps.dwAlphaOverlayConstBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaOverlayConstBitDepths);
366 printf(" pHalInfo->ddCaps.dwAlphaOverlayPixelBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaOverlayPixelBitDepths);
367 printf(" pHalInfo->ddCaps.dwAlphaOverlaySurfaceBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaOverlaySurfaceBitDepths);
368 printf(" pHalInfo->ddCaps.dwZBufferBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwZBufferBitDepths);
369 printf(" pHalInfo->ddCaps.dwVidMemTotal : 0x%08lx\n",pHalInfo->ddCaps.dwVidMemTotal);
370 printf(" pHalInfo->ddCaps.dwVidMemFree : 0x%08lx\n",pHalInfo->ddCaps.dwVidMemFree);
371 printf(" pHalInfo->ddCaps.dwMaxVisibleOverlays : 0x%08lx\n",pHalInfo->ddCaps.dwMaxVisibleOverlays);
372 printf(" pHalInfo->ddCaps.dwCurrVisibleOverlays : 0x%08lx\n",pHalInfo->ddCaps.dwCurrVisibleOverlays);
373 printf(" pHalInfo->ddCaps.dwNumFourCCCodes : 0x%08lx\n",pHalInfo->ddCaps.dwNumFourCCCodes);
374 printf(" pHalInfo->ddCaps.dwAlignBoundarySrc : 0x%08lx\n",pHalInfo->ddCaps.dwAlignBoundarySrc);
375 printf(" pHalInfo->ddCaps.dwAlignSizeSrc : 0x%08lx\n",pHalInfo->ddCaps.dwAlignSizeSrc);
376 printf(" pHalInfo->ddCaps.dwAlignBoundaryDes : 0x%08lx\n",pHalInfo->ddCaps.dwAlignBoundaryDest);
377 printf(" pHalInfo->ddCaps.dwAlignSizeDest : 0x%08lx\n",pHalInfo->ddCaps.dwAlignSizeDest);
378 printf(" pHalInfo->ddCaps.dwAlignStrideAlign : 0x%08lx\n",pHalInfo->ddCaps.dwAlignStrideAlign);
379 for (t=0;t<DD_ROP_SPACE;t++)
380 {
381 printf(" pHalInfo->ddCaps.dwRops[0x%04x] : 0x%08lx\n",t,pHalInfo->ddCaps.dwRops[t]);
382 }
383 printf(" pHalInfo->ddCaps.ddsCaps.dwCaps : ");
384 flag = pHalInfo->ddCaps.ddsCaps.dwCaps;
385 count = 0;
386 checkflag(flag,DDSCAPS_3DDEVICE,"DDSCAPS_3DDEVICE");
387 checkflag(flag,DDSCAPS_ALLOCONLOAD,"DDSCAPS_ALLOCONLOAD");
388 checkflag(flag,DDSCAPS_ALPHA,"DDSCAPS_ALPHA");
389 checkflag(flag,DDSCAPS_BACKBUFFER,"DDSCAPS_BACKBUFFER");
390 checkflag(flag,DDSCAPS_COMPLEX,"DDSCAPS_COMPLEX");
391 checkflag(flag,DDSCAPS_EXECUTEBUFFER,"DDSCAPS_EXECUTEBUFFER");
392 checkflag(flag,DDSCAPS_FLIP,"DDSCAPS_FLIP");
393 checkflag(flag,DDSCAPS_FRONTBUFFER,"DDSCAPS_FRONTBUFFER");
394 checkflag(flag,DDSCAPS_HWCODEC,"DDSCAPS_HWCODEC");
395 checkflag(flag,DDSCAPS_LIVEVIDEO,"DDSCAPS_LIVEVIDEO");
396 checkflag(flag,DDSCAPS_LOCALVIDMEM,"DDSCAPS_LOCALVIDMEM");
397 checkflag(flag,DDSCAPS_MIPMAP,"DDSCAPS_MIPMAP");
398 checkflag(flag,DDSCAPS_MODEX,"DDSCAPS_MODEX");
399 checkflag(flag,DDSCAPS_NONLOCALVIDMEM,"DDSCAPS_NONLOCALVIDMEM");
400 checkflag(flag,DDSCAPS_OFFSCREENPLAIN,"DDSCAPS_OFFSCREENPLAIN");
401 checkflag(flag,DDSCAPS_OVERLAY,"DDSCAPS_OVERLAY");
402 checkflag(flag,DDSCAPS_OPTIMIZED,"DDSCAPS_OPTIMIZED");
403 checkflag(flag,DDSCAPS_OWNDC,"DDSCAPS_OWNDC");
404 checkflag(flag,DDSCAPS_PALETTE,"DDSCAPS_PALETTE");
405 checkflag(flag,DDSCAPS_PRIMARYSURFACE,"DDSCAPS_PRIMARYSURFACE");
406 checkflag(flag,DDSCAPS_PRIMARYSURFACELEFT,"DDSCAPS_PRIMARYSURFACELEFT");
407 checkflag(flag,DDSCAPS_STANDARDVGAMODE,"DDSCAPS_STANDARDVGAMODE");
408 checkflag(flag,DDSCAPS_SYSTEMMEMORY,"DDSCAPS_SYSTEMMEMORY");
409 checkflag(flag,DDSCAPS_TEXTURE,"DDSCAPS_TEXTURE");
410 checkflag(flag,DDSCAPS_VIDEOMEMORY,"DDSCAPS_VIDEOMEMORY");
411 checkflag(flag,DDSCAPS_VIDEOPORT,"DDSCAPS_VIDEOPORT");
412 checkflag(flag,DDSCAPS_VISIBLE,"DDSCAPS_VISIBLE");
413 checkflag(flag,DDSCAPS_WRITEONLY,"DDSCAPS_WRITEONLY");
414 checkflag(flag,DDSCAPS_ZBUFFER,"DDSCAPS_ZBUFFER");
415 endcheckflag(flag,"pHalInfo->ddCaps.ddsCaps.dwCaps");
416
417 printf(" pHalInfo->ddCaps.dwMinOverlayStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMinOverlayStretch);
418 printf(" pHalInfo->ddCaps.dwMaxOverlayStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMaxOverlayStretch);
419 printf(" pHalInfo->ddCaps.dwMinLiveVideoStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMinLiveVideoStretch);
420 printf(" pHalInfo->ddCaps.dwMaxLiveVideoStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMaxLiveVideoStretch);
421 printf(" pHalInfo->ddCaps.dwMinHwCodecStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMinHwCodecStretch);
422 printf(" pHalInfo->ddCaps.dwMaxHwCodecStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMaxHwCodecStretch);
423 printf(" pHalInfo->ddCaps.dwReserved1 : 0x%08lx\n",pHalInfo->ddCaps.dwReserved1);
424 printf(" pHalInfo->ddCaps.dwReserved2 : 0x%08lx\n",pHalInfo->ddCaps.dwReserved2);
425 printf(" pHalInfo->ddCaps.dwReserved3 : 0x%08lx\n",pHalInfo->ddCaps.dwReserved3);
426
427 printf(" pHalInfo->ddCaps.dwSVBCaps : ");
428 flag = pHalInfo->ddCaps.dwSVBCaps;
429 count = 0;
430 checkflag(flag,DDCAPS_3D,"DDCAPS_3D");
431 checkflag(flag,DDCAPS_ALIGNBOUNDARYDEST,"DDCAPS_ALIGNBOUNDARYDEST");
432 checkflag(flag,DDCAPS_ALIGNBOUNDARYSRC,"DDCAPS_ALIGNBOUNDARYSRC");
433 checkflag(flag,DDCAPS_ALIGNSIZEDEST,"DDCAPS_ALIGNSIZEDEST");
434 checkflag(flag,DDCAPS_ALIGNSIZESRC,"DDCAPS_ALIGNSIZESRC");
435 checkflag(flag,DDCAPS_ALIGNSTRIDE,"DDCAPS_ALIGNSTRIDE");
436 checkflag(flag,DDCAPS_ALPHA,"DDCAPS_ALPHA");
437 checkflag(flag,DDCAPS_BANKSWITCHED,"DDCAPS_BANKSWITCHED");
438 checkflag(flag,DDCAPS_BLT,"DDCAPS_BLT");
439 checkflag(flag,DDCAPS_BLTCOLORFILL,"DDCAPS_BLTCOLORFILL");
440 checkflag(flag,DDCAPS_BLTDEPTHFILL,"DDCAPS_BLTDEPTHFILL");
441 checkflag(flag,DDCAPS_BLTFOURCC,"DDCAPS_BLTFOURCC");
442 checkflag(flag,DDCAPS_BLTQUEUE,"DDCAPS_BLTQUEUE");
443 checkflag(flag,DDCAPS_BLTSTRETCH,"DDCAPS_BLTSTRETCH");
444 checkflag(flag,DDCAPS_CANBLTSYSMEM,"DDCAPS_CANBLTSYSMEM");
445 checkflag(flag,DDCAPS_CANCLIP,"DDCAPS_CANCLIP");
446 checkflag(flag,DDCAPS_CANCLIPSTRETCHED,"DDCAPS_CANCLIPSTRETCHED");
447 checkflag(flag,DDCAPS_COLORKEY,"DDCAPS_COLORKEY");
448 checkflag(flag,DDCAPS_COLORKEYHWASSIST,"DDCAPS_COLORKEYHWASSIST");
449 checkflag(flag,DDCAPS_GDI,"DDCAPS_GDI");
450 checkflag(flag,DDCAPS_NOHARDWARE,"DDCAPS_NOHARDWARE");
451 checkflag(flag,DDCAPS_OVERLAY,"DDCAPS_OVERLAY");
452 checkflag(flag,DDCAPS_OVERLAYCANTCLIP,"DDCAPS_OVERLAYCANTCLIP");
453 checkflag(flag,DDCAPS_OVERLAYFOURCC,"DDCAPS_OVERLAYFOURCC");
454 checkflag(flag,DDCAPS_OVERLAYSTRETCH,"DDCAPS_OVERLAYSTRETCH");
455 checkflag(flag,DDCAPS_PALETTE,"DDCAPS_PALETTE");
456 checkflag(flag,DDCAPS_PALETTEVSYNC,"DDCAPS_PALETTEVSYNC");
457 checkflag(flag,DDCAPS_READSCANLINE,"DDCAPS_READSCANLINE");
458 checkflag(flag,DDCAPS_STEREOVIEW,"DDCAPS_STEREOVIEW");
459 checkflag(flag,DDCAPS_VBI,"DDCAPS_VBI");
460 checkflag(flag,DDCAPS_ZBLTS,"DDCAPS_ZBLTS");
461 checkflag(flag,DDCAPS_ZOVERLAYS,"DDCAPS_ZOVERLAYS");
462 endcheckflag(flag,"pHalInfo->ddCaps.dwSVBCaps");
463
464 printf(" pHalInfo->ddCaps.dwSVBCKeyCaps : 0x%08lx\n",pHalInfo->ddCaps.dwSVBCKeyCaps);
465 printf(" pHalInfo->ddCaps.dwSVBFXCaps : 0x%08lx\n",pHalInfo->ddCaps.dwSVBFXCaps);
466 for (t=0;t<DD_ROP_SPACE;t++)
467 {
468 printf(" pHalInfo->ddCaps.dwSVBRops[0x%04x] : 0x%08lx\n",t,pHalInfo->ddCaps.dwSVBRops[t]);
469 }
470
471 printf(" pHalInfo->ddCaps.dwVSBCaps : ");
472 flag = pHalInfo->ddCaps.dwVSBCaps;
473 count = 0;
474 checkflag(flag,DDCAPS_3D,"DDCAPS_3D");
475 checkflag(flag,DDCAPS_ALIGNBOUNDARYDEST,"DDCAPS_ALIGNBOUNDARYDEST");
476 checkflag(flag,DDCAPS_ALIGNBOUNDARYSRC,"DDCAPS_ALIGNBOUNDARYSRC");
477 checkflag(flag,DDCAPS_ALIGNSIZEDEST,"DDCAPS_ALIGNSIZEDEST");
478 checkflag(flag,DDCAPS_ALIGNSIZESRC,"DDCAPS_ALIGNSIZESRC");
479 checkflag(flag,DDCAPS_ALIGNSTRIDE,"DDCAPS_ALIGNSTRIDE");
480 checkflag(flag,DDCAPS_ALPHA,"DDCAPS_ALPHA");
481 checkflag(flag,DDCAPS_BANKSWITCHED,"DDCAPS_BANKSWITCHED");
482 checkflag(flag,DDCAPS_BLT,"DDCAPS_BLT");
483 checkflag(flag,DDCAPS_BLTCOLORFILL,"DDCAPS_BLTCOLORFILL");
484 checkflag(flag,DDCAPS_BLTDEPTHFILL,"DDCAPS_BLTDEPTHFILL");
485 checkflag(flag,DDCAPS_BLTFOURCC,"DDCAPS_BLTFOURCC");
486 checkflag(flag,DDCAPS_BLTQUEUE,"DDCAPS_BLTQUEUE");
487 checkflag(flag,DDCAPS_BLTSTRETCH,"DDCAPS_BLTSTRETCH");
488 checkflag(flag,DDCAPS_CANBLTSYSMEM,"DDCAPS_CANBLTSYSMEM");
489 checkflag(flag,DDCAPS_CANCLIP,"DDCAPS_CANCLIP");
490 checkflag(flag,DDCAPS_CANCLIPSTRETCHED,"DDCAPS_CANCLIPSTRETCHED");
491 checkflag(flag,DDCAPS_COLORKEY,"DDCAPS_COLORKEY");
492 checkflag(flag,DDCAPS_COLORKEYHWASSIST,"DDCAPS_COLORKEYHWASSIST");
493 checkflag(flag,DDCAPS_GDI,"DDCAPS_GDI");
494 checkflag(flag,DDCAPS_NOHARDWARE,"DDCAPS_NOHARDWARE");
495 checkflag(flag,DDCAPS_OVERLAY,"DDCAPS_OVERLAY");
496 checkflag(flag,DDCAPS_OVERLAYCANTCLIP,"DDCAPS_OVERLAYCANTCLIP");
497 checkflag(flag,DDCAPS_OVERLAYFOURCC,"DDCAPS_OVERLAYFOURCC");
498 checkflag(flag,DDCAPS_OVERLAYSTRETCH,"DDCAPS_OVERLAYSTRETCH");
499 checkflag(flag,DDCAPS_PALETTE,"DDCAPS_PALETTE");
500 checkflag(flag,DDCAPS_PALETTEVSYNC,"DDCAPS_PALETTEVSYNC");
501 checkflag(flag,DDCAPS_READSCANLINE,"DDCAPS_READSCANLINE");
502 checkflag(flag,DDCAPS_STEREOVIEW,"DDCAPS_STEREOVIEW");
503 checkflag(flag,DDCAPS_VBI,"DDCAPS_VBI");
504 checkflag(flag,DDCAPS_ZBLTS,"DDCAPS_ZBLTS");
505 checkflag(flag,DDCAPS_ZOVERLAYS,"DDCAPS_ZOVERLAYS");
506 endcheckflag(flag,"pHalInfo->ddCaps.dwVSBCaps");
507
508 printf(" pHalInfo->ddCaps.dwVSBCKeyCaps : 0x%08lx\n",pHalInfo->ddCaps.dwVSBCKeyCaps);
509 printf(" pHalInfo->ddCaps.dwVSBFXCaps : 0x%08lx\n",pHalInfo->ddCaps.dwVSBFXCaps);
510 for (t=0;t<DD_ROP_SPACE;t++)
511 {
512 printf(" pHalInfo->ddCaps.dwVSBRops[0x%04x] : 0x%08lx\n",t,pHalInfo->ddCaps.dwVSBRops[t]);
513 }
514 printf(" pHalInfo->ddCaps.dwSSBCaps : 0x%08lx\n",pHalInfo->ddCaps.dwSSBCaps);
515 printf(" pHalInfo->ddCaps.dwSSBCKeyCa : 0x%08lx\n",pHalInfo->ddCaps.dwSSBCKeyCaps);
516 printf(" pHalInfo->ddCaps.dwSSBFXCaps : 0x%08lx\n",pHalInfo->ddCaps.dwSSBFXCaps);
517 for (t=0;t<DD_ROP_SPACE;t++)
518 {
519 printf(" pHalInfo->ddCaps.dwSSBRops[0x%04x] : 0x%08lx\n",t,pHalInfo->ddCaps.dwSSBRops[t]);
520 }
521
522 printf(" pHalInfo->GetDriverInfo : 0x%08lx\n",(long)pHalInfo->GetDriverInfo);
523 printf(" pHalInfo->dwFlags : ");
524
525 flag = pHalInfo->dwFlags;
526 count = 0;
527 checkflag(flag,DDHALINFO_ISPRIMARYDISPLAY,"DDHALINFO_ISPRIMARYDISPLAY");
528 checkflag(flag,DDHALINFO_MODEXILLEGAL,"DDHALINFO_MODEXILLEGAL");
529 checkflag(flag,DDHALINFO_GETDRIVERINFOSET,"DDHALINFO_GETDRIVERINFOSET");
530 checkflag(flag,DDHALINFO_GETDRIVERINFO2,"DDHALINFO_GETDRIVERINFO2");
531 endcheckflag(flag,"pHalInfo->dwFlags");
532
533 printf(" pHalInfo->lpD3DGlobalDriverData : 0x%08lx\n",(long)pHalInfo->lpD3DGlobalDriverData);
534 printf(" pHalInfo->lpD3DHALCallbacks : 0x%08lx\n",(long)pHalInfo->lpD3DHALCallbacks);
535 printf(" pHalInfo->lpD3DBufCallbacks : 0x%08lx\n",(long)pHalInfo->lpD3DBufCallbacks);
536 }
537 else
538 {
539 if (pHalInfo->dwSize !=0)
540 {
541 printf("unkonwn dwSize DD_HALINFO : the size found is 0x%08lx\n",pHalInfo->dwSize);
542 }
543 else
544 {
545 printf("none pHalInfo from the driver 0x%08lx\n",pHalInfo->dwSize);
546 }
547 }
548 }
549
550
551 void
552 dump_D3dCallbacks(D3DNTHAL_CALLBACKS *puD3dCallbacks, char *text)
553 {
554 printf("dumping the D3DNTHAL_CALLBACKS from %s\n",text);
555 if (puD3dCallbacks->dwSize == sizeof(D3DNTHAL_CALLBACKS))
556 {
557 printf(" puD3dCallbacks->dwSize : 0x%08lx\n",(long)puD3dCallbacks->dwSize);
558 printf(" puD3dCallbacks->ContextCreate : 0x%08lx\n",(long)puD3dCallbacks->ContextCreate);
559 printf(" puD3dCallbacks->ContextDestroy : 0x%08lx\n",(long)puD3dCallbacks->ContextDestroy);
560 printf(" puD3dCallbacks->ContextDestroyAll : 0x%08lx\n",(long)puD3dCallbacks->ContextDestroyAll);
561 printf(" puD3dCallbacks->SceneCapture : 0x%08lx\n",(long)puD3dCallbacks->SceneCapture);
562 printf(" puD3dCallbacks->dwReserved10 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved10);
563 printf(" puD3dCallbacks->dwReserved11 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved11);
564 printf(" puD3dCallbacks->dwReserved22 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved22);
565 printf(" puD3dCallbacks->dwReserved23 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved23);
566 printf(" puD3dCallbacks->dwReserved : 0x%08lx\n",(long)puD3dCallbacks->dwReserved);
567 printf(" puD3dCallbacks->TextureCreate : 0x%08lx\n",(long)puD3dCallbacks->TextureCreate);
568 printf(" puD3dCallbacks->TextureDestroy : 0x%08lx\n",(long)puD3dCallbacks->TextureDestroy);
569 printf(" puD3dCallbacks->TextureSwap : 0x%08lx\n",(long)puD3dCallbacks->TextureSwap);
570 printf(" puD3dCallbacks->TextureGetSurf : 0x%08lx\n",(long)puD3dCallbacks->TextureGetSurf);
571 printf(" puD3dCallbacks->dwReserved12 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved12);
572 printf(" puD3dCallbacks->dwReserved13 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved13);
573 printf(" puD3dCallbacks->dwReserved14 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved14);
574 printf(" puD3dCallbacks->dwReserved15 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved15);
575 printf(" puD3dCallbacks->dwReserved16 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved16);
576 printf(" puD3dCallbacks->dwReserved17 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved17);
577 printf(" puD3dCallbacks->dwReserved18 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved18);
578 printf(" puD3dCallbacks->dwReserved19 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved19);
579 printf(" puD3dCallbacks->dwReserved20 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved20);
580 printf(" puD3dCallbacks->dwReserved21 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved21);
581 printf(" puD3dCallbacks->dwReserved24 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved24);
582 printf(" puD3dCallbacks->dwReserved0 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved0);
583 printf(" puD3dCallbacks->dwReserved1 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved1);
584 printf(" puD3dCallbacks->dwReserved2 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved2);
585 printf(" puD3dCallbacks->dwReserved3 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved3);
586 printf(" puD3dCallbacks->dwReserved4 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved4);
587 printf(" puD3dCallbacks->dwReserved5 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved5);
588 printf(" puD3dCallbacks->dwReserved6 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved6);
589 printf(" puD3dCallbacks->dwReserved7 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved7);
590 printf(" puD3dCallbacks->dwReserved8 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved8);
591 printf(" puD3dCallbacks->dwReserved9 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved9);
592 }
593 else
594 {
595 printf("none puD3dCallbacks from the driver 0x%08lx\n",puD3dCallbacks->dwSize);
596 }
597 }
598
599
600 void
601 dump_D3dDriverData(D3DNTHAL_GLOBALDRIVERDATA *puD3dDriverData, char *text)
602 {
603 UINT flag = 0;
604 INT count = 0;
605
606 printf("dumping the D3DNTHAL_GLOBALDRIVERDATA from %s\n",text);
607 if (puD3dDriverData->dwSize == sizeof(D3DNTHAL_GLOBALDRIVERDATA))
608 {
609 printf(" puD3dDriverData->dwSize : 0x%08lx\n",(long)puD3dDriverData->dwSize);
610 if (puD3dDriverData->hwCaps.dwSize == sizeof(D3DNTHALDEVICEDESC_V1))
611 {
612 printf(" puD3dDriverData->hwCaps.dwSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwSize);
613 printf(" puD3dDriverData->hwCaps.dwFlags : ");
614
615 flag = puD3dDriverData->hwCaps.dwFlags;
616 checkflag(flag,D3DDD_BCLIPPING,"D3DDD_BCLIPPING");
617 checkflag(flag,D3DDD_COLORMODEL,"D3DDD_COLORMODEL");
618 checkflag(flag,D3DDD_DEVCAPS,"D3DDD_DEVCAPS");
619 checkflag(flag,D3DDD_DEVICERENDERBITDEPTH,"D3DDD_DEVICERENDERBITDEPTH");
620 checkflag(flag,D3DDD_DEVICEZBUFFERBITDEPTH,"D3DDD_DEVICEZBUFFERBITDEPTH");
621 checkflag(flag,D3DDD_LIGHTINGCAPS,"D3DDD_LIGHTINGCAPS");
622 checkflag(flag,D3DDD_LINECAPS,"D3DDD_LINECAPS");
623 checkflag(flag,D3DDD_MAXBUFFERSIZE,"D3DDD_MAXBUFFERSIZE");
624 checkflag(flag,D3DDD_MAXVERTEXCOUNT,"D3DDD_MAXVERTEXCOUNT");
625 checkflag(flag,D3DDD_TRANSFORMCAPS,"D3DDD_TRANSFORMCAPS");
626 checkflag(flag,D3DDD_TRICAPS,"D3DDD_TRICAPS");
627 endcheckflag(flag,"puD3dDriverData->hwCaps.dwFlags ");
628
629 printf(" puD3dDriverData->hwCaps.dcmColorModel : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dcmColorModel);
630 printf(" puD3dDriverData->hwCaps.dwDevCaps : ");
631
632 count = 0;
633 flag = puD3dDriverData->hwCaps.dwDevCaps;
634 checkflag(flag,D3DDEVCAPS_CANBLTSYSTONONLOCAL,"D3DDEVCAPS_CANBLTSYSTONONLOCAL");
635 checkflag(flag,D3DDEVCAPS_CANRENDERAFTERFLIP,"D3DDEVCAPS_CANRENDERAFTERFLIP");
636 checkflag(flag,D3DDEVCAPS_DRAWPRIMITIVES2,"D3DDEVCAPS_DRAWPRIMITIVES2");
637 checkflag(flag,D3DDEVCAPS_DRAWPRIMITIVES2EX,"D3DDEVCAPS_DRAWPRIMITIVES2EX");
638 checkflag(flag,D3DDEVCAPS_DRAWPRIMTLVERTEX,"D3DDEVCAPS_DRAWPRIMTLVERTEX");
639 checkflag(flag,D3DDEVCAPS_EXECUTESYSTEMMEMORY,"D3DDEVCAPS_EXECUTESYSTEMMEMORY");
640 checkflag(flag,D3DDEVCAPS_EXECUTEVIDEOMEMORY,"D3DDEVCAPS_EXECUTEVIDEOMEMORY");
641 checkflag(flag,D3DDEVCAPS_FLOATTLVERTEX,"D3DDEVCAPS_FLOATTLVERTEX");
642 checkflag(flag,D3DDEVCAPS_HWRASTERIZATION,"D3DDEVCAPS_HWRASTERIZATION");
643 checkflag(flag,D3DDEVCAPS_HWTRANSFORMANDLIGHT,"D3DDEVCAPS_HWTRANSFORMANDLIGHT");
644 checkflag(flag,D3DDEVCAPS_SEPARATETEXTUREMEMORIES,"D3DDEVCAPS_SEPARATETEXTUREMEMORIES");
645 checkflag(flag,D3DDEVCAPS_SORTDECREASINGZ,"D3DDEVCAPS_SORTDECREASINGZ");
646 checkflag(flag,D3DDEVCAPS_SORTEXACT,"D3DDEVCAPS_SORTEXACT");
647 checkflag(flag,D3DDEVCAPS_SORTINCREASINGZ,"D3DDEVCAPS_SORTINCREASINGZ");
648 // not in ddk or dxsdk I have but it is msdn checkflag(flag,D3DDEVCAPS_TEXTURENONLOCALVIDEOMEMORY,"D3DDEVCAPS_TEXTURENONLOCALVIDEOMEMORY");
649 checkflag(flag,D3DDEVCAPS_TLVERTEXSYSTEMMEMORY,"D3DDEVCAPS_TLVERTEXSYSTEMMEMORY");
650 checkflag(flag,D3DDEVCAPS_TLVERTEXVIDEOMEMORY,"D3DDEVCAPS_TLVERTEXVIDEOMEMORY");
651 checkflag(flag,D3DDEVCAPS_TEXTURESYSTEMMEMORY,"D3DDEVCAPS_TEXTURESYSTEMMEMORY");
652 checkflag(flag,D3DDEVCAPS_TEXTUREVIDEOMEMORY,"D3DDEVCAPS_TEXTUREVIDEOMEMORY");
653 endcheckflag(flag,"puD3dDriverData->hwCaps.dwDevCaps");
654
655 if (puD3dDriverData->hwCaps.dtcTransformCaps.dwSize == sizeof(D3DTRANSFORMCAPS))
656 {
657 printf(" puD3dDriverData->hwCaps.dtcTransformCaps.dwSize : 0x%08lx\n",(long) puD3dDriverData->hwCaps.dtcTransformCaps.dwSize);
658 printf(" puD3dDriverData->hwCaps.dtcTransformCaps.dwCaps : ");
659
660 count = 0;
661 flag = puD3dDriverData->hwCaps.dtcTransformCaps.dwCaps;
662 checkflag(flag,D3DTRANSFORMCAPS_CLIP,"D3DTRANSFORMCAPS_CLIP");
663 endcheckflag(flag,"puD3dDriverData->hwCaps.dtcTransformCaps.dwCaps");
664 }
665 else
666 {
667 printf("none puD3dDriverData->hwCaps.dtcTransformCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dtcTransformCaps.dwSize);
668 }
669
670 if (puD3dDriverData->hwCaps.dlcLightingCaps.dwSize == sizeof(D3DLIGHTINGCAPS))
671 {
672 printf(" puD3dDriverData->hwCaps.dlcLightingCaps.dwSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dlcLightingCaps.dwSize);
673 printf(" puD3dDriverData->hwCaps.dlcLightingCaps.dwCaps : ");
674
675 count = 0;
676 flag = puD3dDriverData->hwCaps.dlcLightingCaps.dwCaps;
677
678 checkflag(flag,D3DLIGHTCAPS_DIRECTIONAL,"D3DLIGHTCAPS_DIRECTIONAL");
679 checkflag(flag,D3DLIGHTCAPS_GLSPOT,"D3DLIGHTCAPS_GLSPOT");
680 checkflag(flag,D3DLIGHTCAPS_PARALLELPOINT,"D3DLIGHTCAPS_PARALLELPOINT");
681 checkflag(flag,D3DLIGHTCAPS_POINT,"D3DLIGHTCAPS_POINT");
682 checkflag(flag,D3DLIGHTCAPS_SPOT,"D3DLIGHTCAPS_SPOT");
683 endcheckflag(flag,"puD3dDriverData->hwCaps.dlcLightingCaps.dwCaps");
684
685 printf(" puD3dDriverData->hwCaps.dlcLightingCaps.dwLightingModel : ");
686
687 count = 0;
688 flag = puD3dDriverData->hwCaps.dlcLightingCaps.dwLightingModel;
689
690 checkflag(flag,D3DLIGHTINGMODEL_MONO,"D3DLIGHTINGMODEL_MONO");
691 checkflag(flag,D3DLIGHTINGMODEL_RGB,"D3DLIGHTINGMODEL_RGB");
692 endcheckflag(flag,"puD3dDriverData->hwCaps.dlcLightingCaps.dwLightingModel");
693
694 printf(" puD3dDriverData->hwCaps.dlcLightingCaps.dwNumLights : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dlcLightingCaps.dwNumLights);
695 }
696 else
697 {
698 printf("none puD3dDriverData->hwCaps.dlcLightingCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dlcLightingCaps.dwSize);
699 }
700
701
702 if (puD3dDriverData->hwCaps.dpcLineCaps.dwSize == sizeof(D3DPRIMCAPS))
703 {
704 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcLineCaps.dwSize);
705
706 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwMiscCaps : ");
707 count = 0;
708 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwMiscCaps;
709 checkflag(flag,D3DPMISCCAPS_CONFORMANT,"D3DPMISCCAPS_CONFORMANT");
710 checkflag(flag,D3DPMISCCAPS_CULLCCW,"D3DPMISCCAPS_CULLCCW");
711 checkflag(flag,D3DPMISCCAPS_CULLCW,"D3DPMISCCAPS_CULLCW");
712 checkflag(flag,D3DPMISCCAPS_CULLNONE,"D3DPMISCCAPS_CULLNONE");
713 checkflag(flag,D3DPMISCCAPS_LINEPATTERNREP,"D3DPMISCCAPS_LINEPATTERNREP");
714 checkflag(flag,D3DPMISCCAPS_MASKPLANES,"D3DPMISCCAPS_MASKPLANES");
715 checkflag(flag,D3DPMISCCAPS_MASKZ,"D3DPMISCCAPS_MASKZ");
716 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwMiscCaps");
717
718 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwRasterCaps : ");
719 count = 0;
720 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwRasterCaps;
721 checkflag(flag,D3DPRASTERCAPS_ANISOTROPY,"D3DPRASTERCAPS_ANISOTROPY");
722 checkflag(flag,D3DPRASTERCAPS_ANTIALIASEDGES,"D3DPRASTERCAPS_ANTIALIASEDGES");
723 checkflag(flag,D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT,"D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT");
724 checkflag(flag,D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT,"D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT");
725 checkflag(flag,D3DPRASTERCAPS_DITHER,"D3DPRASTERCAPS_DITHER");
726 checkflag(flag,D3DPRASTERCAPS_FOGRANGE,"D3DPRASTERCAPS_FOGRANGE");
727 checkflag(flag,D3DPRASTERCAPS_FOGTABLE,"D3DPRASTERCAPS_FOGTABLE");
728 checkflag(flag,D3DPRASTERCAPS_FOGVERTEX,"D3DPRASTERCAPS_FOGVERTEX");
729 checkflag(flag,D3DPRASTERCAPS_PAT,"D3DPRASTERCAPS_PAT");
730 checkflag(flag,D3DPRASTERCAPS_ROP2,"D3DPRASTERCAPS_ROP2");
731 checkflag(flag,D3DPRASTERCAPS_STIPPLE,"D3DPRASTERCAPS_STIPPLE");
732 checkflag(flag,D3DPRASTERCAPS_SUBPIXEL,"D3DPRASTERCAPS_SUBPIXEL");
733 checkflag(flag,D3DPRASTERCAPS_SUBPIXELX,"D3DPRASTERCAPS_SUBPIXELX");
734 checkflag(flag,D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT,"D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT");
735 checkflag(flag,D3DPRASTERCAPS_WBUFFER,"D3DPRASTERCAPS_WBUFFER");
736 checkflag(flag,D3DPRASTERCAPS_WFOG,"D3DPRASTERCAPS_WFOG");
737 checkflag(flag,D3DPRASTERCAPS_XOR,"D3DPRASTERCAPS_XOR");
738 checkflag(flag,D3DPRASTERCAPS_ZBIAS,"D3DPRASTERCAPS_ZBIAS");
739 checkflag(flag,D3DPRASTERCAPS_ZBUFFERLESSHSR,"D3DPRASTERCAPS_ZBUFFERLESSHSR");
740 checkflag(flag,D3DPRASTERCAPS_ZFOG,"D3DPRASTERCAPS_ZFOG");
741 checkflag(flag,D3DPRASTERCAPS_ZTEST,"D3DPRASTERCAPS_ZTEST");
742 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwRasterCaps");
743
744 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwZCmpCaps : ");
745 count = 0;
746 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwZCmpCaps;
747 checkflag(flag,D3DPCMPCAPS_ALWAYS,"D3DPCMPCAPS_ALWAYS");
748 checkflag(flag,D3DPCMPCAPS_EQUAL,"D3DPCMPCAPS_EQUAL");
749 checkflag(flag,D3DPCMPCAPS_GREATER,"D3DPCMPCAPS_GREATER");
750 checkflag(flag,D3DPCMPCAPS_GREATEREQUAL,"D3DPCMPCAPS_GREATEREQUAL");
751 checkflag(flag,D3DPCMPCAPS_LESS,"D3DPCMPCAPS_LESS");
752 checkflag(flag,D3DPCMPCAPS_LESSEQUAL,"D3DPCMPCAPS_LESSEQUAL");
753 checkflag(flag,D3DPCMPCAPS_NEVER,"D3DPCMPCAPS_NEVER");
754 checkflag(flag,D3DPCMPCAPS_NOTEQUAL,"D3DPCMPCAPS_NOTEQUAL");
755 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwZCmpCaps ");
756
757 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwSrcBlendCaps : ");
758 count = 0;
759 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwSrcBlendCaps;
760 checkflag(flag,D3DPBLENDCAPS_BOTHINVSRCALPHA,"D3DPBLENDCAPS_BOTHINVSRCALPHA");
761 checkflag(flag,D3DPBLENDCAPS_BOTHSRCALPHA,"D3DPBLENDCAPS_BOTHSRCALPHA");
762 checkflag(flag,D3DPBLENDCAPS_DESTALPHA,"D3DPBLENDCAPS_DESTALPHA");
763 checkflag(flag,D3DPBLENDCAPS_DESTCOLOR,"D3DPBLENDCAPS_DESTCOLOR");
764 checkflag(flag,D3DPBLENDCAPS_INVDESTALPHA,"D3DPBLENDCAPS_INVDESTALPHA");
765 checkflag(flag,D3DPBLENDCAPS_INVDESTCOLOR,"D3DPBLENDCAPS_INVDESTCOLOR");
766 checkflag(flag,D3DPBLENDCAPS_INVSRCALPHA,"D3DPBLENDCAPS_INVSRCALPHA");
767 checkflag(flag,D3DPBLENDCAPS_INVSRCCOLOR,"D3DPBLENDCAPS_INVSRCCOLOR");
768 checkflag(flag,D3DPBLENDCAPS_ONE,"D3DPBLENDCAPS_ONE");
769 checkflag(flag,D3DPBLENDCAPS_SRCALPHA,"D3DPBLENDCAPS_SRCALPHA");
770 checkflag(flag,D3DPBLENDCAPS_SRCALPHASAT,"D3DPBLENDCAPS_SRCALPHASAT");
771 checkflag(flag,D3DPBLENDCAPS_SRCCOLOR,"D3DPBLENDCAPS_SRCCOLOR");
772 checkflag(flag,D3DPBLENDCAPS_ZERO,"D3DPBLENDCAPS_ZERO");
773 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwSrcBlendCaps ");
774
775 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwDestBlendCaps : ");
776 count = 0;
777 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwDestBlendCaps;
778 checkflag(flag,D3DPBLENDCAPS_BOTHINVSRCALPHA,"D3DPBLENDCAPS_BOTHINVSRCALPHA");
779 checkflag(flag,D3DPBLENDCAPS_BOTHSRCALPHA,"D3DPBLENDCAPS_BOTHSRCALPHA");
780 checkflag(flag,D3DPBLENDCAPS_DESTALPHA,"D3DPBLENDCAPS_DESTALPHA");
781 checkflag(flag,D3DPBLENDCAPS_DESTCOLOR,"D3DPBLENDCAPS_DESTCOLOR");
782 checkflag(flag,D3DPBLENDCAPS_INVDESTALPHA,"D3DPBLENDCAPS_INVDESTALPHA");
783 checkflag(flag,D3DPBLENDCAPS_INVDESTCOLOR,"D3DPBLENDCAPS_INVDESTCOLOR");
784 checkflag(flag,D3DPBLENDCAPS_INVSRCALPHA,"D3DPBLENDCAPS_INVSRCALPHA");
785 checkflag(flag,D3DPBLENDCAPS_INVSRCCOLOR,"D3DPBLENDCAPS_INVSRCCOLOR");
786 checkflag(flag,D3DPBLENDCAPS_ONE,"D3DPBLENDCAPS_ONE");
787 checkflag(flag,D3DPBLENDCAPS_SRCALPHA,"D3DPBLENDCAPS_SRCALPHA");
788 checkflag(flag,D3DPBLENDCAPS_SRCALPHASAT,"D3DPBLENDCAPS_SRCALPHASAT");
789 checkflag(flag,D3DPBLENDCAPS_SRCCOLOR,"D3DPBLENDCAPS_SRCCOLOR");
790 checkflag(flag,D3DPBLENDCAPS_ZERO,"D3DPBLENDCAPS_ZERO");
791 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwDestBlendCaps ");
792
793 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwAlphaCmpCaps : ");
794 count = 0;
795 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwAlphaCmpCaps;
796 checkflag(flag,D3DPCMPCAPS_ALWAYS,"D3DPCMPCAPS_ALWAYS");
797 checkflag(flag,D3DPCMPCAPS_EQUAL,"D3DPCMPCAPS_EQUAL");
798 checkflag(flag,D3DPCMPCAPS_GREATER,"D3DPCMPCAPS_GREATER");
799 checkflag(flag,D3DPCMPCAPS_GREATEREQUAL,"D3DPCMPCAPS_GREATEREQUAL");
800 checkflag(flag,D3DPCMPCAPS_LESS,"D3DPCMPCAPS_LESS");
801 checkflag(flag,D3DPCMPCAPS_LESSEQUAL,"D3DPCMPCAPS_LESSEQUAL");
802 checkflag(flag,D3DPCMPCAPS_NEVER,"D3DPCMPCAPS_NEVER");
803 checkflag(flag,D3DPCMPCAPS_NOTEQUAL,"D3DPCMPCAPS_NOTEQUAL");
804 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwAlphaCmpCaps ");
805
806 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwShadeCaps : ");
807 count = 0;
808 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwShadeCaps;
809 checkflag(flag,D3DPSHADECAPS_ALPHAFLATBLEND,"D3DPSHADECAPS_ALPHAFLATBLEND");
810 checkflag(flag,D3DPSHADECAPS_ALPHAFLATSTIPPLED,"D3DPSHADECAPS_ALPHAFLATSTIPPLED");
811 checkflag(flag,D3DPSHADECAPS_ALPHAGOURAUDBLEND,"D3DPSHADECAPS_ALPHAGOURAUDBLEND");
812 checkflag(flag,D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED,"D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED");
813 checkflag(flag,D3DPSHADECAPS_ALPHAPHONGBLEND,"D3DPSHADECAPS_ALPHAPHONGBLEND");
814 checkflag(flag,D3DPSHADECAPS_ALPHAPHONGSTIPPLED,"D3DPSHADECAPS_ALPHAPHONGSTIPPLED");
815 checkflag(flag,D3DPSHADECAPS_COLORFLATMONO,"D3DPSHADECAPS_COLORFLATMONO");
816 checkflag(flag,D3DPSHADECAPS_COLORFLATRGB,"D3DPSHADECAPS_COLORFLATRGB");
817 checkflag(flag,D3DPSHADECAPS_COLORGOURAUDMONO,"D3DPSHADECAPS_COLORGOURAUDMONO");
818 checkflag(flag,D3DPSHADECAPS_COLORGOURAUDRGB,"D3DPSHADECAPS_COLORGOURAUDRGB");
819 checkflag(flag,D3DPSHADECAPS_COLORPHONGMONO,"D3DPSHADECAPS_COLORPHONGMONO");
820 checkflag(flag,D3DPSHADECAPS_COLORPHONGRGB,"D3DPSHADECAPS_COLORPHONGRGB");
821 checkflag(flag,D3DPSHADECAPS_FOGFLAT,"D3DPSHADECAPS_FOGFLAT");
822 checkflag(flag,D3DPSHADECAPS_FOGGOURAUD,"D3DPSHADECAPS_FOGGOURAUD");
823 checkflag(flag,D3DPSHADECAPS_FOGPHONG,"D3DPSHADECAPS_FOGPHONG");
824 checkflag(flag,D3DPSHADECAPS_SPECULARFLATMONO,"D3DPSHADECAPS_SPECULARFLATMONO");
825 checkflag(flag,D3DPSHADECAPS_SPECULARFLATRGB,"D3DPSHADECAPS_SPECULARFLATRGB");
826 checkflag(flag,D3DPSHADECAPS_SPECULARGOURAUDMONO,"D3DPSHADECAPS_SPECULARGOURAUDMONO");
827 checkflag(flag,D3DPSHADECAPS_SPECULARGOURAUDRGB,"D3DPSHADECAPS_SPECULARGOURAUDRGB");
828 checkflag(flag,D3DPSHADECAPS_SPECULARPHONGMONO,"D3DPSHADECAPS_SPECULARPHONGMONO");
829 checkflag(flag,D3DPSHADECAPS_SPECULARPHONGRGB,"D3DPSHADECAPS_SPECULARPHONGRGB");
830 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwShadeCaps ");
831
832 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwTextureCaps : ");
833 count = 0;
834 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwTextureCaps;
835 checkflag(flag,D3DPTEXTURECAPS_ALPHA,"D3DPTEXTURECAPS_ALPHA");
836 checkflag(flag,D3DPTEXTURECAPS_ALPHAPALETTE,"D3DPTEXTURECAPS_ALPHAPALETTE");
837 checkflag(flag,D3DPTEXTURECAPS_BORDER,"D3DPTEXTURECAPS_BORDER");
838 checkflag(flag,D3DPTEXTURECAPS_COLORKEYBLEND,"D3DPTEXTURECAPS_COLORKEYBLEND");
839 checkflag(flag,D3DPTEXTURECAPS_CUBEMAP,"D3DPTEXTURECAPS_CUBEMAP");
840 checkflag(flag,D3DPTEXTURECAPS_PERSPECTIVE,"D3DPTEXTURECAPS_PERSPECTIVE");
841 checkflag(flag,D3DPTEXTURECAPS_POW2,"D3DPTEXTURECAPS_POW2");
842 checkflag(flag,D3DPTEXTURECAPS_PROJECTED,"D3DPTEXTURECAPS_PROJECTED");
843 checkflag(flag,D3DPTEXTURECAPS_NONPOW2CONDITIONAL,"D3DPTEXTURECAPS_NONPOW2CONDITIONAL");
844 checkflag(flag,D3DPTEXTURECAPS_SQUAREONLY,"D3DPTEXTURECAPS_SQUAREONLY");
845 // not in ddk or dxsdk but it is in msdn checkflag(flag,D3DPTEXTURECAPS_TEXREPEATNOTSCALESBYSIZE,"D3DPTEXTURECAPS_TEXREPEATNOTSCALESBYSIZE");
846 // not in ddk or dxsdk but it is in msdn checkflag(flag,D3DPTEXTURECAPS_TEXTURETRANSFORM,"D3DPTEXTURECAPS_TEXTURETRANSFORM");
847 checkflag(flag,D3DPTEXTURECAPS_TRANSPARENCY,"D3DPTEXTURECAPS_TRANSPARENCY");
848 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwTextureCaps ");
849
850 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwTextureFilterCaps : ");
851 count = 0;
852 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwTextureFilterCaps;
853 checkflag(flag,D3DPTFILTERCAPS_LINEAR,"D3DPTFILTERCAPS_LINEAR");
854 checkflag(flag,D3DPTFILTERCAPS_LINEARMIPLINEAR,"D3DPTFILTERCAPS_LINEARMIPLINEAR");
855 checkflag(flag,D3DPTFILTERCAPS_LINEARMIPNEAREST,"D3DPTFILTERCAPS_LINEARMIPNEAREST");
856 checkflag(flag,D3DPTFILTERCAPS_MAGFAFLATCUBIC,"D3DPTFILTERCAPS_MAGFAFLATCUBIC");
857 checkflag(flag,D3DPTFILTERCAPS_MAGFANISOTROPIC,"D3DPTFILTERCAPS_MAGFANISOTROPIC");
858 checkflag(flag,D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC,"D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC");
859 checkflag(flag,D3DPTFILTERCAPS_MAGFLINEAR,"D3DPTFILTERCAPS_MAGFLINEAR");
860 checkflag(flag,D3DPTFILTERCAPS_MAGFPOINT,"D3DPTFILTERCAPS_MAGFPOINT");
861 checkflag(flag,D3DPTFILTERCAPS_MINFANISOTROPIC,"D3DPTFILTERCAPS_MINFANISOTROPIC");
862 checkflag(flag,D3DPTFILTERCAPS_MINFLINEAR,"D3DPTFILTERCAPS_MINFLINEAR");
863 checkflag(flag,D3DPTFILTERCAPS_MINFPOINT,"D3DPTFILTERCAPS_MINFPOINT");
864 checkflag(flag,D3DPTFILTERCAPS_MIPFLINEAR,"D3DPTFILTERCAPS_MIPFLINEAR");
865 checkflag(flag,D3DPTFILTERCAPS_MIPFPOINT,"D3DPTFILTERCAPS_MIPFPOINT");
866 checkflag(flag,D3DPTFILTERCAPS_MIPLINEAR,"D3DPTFILTERCAPS_MIPLINEAR");
867 checkflag(flag,D3DPTFILTERCAPS_MIPNEAREST,"D3DPTFILTERCAPS_MIPNEAREST");
868 checkflag(flag,D3DPTFILTERCAPS_NEAREST,"D3DPTFILTERCAPS_NEAREST");
869 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwTextureFilterCaps ");
870
871 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwTextureBlendCaps : ");
872 count = 0;
873 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwTextureBlendCaps;
874 checkflag(flag,D3DPTBLENDCAPS_ADD,"D3DPTBLENDCAPS_ADD");
875 checkflag(flag,D3DPTBLENDCAPS_COPY,"D3DPTBLENDCAPS_COPY");
876 checkflag(flag,D3DPTBLENDCAPS_DECAL,"D3DPTBLENDCAPS_DECAL");
877 checkflag(flag,D3DPTBLENDCAPS_DECALALPHA,"D3DPTBLENDCAPS_DECALALPHA");
878 checkflag(flag,D3DPTBLENDCAPS_DECALMASK,"D3DPTBLENDCAPS_DECALMASK");
879 checkflag(flag,D3DPTBLENDCAPS_MODULATE,"D3DPTBLENDCAPS_MODULATE");
880 checkflag(flag,D3DPTBLENDCAPS_MODULATEALPHA,"D3DPTBLENDCAPS_MODULATEALPHA");
881 checkflag(flag,D3DPTBLENDCAPS_MODULATEMASK,"D3DPTBLENDCAPS_MODULATEMASK");
882 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwTextureBlendCaps ");
883
884 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwTextureAddressCaps : ");
885 count = 0;
886 flag = puD3dDriverData->hwCaps.dpcLineCaps.dwTextureAddressCaps;
887 checkflag(flag,D3DPTADDRESSCAPS_BORDER,"D3DPTADDRESSCAPS_BORDER");
888 checkflag(flag,D3DPTADDRESSCAPS_CLAMP,"D3DPTADDRESSCAPS_CLAMP");
889 checkflag(flag,D3DPTADDRESSCAPS_INDEPENDENTUV,"D3DPTADDRESSCAPS_INDEPENDENTUV");
890 checkflag(flag,D3DPTADDRESSCAPS_MIRROR,"D3DPTADDRESSCAPS_MIRROR");
891 checkflag(flag,D3DPTADDRESSCAPS_WRAP,"D3DPTADDRESSCAPS_WRAP");
892 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwTextureAddressCaps ");
893
894 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwStippleWidth : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcLineCaps.dwStippleWidth);
895 printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwStippleHeight : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcLineCaps.dwStippleHeight);
896 }
897 else
898 {
899 printf("none puD3dDriverData->hwCaps.dpcLineCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dpcLineCaps.dwSize);
900 }
901
902 if (puD3dDriverData->hwCaps.dpcTriCaps.dwSize == sizeof(D3DPRIMCAPS))
903 {
904 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcTriCaps.dwSize);
905
906 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwMiscCaps : ");
907 count = 0;
908 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwMiscCaps;
909 checkflag(flag,D3DPMISCCAPS_CONFORMANT,"D3DPMISCCAPS_CONFORMANT");
910 checkflag(flag,D3DPMISCCAPS_CULLCCW,"D3DPMISCCAPS_CULLCCW");
911 checkflag(flag,D3DPMISCCAPS_CULLCW,"D3DPMISCCAPS_CULLCW");
912 checkflag(flag,D3DPMISCCAPS_CULLNONE,"D3DPMISCCAPS_CULLNONE");
913 checkflag(flag,D3DPMISCCAPS_LINEPATTERNREP,"D3DPMISCCAPS_LINEPATTERNREP");
914 checkflag(flag,D3DPMISCCAPS_MASKPLANES,"D3DPMISCCAPS_MASKPLANES");
915 checkflag(flag,D3DPMISCCAPS_MASKZ,"D3DPMISCCAPS_MASKZ");
916 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwMiscCaps");
917
918 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwRasterCaps : ");
919 count = 0;
920 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwRasterCaps;
921 checkflag(flag,D3DPRASTERCAPS_ANISOTROPY,"D3DPRASTERCAPS_ANISOTROPY");
922 checkflag(flag,D3DPRASTERCAPS_ANTIALIASEDGES,"D3DPRASTERCAPS_ANTIALIASEDGES");
923 checkflag(flag,D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT,"D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT");
924 checkflag(flag,D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT,"D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT");
925 checkflag(flag,D3DPRASTERCAPS_DITHER,"D3DPRASTERCAPS_DITHER");
926 checkflag(flag,D3DPRASTERCAPS_FOGRANGE,"D3DPRASTERCAPS_FOGRANGE");
927 checkflag(flag,D3DPRASTERCAPS_FOGTABLE,"D3DPRASTERCAPS_FOGTABLE");
928 checkflag(flag,D3DPRASTERCAPS_FOGVERTEX,"D3DPRASTERCAPS_FOGVERTEX");
929 checkflag(flag,D3DPRASTERCAPS_PAT,"D3DPRASTERCAPS_PAT");
930 checkflag(flag,D3DPRASTERCAPS_ROP2,"D3DPRASTERCAPS_ROP2");
931 checkflag(flag,D3DPRASTERCAPS_STIPPLE,"D3DPRASTERCAPS_STIPPLE");
932 checkflag(flag,D3DPRASTERCAPS_SUBPIXEL,"D3DPRASTERCAPS_SUBPIXEL");
933 checkflag(flag,D3DPRASTERCAPS_SUBPIXELX,"D3DPRASTERCAPS_SUBPIXELX");
934 checkflag(flag,D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT,"D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT");
935 checkflag(flag,D3DPRASTERCAPS_WBUFFER,"D3DPRASTERCAPS_WBUFFER");
936 checkflag(flag,D3DPRASTERCAPS_WFOG,"D3DPRASTERCAPS_WFOG");
937 checkflag(flag,D3DPRASTERCAPS_XOR,"D3DPRASTERCAPS_XOR");
938 checkflag(flag,D3DPRASTERCAPS_ZBIAS,"D3DPRASTERCAPS_ZBIAS");
939 checkflag(flag,D3DPRASTERCAPS_ZBUFFERLESSHSR,"D3DPRASTERCAPS_ZBUFFERLESSHSR");
940 checkflag(flag,D3DPRASTERCAPS_ZFOG,"D3DPRASTERCAPS_ZFOG");
941 checkflag(flag,D3DPRASTERCAPS_ZTEST,"D3DPRASTERCAPS_ZTEST");
942 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwRasterCaps");
943
944 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwZCmpCaps : ");
945 count = 0;
946 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwZCmpCaps;
947 checkflag(flag,D3DPCMPCAPS_ALWAYS,"D3DPCMPCAPS_ALWAYS");
948 checkflag(flag,D3DPCMPCAPS_EQUAL,"D3DPCMPCAPS_EQUAL");
949 checkflag(flag,D3DPCMPCAPS_GREATER,"D3DPCMPCAPS_GREATER");
950 checkflag(flag,D3DPCMPCAPS_GREATEREQUAL,"D3DPCMPCAPS_GREATEREQUAL");
951 checkflag(flag,D3DPCMPCAPS_LESS,"D3DPCMPCAPS_LESS");
952 checkflag(flag,D3DPCMPCAPS_LESSEQUAL,"D3DPCMPCAPS_LESSEQUAL");
953 checkflag(flag,D3DPCMPCAPS_NEVER,"D3DPCMPCAPS_NEVER");
954 checkflag(flag,D3DPCMPCAPS_NOTEQUAL,"D3DPCMPCAPS_NOTEQUAL");
955 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwZCmpCaps ");
956
957 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwSrcBlendCaps : ");
958 count = 0;
959 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwSrcBlendCaps;
960 checkflag(flag,D3DPBLENDCAPS_BOTHINVSRCALPHA,"D3DPBLENDCAPS_BOTHINVSRCALPHA");
961 checkflag(flag,D3DPBLENDCAPS_BOTHSRCALPHA,"D3DPBLENDCAPS_BOTHSRCALPHA");
962 checkflag(flag,D3DPBLENDCAPS_DESTALPHA,"D3DPBLENDCAPS_DESTALPHA");
963 checkflag(flag,D3DPBLENDCAPS_DESTCOLOR,"D3DPBLENDCAPS_DESTCOLOR");
964 checkflag(flag,D3DPBLENDCAPS_INVDESTALPHA,"D3DPBLENDCAPS_INVDESTALPHA");
965 checkflag(flag,D3DPBLENDCAPS_INVDESTCOLOR,"D3DPBLENDCAPS_INVDESTCOLOR");
966 checkflag(flag,D3DPBLENDCAPS_INVSRCALPHA,"D3DPBLENDCAPS_INVSRCALPHA");
967 checkflag(flag,D3DPBLENDCAPS_INVSRCCOLOR,"D3DPBLENDCAPS_INVSRCCOLOR");
968 checkflag(flag,D3DPBLENDCAPS_ONE,"D3DPBLENDCAPS_ONE");
969 checkflag(flag,D3DPBLENDCAPS_SRCALPHA,"D3DPBLENDCAPS_SRCALPHA");
970 checkflag(flag,D3DPBLENDCAPS_SRCALPHASAT,"D3DPBLENDCAPS_SRCALPHASAT");
971 checkflag(flag,D3DPBLENDCAPS_SRCCOLOR,"D3DPBLENDCAPS_SRCCOLOR");
972 checkflag(flag,D3DPBLENDCAPS_ZERO,"D3DPBLENDCAPS_ZERO");
973 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwSrcBlendCaps ");
974
975 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwDestBlendCaps : ");
976 count = 0;
977 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwDestBlendCaps;
978 checkflag(flag,D3DPBLENDCAPS_BOTHINVSRCALPHA,"D3DPBLENDCAPS_BOTHINVSRCALPHA");
979 checkflag(flag,D3DPBLENDCAPS_BOTHSRCALPHA,"D3DPBLENDCAPS_BOTHSRCALPHA");
980 checkflag(flag,D3DPBLENDCAPS_DESTALPHA,"D3DPBLENDCAPS_DESTALPHA");
981 checkflag(flag,D3DPBLENDCAPS_DESTCOLOR,"D3DPBLENDCAPS_DESTCOLOR");
982 checkflag(flag,D3DPBLENDCAPS_INVDESTALPHA,"D3DPBLENDCAPS_INVDESTALPHA");
983 checkflag(flag,D3DPBLENDCAPS_INVDESTCOLOR,"D3DPBLENDCAPS_INVDESTCOLOR");
984 checkflag(flag,D3DPBLENDCAPS_INVSRCALPHA,"D3DPBLENDCAPS_INVSRCALPHA");
985 checkflag(flag,D3DPBLENDCAPS_INVSRCCOLOR,"D3DPBLENDCAPS_INVSRCCOLOR");
986 checkflag(flag,D3DPBLENDCAPS_ONE,"D3DPBLENDCAPS_ONE");
987 checkflag(flag,D3DPBLENDCAPS_SRCALPHA,"D3DPBLENDCAPS_SRCALPHA");
988 checkflag(flag,D3DPBLENDCAPS_SRCALPHASAT,"D3DPBLENDCAPS_SRCALPHASAT");
989 checkflag(flag,D3DPBLENDCAPS_SRCCOLOR,"D3DPBLENDCAPS_SRCCOLOR");
990 checkflag(flag,D3DPBLENDCAPS_ZERO,"D3DPBLENDCAPS_ZERO");
991 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwDestBlendCaps ");
992
993 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwAlphaCmpCaps : ");
994 count = 0;
995 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwAlphaCmpCaps;
996 checkflag(flag,D3DPCMPCAPS_ALWAYS,"D3DPCMPCAPS_ALWAYS");
997 checkflag(flag,D3DPCMPCAPS_EQUAL,"D3DPCMPCAPS_EQUAL");
998 checkflag(flag,D3DPCMPCAPS_GREATER,"D3DPCMPCAPS_GREATER");
999 checkflag(flag,D3DPCMPCAPS_GREATEREQUAL,"D3DPCMPCAPS_GREATEREQUAL");
1000 checkflag(flag,D3DPCMPCAPS_LESS,"D3DPCMPCAPS_LESS");
1001 checkflag(flag,D3DPCMPCAPS_LESSEQUAL,"D3DPCMPCAPS_LESSEQUAL");
1002 checkflag(flag,D3DPCMPCAPS_NEVER,"D3DPCMPCAPS_NEVER");
1003 checkflag(flag,D3DPCMPCAPS_NOTEQUAL,"D3DPCMPCAPS_NOTEQUAL");
1004 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwAlphaCmpCaps ");
1005
1006 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwShadeCaps : ");
1007 count = 0;
1008 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwShadeCaps;
1009 checkflag(flag,D3DPSHADECAPS_ALPHAFLATBLEND,"D3DPSHADECAPS_ALPHAFLATBLEND");
1010 checkflag(flag,D3DPSHADECAPS_ALPHAFLATSTIPPLED,"D3DPSHADECAPS_ALPHAFLATSTIPPLED");
1011 checkflag(flag,D3DPSHADECAPS_ALPHAGOURAUDBLEND,"D3DPSHADECAPS_ALPHAGOURAUDBLEND");
1012 checkflag(flag,D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED,"D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED");
1013 checkflag(flag,D3DPSHADECAPS_ALPHAPHONGBLEND,"D3DPSHADECAPS_ALPHAPHONGBLEND");
1014 checkflag(flag,D3DPSHADECAPS_ALPHAPHONGSTIPPLED,"D3DPSHADECAPS_ALPHAPHONGSTIPPLED");
1015 checkflag(flag,D3DPSHADECAPS_COLORFLATMONO,"D3DPSHADECAPS_COLORFLATMONO");
1016 checkflag(flag,D3DPSHADECAPS_COLORFLATRGB,"D3DPSHADECAPS_COLORFLATRGB");
1017 checkflag(flag,D3DPSHADECAPS_COLORGOURAUDMONO,"D3DPSHADECAPS_COLORGOURAUDMONO");
1018 checkflag(flag,D3DPSHADECAPS_COLORGOURAUDRGB,"D3DPSHADECAPS_COLORGOURAUDRGB");
1019 checkflag(flag,D3DPSHADECAPS_COLORPHONGMONO,"D3DPSHADECAPS_COLORPHONGMONO");
1020 checkflag(flag,D3DPSHADECAPS_COLORPHONGRGB,"D3DPSHADECAPS_COLORPHONGRGB");
1021 checkflag(flag,D3DPSHADECAPS_FOGFLAT,"D3DPSHADECAPS_FOGFLAT");
1022 checkflag(flag,D3DPSHADECAPS_FOGGOURAUD,"D3DPSHADECAPS_FOGGOURAUD");
1023 checkflag(flag,D3DPSHADECAPS_FOGPHONG,"D3DPSHADECAPS_FOGPHONG");
1024 checkflag(flag,D3DPSHADECAPS_SPECULARFLATMONO,"D3DPSHADECAPS_SPECULARFLATMONO");
1025 checkflag(flag,D3DPSHADECAPS_SPECULARFLATRGB,"D3DPSHADECAPS_SPECULARFLATRGB");
1026 checkflag(flag,D3DPSHADECAPS_SPECULARGOURAUDMONO,"D3DPSHADECAPS_SPECULARGOURAUDMONO");
1027 checkflag(flag,D3DPSHADECAPS_SPECULARGOURAUDRGB,"D3DPSHADECAPS_SPECULARGOURAUDRGB");
1028 checkflag(flag,D3DPSHADECAPS_SPECULARPHONGMONO,"D3DPSHADECAPS_SPECULARPHONGMONO");
1029 checkflag(flag,D3DPSHADECAPS_SPECULARPHONGRGB,"D3DPSHADECAPS_SPECULARPHONGRGB");
1030 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwShadeCaps ");
1031
1032 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwTextureCaps : ");
1033 count = 0;
1034 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwTextureCaps;
1035 checkflag(flag,D3DPTEXTURECAPS_ALPHA,"D3DPTEXTURECAPS_ALPHA");
1036 checkflag(flag,D3DPTEXTURECAPS_ALPHAPALETTE,"D3DPTEXTURECAPS_ALPHAPALETTE");
1037 checkflag(flag,D3DPTEXTURECAPS_BORDER,"D3DPTEXTURECAPS_BORDER");
1038 checkflag(flag,D3DPTEXTURECAPS_COLORKEYBLEND,"D3DPTEXTURECAPS_COLORKEYBLEND");
1039 checkflag(flag,D3DPTEXTURECAPS_CUBEMAP,"D3DPTEXTURECAPS_CUBEMAP");
1040 checkflag(flag,D3DPTEXTURECAPS_PERSPECTIVE,"D3DPTEXTURECAPS_PERSPECTIVE");
1041 checkflag(flag,D3DPTEXTURECAPS_POW2,"D3DPTEXTURECAPS_POW2");
1042 checkflag(flag,D3DPTEXTURECAPS_PROJECTED,"D3DPTEXTURECAPS_PROJECTED");
1043 checkflag(flag,D3DPTEXTURECAPS_NONPOW2CONDITIONAL,"D3DPTEXTURECAPS_NONPOW2CONDITIONAL");
1044 checkflag(flag,D3DPTEXTURECAPS_SQUAREONLY,"D3DPTEXTURECAPS_SQUAREONLY");
1045 //not in ddk or dxsdk but it is in msdn checkflag(flag,D3DPTEXTURECAPS_TEXREPEATNOTSCALESBYSIZE,"D3DPTEXTURECAPS_TEXREPEATNOTSCALESBYSIZE");
1046 //not in ddk or dxsdk but it is in msdn checkflag(flag,D3DPTEXTURECAPS_TEXTURETRANSFORM,"D3DPTEXTURECAPS_TEXTURETRANSFORM");
1047 checkflag(flag,D3DPTEXTURECAPS_TRANSPARENCY,"D3DPTEXTURECAPS_TRANSPARENCY");
1048 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwTextureCaps ");
1049
1050 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwTextureFilterCaps : ");
1051 count = 0;
1052 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwTextureFilterCaps;
1053 checkflag(flag,D3DPTFILTERCAPS_LINEAR,"D3DPTFILTERCAPS_LINEAR");
1054 checkflag(flag,D3DPTFILTERCAPS_LINEARMIPLINEAR,"D3DPTFILTERCAPS_LINEARMIPLINEAR");
1055 checkflag(flag,D3DPTFILTERCAPS_LINEARMIPNEAREST,"D3DPTFILTERCAPS_LINEARMIPNEAREST");
1056 checkflag(flag,D3DPTFILTERCAPS_MAGFAFLATCUBIC,"D3DPTFILTERCAPS_MAGFAFLATCUBIC");
1057 checkflag(flag,D3DPTFILTERCAPS_MAGFANISOTROPIC,"D3DPTFILTERCAPS_MAGFANISOTROPIC");
1058 checkflag(flag,D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC,"D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC");
1059 checkflag(flag,D3DPTFILTERCAPS_MAGFLINEAR,"D3DPTFILTERCAPS_MAGFLINEAR");
1060 checkflag(flag,D3DPTFILTERCAPS_MAGFPOINT,"D3DPTFILTERCAPS_MAGFPOINT");
1061 checkflag(flag,D3DPTFILTERCAPS_MINFANISOTROPIC,"D3DPTFILTERCAPS_MINFANISOTROPIC");
1062 checkflag(flag,D3DPTFILTERCAPS_MINFLINEAR,"D3DPTFILTERCAPS_MINFLINEAR");
1063 checkflag(flag,D3DPTFILTERCAPS_MINFPOINT,"D3DPTFILTERCAPS_MINFPOINT");
1064 checkflag(flag,D3DPTFILTERCAPS_MIPFLINEAR,"D3DPTFILTERCAPS_MIPFLINEAR");
1065 checkflag(flag,D3DPTFILTERCAPS_MIPFPOINT,"D3DPTFILTERCAPS_MIPFPOINT");
1066 checkflag(flag,D3DPTFILTERCAPS_MIPLINEAR,"D3DPTFILTERCAPS_MIPLINEAR");
1067 checkflag(flag,D3DPTFILTERCAPS_MIPNEAREST,"D3DPTFILTERCAPS_MIPNEAREST");
1068 checkflag(flag,D3DPTFILTERCAPS_NEAREST,"D3DPTFILTERCAPS_NEAREST");
1069 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwTextureFilterCaps ");
1070
1071 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwTextureBlendCaps : ");
1072 count = 0;
1073 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwTextureBlendCaps;
1074 checkflag(flag,D3DPTBLENDCAPS_ADD,"D3DPTBLENDCAPS_ADD");
1075 checkflag(flag,D3DPTBLENDCAPS_COPY,"D3DPTBLENDCAPS_COPY");
1076 checkflag(flag,D3DPTBLENDCAPS_DECAL,"D3DPTBLENDCAPS_DECAL");
1077 checkflag(flag,D3DPTBLENDCAPS_DECALALPHA,"D3DPTBLENDCAPS_DECALALPHA");
1078 checkflag(flag,D3DPTBLENDCAPS_DECALMASK,"D3DPTBLENDCAPS_DECALMASK");
1079 checkflag(flag,D3DPTBLENDCAPS_MODULATE,"D3DPTBLENDCAPS_MODULATE");
1080 checkflag(flag,D3DPTBLENDCAPS_MODULATEALPHA,"D3DPTBLENDCAPS_MODULATEALPHA");
1081 checkflag(flag,D3DPTBLENDCAPS_MODULATEMASK,"D3DPTBLENDCAPS_MODULATEMASK");
1082 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwTextureBlendCaps ");
1083
1084 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwTextureAddressCaps : ");
1085 count = 0;
1086 flag = puD3dDriverData->hwCaps.dpcTriCaps.dwTextureAddressCaps;
1087 checkflag(flag,D3DPTADDRESSCAPS_BORDER,"D3DPTADDRESSCAPS_BORDER");
1088 checkflag(flag,D3DPTADDRESSCAPS_CLAMP,"D3DPTADDRESSCAPS_CLAMP");
1089 checkflag(flag,D3DPTADDRESSCAPS_INDEPENDENTUV,"D3DPTADDRESSCAPS_INDEPENDENTUV");
1090 checkflag(flag,D3DPTADDRESSCAPS_MIRROR,"D3DPTADDRESSCAPS_MIRROR");
1091 checkflag(flag,D3DPTADDRESSCAPS_WRAP,"D3DPTADDRESSCAPS_WRAP");
1092 endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwTextureAddressCaps ");
1093
1094 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwStippleWidth : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcTriCaps.dwStippleWidth);
1095 printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwStippleHeight : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcTriCaps.dwStippleHeight);
1096 }
1097 else
1098 {
1099 printf("none puD3dDriverData->hwCaps.dpcTriCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dpcTriCaps.dwSize);
1100 }
1101
1102 printf(" puD3dDriverData->hwCaps.dwDeviceRenderBitDepth : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwDeviceRenderBitDepth);
1103 printf(" puD3dDriverData->hwCaps.dwDeviceZBufferBitDepth : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwDeviceZBufferBitDepth);
1104 printf(" puD3dDriverData->hwCaps.dwMaxBufferSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwMaxBufferSize);
1105 printf(" puD3dDriverData->hwCaps.dwMaxVertexCount : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwMaxVertexCount);
1106 }
1107 else
1108 {
1109 printf("none puD3dDriverData->hwCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dwSize);
1110 }
1111
1112 printf(" puD3dDriverData->dwNumVertices : 0x%08lx\n",(long)puD3dDriverData->dwNumVertices);
1113 printf(" puD3dDriverData->dwNumClipVertices : 0x%08lx\n",(long)puD3dDriverData->dwNumClipVertices);
1114 printf(" puD3dDriverData->dwNumTextureFormats : 0x%08lx\n",(long)puD3dDriverData->dwNumTextureFormats);
1115 printf(" puD3dDriverData->lpTextureFormats : 0x%08lx\n",(long)puD3dDriverData->lpTextureFormats);
1116 printf(" puD3dDriverData->lpTextureFormats : 0x%08lx\n",(long)puD3dDriverData->lpTextureFormats);
1117 }
1118 else
1119 {
1120 printf("none puD3dDriverData from the driver 0x%08lx\n",puD3dDriverData->dwSize);
1121 }
1122 }
1123
1124
1125 void
1126 dump_D3dBufferCallbacks(DD_D3DBUFCALLBACKS *puD3dBufferCallbacks, char *text)
1127 {
1128 int count = 0;
1129 DWORD flag = 0;
1130
1131 printf("dumping the DD_D3DBUFCALLBACKS from %s\n",text);
1132
1133 if (puD3dBufferCallbacks->dwSize == sizeof(DD_D3DBUFCALLBACKS))
1134 {
1135 printf(" puD3dBufferCallbacks->dwSize : 0x%08lx\n",(long)puD3dBufferCallbacks->dwSize);
1136 printf(" puD3dBufferCallbacks->dwFlags : ");
1137
1138 /* rember this flags are not in msdn only in ms ddk */
1139 count = 0;
1140 flag = puD3dBufferCallbacks->dwFlags;
1141 checkflag(flag,DDHAL_D3DBUFCB32_CANCREATED3DBUF,"DDHAL_D3DBUFCB32_CANCREATED3DBUF");
1142 checkflag(flag,DDHAL_D3DBUFCB32_CREATED3DBUF,"DDHAL_D3DBUFCB32_CREATED3DBUF");
1143
1144 checkflag(flag,DDHAL_D3DBUFCB32_DESTROYD3DBUF,"DDHAL_D3DBUFCB32_DESTROYD3DBUF");
1145
1146 checkflag(flag,DDHAL_D3DBUFCB32_LOCKD3DBUF,"DDHAL_D3DBUFCB32_LOCKD3DBUF");
1147 checkflag(flag,DDHAL_D3DBUFCB32_UNLOCKD3DBUF,"DDHAL_D3DBUFCB32_UNLOCKD3DBUF");
1148 endcheckflag(flag,"puD3dBufferCallbacks->dwFlags");
1149
1150 printf(" puD3dBufferCallbacks->CanCreateD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->CanCreateD3DBuffer);
1151 printf(" puD3dBufferCallbacks->CreateD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->CreateD3DBuffer);
1152 printf(" puD3dBufferCallbacks->DestroyD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->DestroyD3DBuffer);
1153 printf(" puD3dBufferCallbacks->LockD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->LockD3DBuffer);
1154 printf(" puD3dBufferCallbacks->UnlockD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->UnlockD3DBuffer);
1155 }
1156 else
1157 {
1158 printf("none puD3dBufferCallbacks from the driver 0x%08lx\n",puD3dBufferCallbacks->dwSize);
1159 }
1160
1161 }
1162
1163 void
1164 dump_D3dTextureFormats(DDSURFACEDESC *puD3dTextureFormats, int dwNum, char *text)
1165 {
1166 int t=0;
1167 int count = 0;
1168 DWORD flag = 0;
1169 DDSURFACEDESC * myTextureFormats = puD3dTextureFormats;
1170
1171 printf("dumping the DDSURFACEDESC/DDSURFACEDESC2 from %s\n",text);
1172
1173 for (t=0;t<dwNum;t++)
1174 {
1175 printf("Show %d of %d DDSURFACEDESC\n",t+1,dwNum);
1176 if (myTextureFormats->dwSize == sizeof(DDSURFACEDESC))
1177 {
1178 printf(" puD3dTextureFormats->dwSize : 0x%08lx\n",(long)myTextureFormats->dwSize);
1179
1180 printf(" puD3dTextureFormats->dwFlags : ");
1181 count = 0;
1182 flag = myTextureFormats->dwFlags;
1183 checkflag(flag,DDSD_ALPHABITDEPTH,"DDSD_ALPHABITDEPTH");
1184 checkflag(flag,DDSD_BACKBUFFERCOUNT ,"DDSD_BACKBUFFERCOUNT");
1185 checkflag(flag,DDSD_CAPS,"DDSD_CAPS ");
1186 checkflag(flag,DDSD_CKDESTBLT,"DDSD_CKDESTBLT");
1187 checkflag(flag,DDSD_CKDESTOVERLAY,"DDSD_CKDESTOVERLAY");
1188 checkflag(flag,DDSD_CKSRCBLT,"DDSD_CKSRCBLT");
1189 checkflag(flag,DDSD_CKSRCOVERLAY,"DDSD_CKSRCOVERLAY");
1190 checkflag(flag,DDSD_HEIGHT,"DDSD_HEIGHT");
1191 checkflag(flag,DDSD_LINEARSIZE,"DDSD_LINEARSIZE");
1192 checkflag(flag,DDSD_LPSURFACE,"DDSD_LPSURFACE");
1193 checkflag(flag,DDSD_MIPMAPCOUNT,"DDSD_MIPMAPCOUNT");
1194 checkflag(flag,DDSD_PITCH,"DDSD_PITCH");
1195 checkflag(flag,DDSD_PIXELFORMAT,"DDSD_PIXELFORMAT");
1196 checkflag(flag,DDSD_REFRESHRATE,"DDSD_REFRESHRATE");
1197 checkflag(flag,DDSD_WIDTH,"DDSD_WIDTH");
1198 checkflag(flag,DDSD_ZBUFFERBITDEPTH,"DDSD_ZBUFFERBITDEPTH");
1199 endcheckflag(flag,"puD3dTextureFormats->dwFlags");
1200
1201 printf(" puD3dTextureFormats->dwHeight : 0x%08lx\n",(long)myTextureFormats->dwHeight);
1202 printf(" puD3dTextureFormats->dwWidth : 0x%08lx\n",(long)myTextureFormats->dwWidth);
1203 printf(" puD3dTextureFormats->dwLinearSize : 0x%08lx\n",(long)myTextureFormats->dwLinearSize);
1204 printf(" puD3dTextureFormats->dwBackBufferCount : 0x%08lx\n",(long)myTextureFormats->dwBackBufferCount);
1205 printf(" puD3dTextureFormats->dwZBufferBitDepth : 0x%08lx\n",(long)myTextureFormats->dwZBufferBitDepth);
1206 printf(" puD3dTextureFormats->dwAlphaBitDepth : 0x%08lx\n",(long)myTextureFormats->dwAlphaBitDepth);
1207 printf(" puD3dTextureFormats->dwReserved : 0x%08lx\n",(long)myTextureFormats->dwReserved);
1208 printf(" puD3dTextureFormats->lpSurface : 0x%08lx\n",(long)myTextureFormats->lpSurface);
1209 printf(" puD3dTextureFormats->ddckCKDestOverlay.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKDestOverlay.dwColorSpaceLowValue);
1210 printf(" puD3dTextureFormats->ddckCKDestOverlay.dwColorSpaceHighValue : 0x%08lx\n",(long)myTextureFormats->ddckCKDestOverlay.dwColorSpaceHighValue);
1211 printf(" puD3dTextureFormats->ddckCKDestBlt.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKDestBlt.dwColorSpaceLowValue);
1212 printf(" puD3dTextureFormats->ddckCKDestBlt : 0x%08lx\n",(long)myTextureFormats->ddckCKDestBlt.dwColorSpaceHighValue);
1213 printf(" puD3dTextureFormats->ddckCKSrcOverlay.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKSrcOverlay.dwColorSpaceLowValue);
1214 printf(" puD3dTextureFormats->ddckCKSrcOverlay.dwColorSpaceHighValue : 0x%08lx\n",(long)myTextureFormats->ddckCKSrcOverlay.dwColorSpaceHighValue);
1215 printf(" puD3dTextureFormats->ddckCKSrcBlt.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKSrcBlt.dwColorSpaceLowValue);
1216 printf(" puD3dTextureFormats->ddckCKSrcBlt.dwColorSpaceHighValue : 0x%08lx\n",(long)myTextureFormats->ddckCKSrcBlt.dwColorSpaceHighValue);
1217
1218 // DDPIXELFORMAT
1219 printf(" puD3dTextureFormats->ddpfPixelFormat.dwSize : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwSize);
1220 if (puD3dTextureFormats->ddpfPixelFormat.dwSize == sizeof(DDPIXELFORMAT))
1221 {
1222 printf(" puD3dTextureFormats->ddpfPixelFormat.dwFlags : ");
1223 count = 0;
1224 flag = myTextureFormats->ddpfPixelFormat.dwFlags;
1225 checkflag(flag,DDPF_ALPHA,"DDPF_ALPHA");
1226 checkflag(flag,DDPF_ALPHAPIXELS ,"DDPF_ALPHAPIXELS");
1227 checkflag(flag,DDPF_ALPHAPREMULT,"DDPF_ALPHAPREMULT");
1228 checkflag(flag,DDPF_BUMPLUMINANCE ,"DDPF_BUMPLUMINANCE");
1229 checkflag(flag,DDPF_BUMPDUDV,"DDPF_BUMPDUDV");
1230 checkflag(flag,DDPF_COMPRESSED,"DDPF_COMPRESSED");
1231 checkflag(flag,DDPF_FOURCC,"DDPF_FOURCC");
1232 checkflag(flag,DDPF_LUMINANCE,"DDPF_LUMINANCE");
1233 checkflag(flag,DDPF_PALETTEINDEXED1,"DDPF_PALETTEINDEXED1");
1234 checkflag(flag,DDPF_PALETTEINDEXED2,"DDPF_PALETTEINDEXED2");
1235 checkflag(flag,DDPF_PALETTEINDEXED4,"DDPF_PALETTEINDEXED4");
1236 checkflag(flag,DDPF_PALETTEINDEXED8,"DDPF_PALETTEINDEXED8");
1237 checkflag(flag,DDPF_PALETTEINDEXEDTO8,"DDPF_PALETTEINDEXEDTO8");
1238 checkflag(flag,DDPF_RGB ,"DDPF_RGB");
1239 checkflag(flag,DDPF_RGBTOYUV,"DDPF_RGBTOYUV");
1240 checkflag(flag,DDPF_STENCILBUFFER,"DDPF_STENCILBUFFER");
1241 checkflag(flag,DDPF_YUV,"DDPF_YUV");
1242 checkflag(flag,DDPF_ZBUFFER,"DDPF_ZBUFFER");
1243 checkflag(flag,DDPF_ZPIXELS,"DDPF_ZPIXELS");
1244 endcheckflag(flag,"puD3dTextureFormats->ddpfPixelFormat.dwFlags");
1245
1246
1247 if (myTextureFormats->ddpfPixelFormat.dwFlags & DDPF_FOURCC)
1248 {
1249 printf(" puD3dTextureFormats->ddpfPixelFormat.dwFourCC : ");
1250 switch(myTextureFormats->ddpfPixelFormat.dwFourCC)
1251 {
1252 case MAKEFOURCC('A','U','R','2'):
1253 printf("AUR2\n");
1254 break;
1255
1256 case MAKEFOURCC('A','U','R','A'):
1257 printf("AURA\n");
1258 break;
1259
1260 case MAKEFOURCC('C','H','A','M'):
1261 printf("CHAM\n");
1262 break;
1263
1264 case MAKEFOURCC('C','V','I','D'):
1265 printf("CVID\n");
1266 break;
1267
1268 case MAKEFOURCC('D','X','T','1'):
1269 printf("DXT1\n");
1270 break;
1271
1272 case MAKEFOURCC('D','X','T','2'):
1273 printf("DXT2\n");
1274 break;
1275
1276 case MAKEFOURCC('D','X','T','3'):
1277 printf("DXT3\n");
1278 break;
1279
1280 case MAKEFOURCC('D','X','T','4'):
1281 printf("DXT4\n");
1282 break;
1283
1284 case MAKEFOURCC('D','X','T','5'):
1285 printf("DXT5\n");
1286 break;
1287
1288 case MAKEFOURCC('F','V','F','1'):
1289 printf("FVF1\n");
1290 break;
1291
1292 case MAKEFOURCC('I','F','0','9'):
1293 printf("IF09\n");
1294 break;
1295
1296 case MAKEFOURCC('I','V','3','1'):
1297 printf("IV31\n");
1298 break;
1299
1300 case MAKEFOURCC('J','P','E','G'):
1301 printf("JPEG\n");
1302 break;
1303
1304 case MAKEFOURCC('M','J','P','G'):
1305 printf("MJPG\n");
1306 break;
1307
1308 case MAKEFOURCC('M','R','L','E'):
1309 printf("MRLE\n");
1310 break;
1311
1312 case MAKEFOURCC('M','S','V','C'):
1313 printf("MSVC\n");
1314 break;
1315
1316 case MAKEFOURCC('P','H','M','O'):
1317 printf("PHMO\n");
1318 break;
1319
1320 case MAKEFOURCC('R','T','2','1'):
1321 printf("RT21\n");
1322 break;
1323
1324 case MAKEFOURCC('U','L','T','I'):
1325 printf("ULTI\n");
1326 break;
1327
1328 case MAKEFOURCC('V','4','2','2'):
1329 printf("V422\n");
1330 break;
1331
1332 case MAKEFOURCC('V','6','5','5'):
1333 printf("V655\n");
1334 break;
1335
1336 case MAKEFOURCC('V','D','C','T'):
1337 printf("VDCT\n");
1338 break;
1339
1340 case MAKEFOURCC('V','I','D','S'):
1341 printf("VIDS\n");
1342 break;
1343
1344 case MAKEFOURCC('Y','U','9','2'):
1345 printf("YU92\n");
1346 break;
1347
1348 case MAKEFOURCC('Y','U','V','8'):
1349 printf("YUV8\n");
1350 break;
1351
1352 case MAKEFOURCC('Y','U','V','9'):
1353 printf("YUV9\n");
1354 break;
1355
1356 case MAKEFOURCC('Y','U','Y','V'):
1357 printf("YUYV\n");
1358 break;
1359
1360 case MAKEFOURCC('Z','P','E','G'):
1361 printf("ZPEG\n");
1362 break;
1363
1364 default:
1365 printf("0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwFourCC);
1366 break;
1367 }
1368 }
1369 else
1370 {
1371 printf(" puD3dTextureFormats->ddpfPixelFormat.dwFourCC : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwFourCC);
1372 }
1373 printf(" puD3dTextureFormats->ddpfPixelFormat.dwRGBBitCount : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwRGBBitCount);
1374 printf(" puD3dTextureFormats->ddpfPixelFormat.dwRBitMask : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwRBitMask);
1375 printf(" puD3dTextureFormats->ddpfPixelFormat.dwGBitMask : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwGBitMask);
1376 printf(" puD3dTextureFormats->ddpfPixelFormat.dwBBitMask : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwBBitMask);
1377 printf(" puD3dTextureFormats->ddpfPixelFormat.dwRGBAlphaBitMask : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwRGBAlphaBitMask);
1378 }
1379 else
1380 {
1381 printf("none uD3dTextureFormats->ddpfPixelFormat from the driver 0x%08lx\n",myTextureFormats->ddpfPixelFormat.dwSize);
1382 }
1383
1384 printf(" puD3dTextureFormats->ddsCaps.dwCaps : ");
1385 count = 0;
1386 flag = myTextureFormats->ddsCaps.dwCaps;
1387 // not in use longer acoing msdn checkflag(flag,DDSCAPS_3D,"DDSCAPS_3D");
1388 checkflag(flag,DDSCAPS_3DDEVICE ,"DDSCAPS_3DDEVICE");
1389 checkflag(flag,DDSCAPS_ALLOCONLOAD,"DDSCAPS_ALLOCONLOAD ");
1390 checkflag(flag,DDSCAPS_ALPHA,"DDSCAPS_ALPHA");
1391 checkflag(flag,DDSCAPS_BACKBUFFER,"DDSCAPS_BACKBUFFER");
1392 checkflag(flag,DDSCAPS_FLIP,"DDSCAPS_FLIP");
1393 checkflag(flag,DDSCAPS_FRONTBUFFER,"DDSCAPS_FRONTBUFFER");
1394 checkflag(flag,DDSCAPS_HWCODEC,"DDSCAPS_HWCODEC");
1395 checkflag(flag,DDSCAPS_LIVEVIDEO ,"DDSCAPS_LIVEVIDEO");
1396 checkflag(flag,DDSCAPS_LOCALVIDMEM,"DDSCAPS_LOCALVIDMEM");
1397 checkflag(flag,DDSCAPS_MIPMAP,"DDSCAPS_MIPMAP");
1398 checkflag(flag,DDSCAPS_MODEX,"DDSCAPS_MODEX");
1399 checkflag(flag,DDSCAPS_NONLOCALVIDMEM,"DDSCAPS_NONLOCALVIDMEM");
1400 checkflag(flag,DDSCAPS_OFFSCREENPLAIN,"DDSCAPS_OFFSCREENPLAIN");
1401 checkflag(flag,DDSCAPS_OPTIMIZED,"DDSCAPS_OPTIMIZED");
1402 checkflag(flag,DDSCAPS_OVERLAY,"DDSCAPS_OVERLAY");
1403 checkflag(flag,DDSCAPS_OWNDC,"DDSCAPS_OWNDC");
1404 checkflag(flag,DDSCAPS_PALETTE,"DDSCAPS_PALETTE");
1405 checkflag(flag,DDSCAPS_PRIMARYSURFACE ,"DDSCAPS_PRIMARYSURFACE");
1406 checkflag(flag,DDSCAPS_STANDARDVGAMODE,"DDSCAPS_STANDARDVGAMODE");
1407 checkflag(flag,DDSCAPS_SYSTEMMEMORY,"DDSCAPS_SYSTEMMEMORY");
1408 checkflag(flag,DDSCAPS_TEXTURE,"DDSCAPS_TEXTURE");
1409 checkflag(flag,DDSCAPS_VIDEOMEMORY,"DDSCAPS_VIDEOMEMORY");
1410 checkflag(flag,DDSCAPS_VIDEOPORT,"DDSCAPS_VIDEOPORT");
1411 checkflag(flag,DDSCAPS_VISIBLE,"DDSCAPS_VISIBLE");
1412 checkflag(flag,DDSCAPS_WRITEONLY ,"DDSCAPS_WRITEONLY");
1413 checkflag(flag,DDSCAPS_ZBUFFER,"DDSCAPS_ZBUFFER");
1414 endcheckflag(flag,"puD3dTextureFormats->ddsCaps.dwCaps");
1415
1416
1417 myTextureFormats = (DDSURFACEDESC *) (((DWORD) myTextureFormats) + sizeof(DDSURFACEDESC));
1418 }
1419 else
1420 {
1421 printf("error this should not happen : puD3dTextureFormats from the driver 0x%08lx\n",myTextureFormats->dwSize);
1422 break;
1423 }
1424 }
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436 }