Counter Strike : Global Offensive Source Code
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.

601 lines
25 KiB

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