Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

623 lines
27 KiB

  1. sinclude(`d3dmkhdr.m4')dnl This file must be preprocessed by the m4 preprocessor.
  2. /*==========================================================================;
  3. *
  4. * Copyright (C) Microsoft Corporation. All Rights Reserved.
  5. *
  6. * File: d3dcaps.h
  7. * Content: Direct3D capabilities include file
  8. begindoc
  9. * History:
  10. * Date By Reason
  11. * ==== == ======
  12. * 04/11/95 stevela Transform and lighting caps added.
  13. * 09/04/96 stevela Commented text after final endif.
  14. enddoc
  15. *
  16. ***************************************************************************/
  17. #ifndef _D3DCAPS_H
  18. #define _D3DCAPS_H
  19. /*
  20. * Pull in DirectDraw include file automatically:
  21. */
  22. #include "ddraw.h"
  23. #ifndef DIRECT3D_VERSION ;public_600
  24. #define DIRECT3D_VERSION 0x0300;public_dx3
  25. #define DIRECT3D_VERSION 0x0500;public_dx5
  26. #define DIRECT3D_VERSION 0x0600;public_dx6
  27. #define DIRECT3D_VERSION 0x0700;public_700
  28. #endif ;public_600
  29. #pragma pack(4)
  30. /* Description of capabilities of transform */
  31. typedef struct _D3DTRANSFORMCAPS {
  32. DWORD dwSize;
  33. DWORD dwCaps;
  34. } D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS;
  35. #define D3DTRANSFORMCAPS_CLIP 0x00000001L /* Will clip whilst transforming */
  36. /* Description of capabilities of lighting */
  37. typedef struct _D3DLIGHTINGCAPS {
  38. DWORD dwSize;
  39. DWORD dwCaps; /* Lighting caps */
  40. DWORD dwLightingModel; /* Lighting model - RGB or mono */
  41. DWORD dwNumLights; /* Number of lights that can be handled */
  42. } D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
  43. #define D3DLIGHTINGMODEL_RGB 0x00000001L
  44. #define D3DLIGHTINGMODEL_MONO 0x00000002L
  45. #define D3DLIGHTCAPS_POINT 0x00000001L /* Point lights supported */
  46. #define D3DLIGHTCAPS_SPOT 0x00000002L /* Spot lights supported */
  47. #define D3DLIGHTCAPS_DIRECTIONAL 0x00000004L /* Directional lights supported */
  48. #if(DIRECT3D_VERSION < 0x700) ;public_700
  49. #define D3DLIGHTCAPS_PARALLELPOINT 0x00000008L /* Parallel point lights supported */
  50. #endif ;public_700
  51. #if(DIRECT3D_VERSION < 0x500) ;public_500
  52. #define D3DLIGHTCAPS_GLSPOT 0x00000010L /* GL syle spot lights supported */
  53. #endif ;public_500
  54. /* Description of capabilities for each primitive type */
  55. typedef struct _D3DPrimCaps {
  56. DWORD dwSize;
  57. DWORD dwMiscCaps; /* Capability flags */
  58. DWORD dwRasterCaps;
  59. DWORD dwZCmpCaps;
  60. DWORD dwSrcBlendCaps;
  61. DWORD dwDestBlendCaps;
  62. DWORD dwAlphaCmpCaps;
  63. DWORD dwShadeCaps;
  64. DWORD dwTextureCaps;
  65. DWORD dwTextureFilterCaps;
  66. DWORD dwTextureBlendCaps;
  67. DWORD dwTextureAddressCaps;
  68. DWORD dwStippleWidth; /* maximum width and height of */
  69. DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */
  70. } D3DPRIMCAPS, *LPD3DPRIMCAPS;
  71. /* D3DPRIMCAPS dwMiscCaps */
  72. #define D3DPMISCCAPS_MASKPLANES 0x00000001L
  73. #define D3DPMISCCAPS_MASKZ 0x00000002L
  74. #define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
  75. #define D3DPMISCCAPS_CONFORMANT 0x00000008L
  76. #define D3DPMISCCAPS_CULLNONE 0x00000010L
  77. #define D3DPMISCCAPS_CULLCW 0x00000020L
  78. #define D3DPMISCCAPS_CULLCCW 0x00000040L
  79. /* D3DPRIMCAPS dwRasterCaps */
  80. #define D3DPRASTERCAPS_DITHER 0x00000001L
  81. #define D3DPRASTERCAPS_ROP2 0x00000002L
  82. #define D3DPRASTERCAPS_XOR 0x00000004L
  83. #define D3DPRASTERCAPS_PAT 0x00000008L
  84. #define D3DPRASTERCAPS_ZTEST 0x00000010L
  85. #define D3DPRASTERCAPS_SUBPIXEL 0x00000020L
  86. #define D3DPRASTERCAPS_SUBPIXELX 0x00000040L
  87. #define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
  88. #define D3DPRASTERCAPS_FOGTABLE 0x00000100L
  89. #define D3DPRASTERCAPS_STIPPLE 0x00000200L
  90. ;begin_if_(DIRECT3D_VERSION)_500
  91. #define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L
  92. #define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L
  93. #define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
  94. #define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
  95. #define D3DPRASTERCAPS_ZBIAS 0x00004000L
  96. #define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
  97. #define D3DPRASTERCAPS_FOGRANGE 0x00010000L
  98. #define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
  99. ;end_if_(DIRECT3D_VERSION)_500
  100. ;begin_if_(DIRECT3D_VERSION)_600
  101. #define D3DPRASTERCAPS_WBUFFER 0x00040000L
  102. #define D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000L
  103. #define D3DPRASTERCAPS_WFOG 0x00100000L
  104. #define D3DPRASTERCAPS_ZFOG 0x00200000L
  105. ;end_if_(DIRECT3D_VERSION)_600
  106. /* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */
  107. #define D3DPCMPCAPS_NEVER 0x00000001L
  108. #define D3DPCMPCAPS_LESS 0x00000002L
  109. #define D3DPCMPCAPS_EQUAL 0x00000004L
  110. #define D3DPCMPCAPS_LESSEQUAL 0x00000008L
  111. #define D3DPCMPCAPS_GREATER 0x00000010L
  112. #define D3DPCMPCAPS_NOTEQUAL 0x00000020L
  113. #define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
  114. #define D3DPCMPCAPS_ALWAYS 0x00000080L
  115. /* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */
  116. #define D3DPBLENDCAPS_ZERO 0x00000001L
  117. #define D3DPBLENDCAPS_ONE 0x00000002L
  118. #define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
  119. #define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
  120. #define D3DPBLENDCAPS_SRCALPHA 0x00000010L
  121. #define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
  122. #define D3DPBLENDCAPS_DESTALPHA 0x00000040L
  123. #define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
  124. #define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
  125. #define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
  126. #define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
  127. #define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
  128. #define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
  129. /* D3DPRIMCAPS dwShadeCaps */
  130. #define D3DPSHADECAPS_COLORFLATMONO 0x00000001L
  131. #define D3DPSHADECAPS_COLORFLATRGB 0x00000002L
  132. #define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004L
  133. #define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
  134. #define D3DPSHADECAPS_COLORPHONGMONO 0x00000010L
  135. #define D3DPSHADECAPS_COLORPHONGRGB 0x00000020L
  136. #define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040L
  137. #define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080L
  138. #define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100L
  139. #define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
  140. #define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400L
  141. #define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800L
  142. #define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000L
  143. #define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000L
  144. #define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
  145. #define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000L
  146. #define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000L
  147. #define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000L
  148. #define D3DPSHADECAPS_FOGFLAT 0x00040000L
  149. #define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
  150. #define D3DPSHADECAPS_FOGPHONG 0x00100000L
  151. /* D3DPRIMCAPS dwTextureCaps */
  152. /*
  153. * Perspective-correct texturing is supported
  154. */
  155. #define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
  156. /*
  157. * Power-of-2 texture dimensions are required
  158. */
  159. #define D3DPTEXTURECAPS_POW2 0x00000002L
  160. /*
  161. * Alpha in texture pixels is supported
  162. */
  163. #define D3DPTEXTURECAPS_ALPHA 0x00000004L
  164. /*
  165. * Color-keyed textures are supported
  166. */
  167. #define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
  168. /*
  169. * obsolete, see D3DPTADDRESSCAPS_BORDER
  170. */
  171. #define D3DPTEXTURECAPS_BORDER 0x00000010L
  172. /*
  173. * Only square textures are supported
  174. */
  175. #define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L
  176. ;begin_if_(DIRECT3D_VERSION)_600
  177. /*
  178. * Texture indices are not scaled by the texture size prior
  179. * to interpolation.
  180. */
  181. #define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L
  182. /*
  183. * Device can draw alpha from texture palettes
  184. */
  185. #define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L
  186. /*
  187. * Device can use non-POW2 textures if:
  188. * 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
  189. * 2) D3DRS_WRAP(N) is zero for this texture's coordinates
  190. * 3) mip mapping is not enabled (use magnification filter only)
  191. */
  192. #define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
  193. ;end_if_(DIRECT3D_VERSION)_600
  194. ;begin_if_(DIRECT3D_VERSION)_700
  195. // 0x00000200L unused
  196. /*
  197. * Device can divide transformed texture coordinates by the
  198. * COUNTth texture coordinate (can do D3DTTFF_PROJECTED)
  199. */
  200. #define D3DPTEXTURECAPS_PROJECTED 0x00000400L
  201. /*
  202. * Device can do cubemap textures
  203. */
  204. #define D3DPTEXTURECAPS_CUBEMAP 0x00000800L
  205. #define D3DPTEXTURECAPS_COLORKEYBLEND 0x00001000L
  206. ;end_if_(DIRECT3D_VERSION)_700
  207. /* D3DPRIMCAPS dwTextureFilterCaps */
  208. #define D3DPTFILTERCAPS_NEAREST 0x00000001L
  209. #define D3DPTFILTERCAPS_LINEAR 0x00000002L
  210. #define D3DPTFILTERCAPS_MIPNEAREST 0x00000004L
  211. #define D3DPTFILTERCAPS_MIPLINEAR 0x00000008L
  212. #define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010L
  213. #define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020L
  214. ;begin_if_(DIRECT3D_VERSION)_600
  215. /* Device3 Min Filter */
  216. #define D3DPTFILTERCAPS_MINFPOINT 0x00000100L
  217. #define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
  218. #define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
  219. /* Device3 Mip Filter */
  220. #define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L
  221. #define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L
  222. /* Device3 Mag Filter */
  223. #define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L
  224. #define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L
  225. #define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L
  226. #define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L
  227. #define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L
  228. ;end_if_(DIRECT3D_VERSION)_600
  229. /* D3DPRIMCAPS dwTextureBlendCaps */
  230. #define D3DPTBLENDCAPS_DECAL 0x00000001L
  231. #define D3DPTBLENDCAPS_MODULATE 0x00000002L
  232. #define D3DPTBLENDCAPS_DECALALPHA 0x00000004L
  233. #define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008L
  234. #define D3DPTBLENDCAPS_DECALMASK 0x00000010L
  235. #define D3DPTBLENDCAPS_MODULATEMASK 0x00000020L
  236. #define D3DPTBLENDCAPS_COPY 0x00000040L
  237. ;begin_if_(DIRECT3D_VERSION)_500
  238. #define D3DPTBLENDCAPS_ADD 0x00000080L
  239. ;end_if_(DIRECT3D_VERSION)_500
  240. /* D3DPRIMCAPS dwTextureAddressCaps */
  241. #define D3DPTADDRESSCAPS_WRAP 0x00000001L
  242. #define D3DPTADDRESSCAPS_MIRROR 0x00000002L
  243. #define D3DPTADDRESSCAPS_CLAMP 0x00000004L
  244. ;begin_if_(DIRECT3D_VERSION)_500
  245. #define D3DPTADDRESSCAPS_BORDER 0x00000008L
  246. #define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
  247. ;end_if_(DIRECT3D_VERSION)_500
  248. ;begin_if_(DIRECT3D_VERSION)_600
  249. /* D3DDEVICEDESC dwStencilCaps */
  250. #define D3DSTENCILCAPS_KEEP 0x00000001L
  251. #define D3DSTENCILCAPS_ZERO 0x00000002L
  252. #define D3DSTENCILCAPS_REPLACE 0x00000004L
  253. #define D3DSTENCILCAPS_INCRSAT 0x00000008L
  254. #define D3DSTENCILCAPS_DECRSAT 0x00000010L
  255. #define D3DSTENCILCAPS_INVERT 0x00000020L
  256. #define D3DSTENCILCAPS_INCR 0x00000040L
  257. #define D3DSTENCILCAPS_DECR 0x00000080L
  258. /* D3DDEVICEDESC dwTextureOpCaps */
  259. #define D3DTEXOPCAPS_DISABLE 0x00000001L
  260. #define D3DTEXOPCAPS_SELECTARG1 0x00000002L
  261. #define D3DTEXOPCAPS_SELECTARG2 0x00000004L
  262. #define D3DTEXOPCAPS_MODULATE 0x00000008L
  263. #define D3DTEXOPCAPS_MODULATE2X 0x00000010L
  264. #define D3DTEXOPCAPS_MODULATE4X 0x00000020L
  265. #define D3DTEXOPCAPS_ADD 0x00000040L
  266. #define D3DTEXOPCAPS_ADDSIGNED 0x00000080L
  267. #define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L
  268. #define D3DTEXOPCAPS_SUBTRACT 0x00000200L
  269. #define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L
  270. #define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L
  271. #define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L
  272. #define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L
  273. #define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L
  274. #define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L
  275. #define D3DTEXOPCAPS_PREMODULATE 0x00010000L
  276. #define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L
  277. #define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L
  278. #define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L
  279. #define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L
  280. #define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L
  281. #define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L
  282. #define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L
  283. /* D3DDEVICEDESC dwFVFCaps flags */
  284. #define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
  285. #define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
  286. ;end_if_(DIRECT3D_VERSION)_600
  287. /*
  288. * Description for a device.
  289. * This is used to describe a device that is to be created or to query
  290. * the current device.
  291. */
  292. typedef struct _D3DDeviceDesc {
  293. DWORD dwSize; /* Size of D3DDEVICEDESC structure */
  294. DWORD dwFlags; /* Indicates which fields have valid data */
  295. D3DCOLORMODEL dcmColorModel; /* Color model of device */
  296. DWORD dwDevCaps; /* Capabilities of device */
  297. D3DTRANSFORMCAPS dtcTransformCaps; /* Capabilities of transform */
  298. BOOL bClipping; /* Device can do 3D clipping */
  299. D3DLIGHTINGCAPS dlcLightingCaps; /* Capabilities of lighting */
  300. D3DPRIMCAPS dpcLineCaps;
  301. D3DPRIMCAPS dpcTriCaps;
  302. DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
  303. DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
  304. DWORD dwMaxBufferSize; /* Maximum execute buffer size */
  305. DWORD dwMaxVertexCount; /* Maximum vertex count */
  306. ;begin_if_(DIRECT3D_VERSION)_500
  307. // *** New fields for DX5 *** //
  308. // Width and height caps are 0 for legacy HALs.
  309. DWORD dwMinTextureWidth, dwMinTextureHeight;
  310. DWORD dwMaxTextureWidth, dwMaxTextureHeight;
  311. DWORD dwMinStippleWidth, dwMaxStippleWidth;
  312. DWORD dwMinStippleHeight, dwMaxStippleHeight;
  313. ;end_if_(DIRECT3D_VERSION)_500
  314. ;begin_if_(DIRECT3D_VERSION)_600
  315. // New fields for DX6
  316. DWORD dwMaxTextureRepeat;
  317. DWORD dwMaxTextureAspectRatio;
  318. DWORD dwMaxAnisotropy;
  319. // Guard band that the rasterizer can accommodate
  320. // Screen-space vertices inside this space but outside the viewport
  321. // will get clipped properly.
  322. D3DVALUE dvGuardBandLeft;
  323. D3DVALUE dvGuardBandTop;
  324. D3DVALUE dvGuardBandRight;
  325. D3DVALUE dvGuardBandBottom;
  326. D3DVALUE dvExtentsAdjust;
  327. DWORD dwStencilCaps;
  328. DWORD dwFVFCaps;
  329. DWORD dwTextureOpCaps;
  330. WORD wMaxTextureBlendStages;
  331. WORD wMaxSimultaneousTextures;
  332. ;end_if_(DIRECT3D_VERSION)_600
  333. } D3DDEVICEDESC, *LPD3DDEVICEDESC;
  334. ;begin_if_(DIRECT3D_VERSION)_700
  335. typedef struct _D3DDeviceDesc7 {
  336. DWORD dwDevCaps; /* Capabilities of device */
  337. D3DPRIMCAPS dpcLineCaps;
  338. D3DPRIMCAPS dpcTriCaps;
  339. DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
  340. DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
  341. DWORD dwMinTextureWidth, dwMinTextureHeight;
  342. DWORD dwMaxTextureWidth, dwMaxTextureHeight;
  343. DWORD dwMaxTextureRepeat;
  344. DWORD dwMaxTextureAspectRatio;
  345. DWORD dwMaxAnisotropy;
  346. D3DVALUE dvGuardBandLeft;
  347. D3DVALUE dvGuardBandTop;
  348. D3DVALUE dvGuardBandRight;
  349. D3DVALUE dvGuardBandBottom;
  350. D3DVALUE dvExtentsAdjust;
  351. DWORD dwStencilCaps;
  352. DWORD dwFVFCaps;
  353. DWORD dwTextureOpCaps;
  354. WORD wMaxTextureBlendStages;
  355. WORD wMaxSimultaneousTextures;
  356. DWORD dwMaxActiveLights;
  357. D3DVALUE dvMaxVertexW;
  358. GUID deviceGUID;
  359. WORD wMaxUserClipPlanes;
  360. WORD wMaxVertexBlendMatrices;
  361. DWORD dwVertexProcessingCaps;
  362. DWORD dwReserved1;
  363. DWORD dwReserved2;
  364. DWORD dwReserved3;
  365. DWORD dwReserved4;
  366. } D3DDEVICEDESC7, *LPD3DDEVICEDESC7;
  367. ;end_if_(DIRECT3D_VERSION)_700
  368. #define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC)) ;public_500
  369. #define D3DDEVICEDESC7SIZE (sizeof(D3DDEVICEDESC7)) ;public_700
  370. typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK)(GUID FAR *lpGuid, LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID);
  371. ;begin_if_(DIRECT3D_VERSION)_700
  372. typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK7)(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC7, LPVOID);
  373. ;end_if_(DIRECT3D_VERSION)_700
  374. /* D3DDEVICEDESC dwFlags indicating valid fields */
  375. #define D3DDD_COLORMODEL 0x00000001L /* dcmColorModel is valid */
  376. #define D3DDD_DEVCAPS 0x00000002L /* dwDevCaps is valid */
  377. #define D3DDD_TRANSFORMCAPS 0x00000004L /* dtcTransformCaps is valid */
  378. #define D3DDD_LIGHTINGCAPS 0x00000008L /* dlcLightingCaps is valid */
  379. #define D3DDD_BCLIPPING 0x00000010L /* bClipping is valid */
  380. #define D3DDD_LINECAPS 0x00000020L /* dpcLineCaps is valid */
  381. #define D3DDD_TRICAPS 0x00000040L /* dpcTriCaps is valid */
  382. #define D3DDD_DEVICERENDERBITDEPTH 0x00000080L /* dwDeviceRenderBitDepth is valid */
  383. #define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100L /* dwDeviceZBufferBitDepth is valid */
  384. #define D3DDD_MAXBUFFERSIZE 0x00000200L /* dwMaxBufferSize is valid */
  385. #define D3DDD_MAXVERTEXCOUNT 0x00000400L /* dwMaxVertexCount is valid */
  386. /* D3DDEVICEDESC dwDevCaps flags */
  387. #define D3DDEVCAPS_FLOATTLVERTEX 0x00000001L /* Device accepts floating point */
  388. /* for post-transform vertex data */
  389. #define D3DDEVCAPS_SORTINCREASINGZ 0x00000002L /* Device needs data sorted for increasing Z */
  390. #define D3DDEVCAPS_SORTDECREASINGZ 0X00000004L /* Device needs data sorted for decreasing Z */
  391. #define D3DDEVCAPS_SORTEXACT 0x00000008L /* Device needs data sorted exactly */
  392. #define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
  393. #define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
  394. #define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
  395. #define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
  396. #define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
  397. #define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
  398. #define D3DDEVCAPS_DX3VALID 0x000003ffL /* Valid DX3 flags */ ;internal
  399. ;begin_if_(DIRECT3D_VERSION)_500
  400. #define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
  401. #define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
  402. #define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
  403. #define D3DDEVCAPS_DX5VALID 0x00001fffL /* Valid DX5 flags */ ;internal
  404. ;end_if_(DIRECT3D_VERSION)_500
  405. ;begin_if_(DIRECT3D_VERSION)_600
  406. #define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */
  407. #define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
  408. #define D3DDEVCAPS_DX6VALID 0x00007fffL /* Valid DX6 flags */ ;internal
  409. #define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
  410. ;end_if_(DIRECT3D_VERSION)_600
  411. ;begin_if_(DIRECT3D_VERSION)_700
  412. #define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
  413. #define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */
  414. #define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */
  415. #define D3DDEVCAPS_DX7VALID 0x000bffffL /* Valid DX7 flags */ ;internal
  416. /*
  417. * These are the flags in the D3DDEVICEDESC7.dwVertexProcessingCaps field
  418. */
  419. /* device can do texgen */
  420. #define D3DVTXPCAPS_TEXGEN 0x00000001L
  421. /* device can do IDirect3DDevice7 colormaterialsource ops */
  422. #define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L
  423. /* device can do vertex fog */
  424. #define D3DVTXPCAPS_VERTEXFOG 0x00000004L
  425. /* device can do directional lights */
  426. #define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L
  427. /* device can do positional lights (includes point and spot) */
  428. #define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L
  429. /* device can do local viewer */
  430. #define D3DVTXPCAPS_LOCALVIEWER 0x00000020L
  431. #if(DIRECT3D_VERSION < 0x0800) ;internal
  432. /* These are all the caps that are supported by the ;internal
  433. HAL/RGB/Reference Devices */ ;internal
  434. #define D3DVTXPCAPS_ALL (D3DVTXPCAPS_TEXGEN | \ ;internal
  435. D3DVTXPCAPS_MATERIALSOURCE7 | \ ;internal
  436. D3DVTXPCAPS_VERTEXFOG | \ ;internal
  437. D3DVTXPCAPS_DIRECTIONALLIGHTS | \ ;internal
  438. D3DVTXPCAPS_POSITIONALLIGHTS | \ ;internal
  439. D3DVTXPCAPS_LOCALVIEWER) ;internal
  440. #endif //(DIRECT3D_VERSION < 0x0800) ;internal
  441. ;end_if_(DIRECT3D_VERSION)_700
  442. #define D3DFDS_COLORMODEL 0x00000001L /* Match color model */
  443. #define D3DFDS_GUID 0x00000002L /* Match guid */
  444. #define D3DFDS_HARDWARE 0x00000004L /* Match hardware/software */
  445. #define D3DFDS_TRIANGLES 0x00000008L /* Match in triCaps */
  446. #define D3DFDS_LINES 0x00000010L /* Match in lineCaps */
  447. #define D3DFDS_MISCCAPS 0x00000020L /* Match primCaps.dwMiscCaps */
  448. #define D3DFDS_RASTERCAPS 0x00000040L /* Match primCaps.dwRasterCaps */
  449. #define D3DFDS_ZCMPCAPS 0x00000080L /* Match primCaps.dwZCmpCaps */
  450. #define D3DFDS_ALPHACMPCAPS 0x00000100L /* Match primCaps.dwAlphaCmpCaps */
  451. #define D3DFDS_SRCBLENDCAPS 0x00000200L /* Match primCaps.dwSourceBlendCaps */
  452. #define D3DFDS_DSTBLENDCAPS 0x00000400L /* Match primCaps.dwDestBlendCaps */
  453. #define D3DFDS_SHADECAPS 0x00000800L /* Match primCaps.dwShadeCaps */
  454. #define D3DFDS_TEXTURECAPS 0x00001000L /* Match primCaps.dwTextureCaps */
  455. #define D3DFDS_TEXTUREFILTERCAPS 0x00002000L /* Match primCaps.dwTextureFilterCaps */
  456. #define D3DFDS_TEXTUREBLENDCAPS 0x00004000L /* Match primCaps.dwTextureBlendCaps */
  457. #define D3DFDS_TEXTUREADDRESSCAPS 0x00008000L /* Match primCaps.dwTextureBlendCaps */
  458. /*
  459. * FindDevice arguments
  460. */
  461. typedef struct _D3DFINDDEVICESEARCH {
  462. DWORD dwSize;
  463. DWORD dwFlags;
  464. BOOL bHardware;
  465. D3DCOLORMODEL dcmColorModel;
  466. GUID guid;
  467. DWORD dwCaps;
  468. D3DPRIMCAPS dpcPrimCaps;
  469. } D3DFINDDEVICESEARCH, *LPD3DFINDDEVICESEARCH;
  470. typedef struct _D3DFINDDEVICERESULT {
  471. DWORD dwSize;
  472. GUID guid; /* guid which matched */
  473. D3DDEVICEDESC ddHwDesc; /* hardware D3DDEVICEDESC */
  474. D3DDEVICEDESC ddSwDesc; /* software D3DDEVICEDESC */
  475. } D3DFINDDEVICERESULT, *LPD3DFINDDEVICERESULT;
  476. /*
  477. * Description of execute buffer.
  478. */
  479. typedef struct _D3DExecuteBufferDesc {
  480. DWORD dwSize; /* size of this structure */
  481. DWORD dwFlags; /* flags indicating which fields are valid */
  482. DWORD dwCaps; /* capabilities of execute buffer */
  483. DWORD dwBufferSize; /* size of execute buffer data */
  484. LPVOID lpData; /* pointer to actual data */
  485. } D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC;
  486. /* D3DEXECUTEBUFFER dwFlags indicating valid fields */
  487. #define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */
  488. #define D3DDEB_CAPS 0x00000002l /* caps valid */
  489. #define D3DDEB_LPDATA 0x00000004l /* lpData valid */
  490. /* D3DEXECUTEBUFFER dwCaps */
  491. #define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */
  492. #define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */
  493. #define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY)
  494. #if(DIRECT3D_VERSION < 0x0800)
  495. ;begin_if_(DIRECT3D_VERSION)_700
  496. typedef struct _D3DDEVINFO_TEXTUREMANAGER {
  497. BOOL bThrashing; /* indicates if thrashing */
  498. DWORD dwApproxBytesDownloaded; /* Approximate number of bytes downloaded by texture manager */
  499. DWORD dwNumEvicts; /* number of textures evicted */
  500. DWORD dwNumVidCreates; /* number of textures created in video memory */
  501. DWORD dwNumTexturesUsed; /* number of textures used */
  502. DWORD dwNumUsedTexInVid; /* number of used textures present in video memory */
  503. DWORD dwWorkingSet; /* number of textures in video memory */
  504. DWORD dwWorkingSetBytes; /* number of bytes in video memory */
  505. DWORD dwTotalManaged; /* total number of managed textures */
  506. DWORD dwTotalBytes; /* total number of bytes of managed textures */
  507. DWORD dwLastPri; /* priority of last texture evicted */
  508. } D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER;
  509. typedef struct _D3DDEVINFO_TEXTURING {
  510. DWORD dwNumLoads; /* counts Load() API calls */
  511. DWORD dwApproxBytesLoaded; /* Approximate number bytes loaded via Load() */
  512. DWORD dwNumPreLoads; /* counts PreLoad() API calls */
  513. DWORD dwNumSet; /* counts SetTexture() API calls */
  514. DWORD dwNumCreates; /* counts texture creates */
  515. DWORD dwNumDestroys; /* counts texture destroys */
  516. DWORD dwNumSetPriorities; /* counts SetPriority() API calls */
  517. DWORD dwNumSetLODs; /* counts SetLOD() API calls */
  518. DWORD dwNumLocks; /* counts number of texture locks */
  519. DWORD dwNumGetDCs; /* counts number of GetDCs to textures */
  520. } D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING;
  521. ;end_if_(DIRECT3D_VERSION)_700
  522. #endif //(DIRECT3D_VERSION < 0x0800)
  523. #pragma pack()
  524. #endif /* _D3DCAPS_H_ */