1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! Direct3D capabilities include file
7 use ctypes::c_float;
8 use shared::d3d9types::D3DDEVTYPE;
9 use shared::guiddef::GUID;
10 use shared::minwindef::{DWORD, INT, UINT};
11 use um::winnt::ULONGLONG;
12 STRUCT!{struct D3DVSHADERCAPS2_0 {
13     Caps: DWORD,
14     DynamicFlowControlDepth: INT,
15     NumTemps: INT,
16     StaticFlowControlDepth: INT,
17 }}
18 pub const D3DVS20CAPS_PREDICATION: DWORD = 1 << 0;
19 pub const D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH: DWORD = 24;
20 pub const D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH: DWORD = 0;
21 pub const D3DVS20_MAX_NUMTEMPS: DWORD = 32;
22 pub const D3DVS20_MIN_NUMTEMPS: DWORD = 12;
23 pub const D3DVS20_MAX_STATICFLOWCONTROLDEPTH: DWORD = 4;
24 pub const D3DVS20_MIN_STATICFLOWCONTROLDEPTH: DWORD = 1;
25 STRUCT!{struct D3DPSHADERCAPS2_0 {
26     Caps: DWORD,
27     DynamicFlowControlDepth: INT,
28     NumTemps: INT,
29     StaticFlowControlDepth: INT,
30     NumInstructionSlots: INT,
31 }}
32 pub const D3DPS20CAPS_ARBITRARYSWIZZLE: DWORD = 1 << 0;
33 pub const D3DPS20CAPS_GRADIENTINSTRUCTIONS: DWORD = 1 << 1;
34 pub const D3DPS20CAPS_PREDICATION: DWORD = 1 << 2;
35 pub const D3DPS20CAPS_NODEPENDENTREADLIMIT: DWORD = 1 << 3;
36 pub const D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT: DWORD = 1 << 4;
37 pub const D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH: DWORD = 24;
38 pub const D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH: DWORD = 0;
39 pub const D3DPS20_MAX_NUMTEMPS: DWORD = 32;
40 pub const D3DPS20_MIN_NUMTEMPS: DWORD = 12;
41 pub const D3DPS20_MAX_STATICFLOWCONTROLDEPTH: DWORD = 4;
42 pub const D3DPS20_MIN_STATICFLOWCONTROLDEPTH: DWORD = 0;
43 pub const D3DPS20_MAX_NUMINSTRUCTIONSLOTS: DWORD = 512;
44 pub const D3DPS20_MIN_NUMINSTRUCTIONSLOTS: DWORD = 96;
45 pub const D3DMIN30SHADERINSTRUCTIONS: DWORD = 512;
46 pub const D3DMAX30SHADERINSTRUCTIONS: DWORD = 32768;
47 STRUCT!{struct D3DOVERLAYCAPS {
48     Caps: UINT,
49     MaxOverlayDisplayWidth: UINT,
50     MaxOverlayDisplayHeight: UINT,
51 }}
52 pub const D3DOVERLAYCAPS_FULLRANGERGB: DWORD = 0x00000001;
53 pub const D3DOVERLAYCAPS_LIMITEDRANGERGB: DWORD = 0x00000002;
54 pub const D3DOVERLAYCAPS_YCbCr_BT601: DWORD = 0x00000004;
55 pub const D3DOVERLAYCAPS_YCbCr_BT709: DWORD = 0x00000008;
56 pub const D3DOVERLAYCAPS_YCbCr_BT601_xvYCC: DWORD = 0x00000010;
57 pub const D3DOVERLAYCAPS_YCbCr_BT709_xvYCC: DWORD = 0x00000020;
58 pub const D3DOVERLAYCAPS_STRETCHX: DWORD = 0x00000040;
59 pub const D3DOVERLAYCAPS_STRETCHY: DWORD = 0x00000080;
60 // FIXME packed(4)
61 STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct D3DCONTENTPROTECTIONCAPS {
62     Caps: DWORD,
63     KeyExchangeType: GUID,
64     BufferAlignmentStart: UINT,
65     BlockAlignmentSize: UINT,
66     ProtectedMemorySize: ULONGLONG,
67 }}
68 pub const D3DCPCAPS_SOFTWARE: DWORD = 0x00000001;
69 pub const D3DCPCAPS_HARDWARE: DWORD = 0x00000002;
70 pub const D3DCPCAPS_PROTECTIONALWAYSON: DWORD = 0x00000004;
71 pub const D3DCPCAPS_PARTIALDECRYPTION: DWORD = 0x00000008;
72 pub const D3DCPCAPS_CONTENTKEY: DWORD = 0x00000010;
73 pub const D3DCPCAPS_FRESHENSESSIONKEY: DWORD = 0x00000020;
74 pub const D3DCPCAPS_ENCRYPTEDREADBACK: DWORD = 0x00000040;
75 pub const D3DCPCAPS_ENCRYPTEDREADBACKKEY: DWORD = 0x00000080;
76 pub const D3DCPCAPS_SEQUENTIAL_CTR_IV: DWORD = 0x00000100;
77 pub const D3DCPCAPS_ENCRYPTSLICEDATAONLY: DWORD = 0x00000200;
78 DEFINE_GUID!{D3DCRYPTOTYPE_AES128_CTR,
79     0x9b6bd711, 0x4f74, 0x41c9, 0x9e, 0x7b, 0x0b, 0xe2, 0xd7, 0xd9, 0x3b, 0x4f}
80 DEFINE_GUID!{D3DCRYPTOTYPE_PROPRIETARY,
81     0xab4e9afd, 0x1d1c, 0x46e6, 0xa7, 0x2f, 0x08, 0x69, 0x91, 0x7b, 0x0d, 0xe8}
82 DEFINE_GUID!{D3DKEYEXCHANGE_RSAES_OAEP,
83     0xc1949895, 0xd72a, 0x4a1d, 0x8e, 0x5d, 0xed, 0x85, 0x7d, 0x17, 0x15, 0x20}
84 DEFINE_GUID!{D3DKEYEXCHANGE_DXVA,
85     0x43d3775c, 0x38e5, 0x4924, 0x8d, 0x86, 0xd3, 0xfc, 0xcf, 0x15, 0x3e, 0x9b}
86 STRUCT!{struct D3DCAPS9 {
87     DeviceType: D3DDEVTYPE,
88     AdapterOrdinal: UINT,
89     Caps: DWORD,
90     Caps2: DWORD,
91     Caps3: DWORD,
92     PresentationIntervals: DWORD,
93     CursorCaps: DWORD,
94     DevCaps: DWORD,
95     PrimitiveMiscCaps: DWORD,
96     RasterCaps: DWORD,
97     ZCmpCaps: DWORD,
98     SrcBlendCaps: DWORD,
99     DestBlendCaps: DWORD,
100     AlphaCmpCaps: DWORD,
101     ShadeCaps: DWORD,
102     TextureCaps: DWORD,
103     TextureFilterCaps: DWORD,
104     CubeTextureFilterCaps: DWORD,
105     VolumeTextureFilterCaps: DWORD,
106     TextureAddressCaps: DWORD,
107     VolumeTextureAddressCaps: DWORD,
108     LineCaps: DWORD,
109     MaxTextureWidth: DWORD,
110     MaxTextureHeight: DWORD,
111     MaxVolumeExtent: DWORD,
112     MaxTextureRepeat: DWORD,
113     MaxTextureAspectRatio: DWORD,
114     MaxAnisotropy: DWORD,
115     MaxVertexW: c_float,
116     GuardBandLeft: c_float,
117     GuardBandTop: c_float,
118     GuardBandRight: c_float,
119     GuardBandBottom: c_float,
120     ExtentsAdjust: c_float,
121     StencilCaps: DWORD,
122     FVFCaps: DWORD,
123     TextureOpCaps: DWORD,
124     MaxTextureBlendStages: DWORD,
125     MaxSimultaneousTextures: DWORD,
126     VertexProcessingCaps: DWORD,
127     MaxActiveLights: DWORD,
128     MaxUserClipPlanes: DWORD,
129     MaxVertexBlendMatrices: DWORD,
130     MaxVertexBlendMatrixIndex: DWORD,
131     MaxPointSize: c_float,
132     MaxPrimitiveCount: DWORD,
133     MaxVertexIndex: DWORD,
134     MaxStreams: DWORD,
135     MaxStreamStride: DWORD,
136     VertexShaderVersion: DWORD,
137     MaxVertexShaderConst: DWORD,
138     PixelShaderVersion: DWORD,
139     PixelShader1xMaxValue: c_float,
140     DevCaps2: DWORD,
141     MaxNpatchTessellationLevel: c_float,
142     Reserved5: DWORD,
143     MasterAdapterOrdinal: UINT,
144     AdapterOrdinalInGroup: UINT,
145     NumberOfAdaptersInGroup: UINT,
146     DeclTypes: DWORD,
147     NumSimultaneousRTs: DWORD,
148     StretchRectFilterCaps: DWORD,
149     VS20Caps: D3DVSHADERCAPS2_0,
150     PS20Caps: D3DPSHADERCAPS2_0,
151     VertexTextureFilterCaps: DWORD,
152     MaxVShaderInstructionsExecuted: DWORD,
153     MaxPShaderInstructionsExecuted: DWORD,
154     MaxVertexShader30InstructionSlots: DWORD,
155     MaxPixelShader30InstructionSlots: DWORD,
156 }}
157 pub const D3DCAPS_OVERLAY: DWORD = 0x00000800;
158 pub const D3DCAPS_READ_SCANLINE: DWORD = 0x00020000;
159 pub const D3DCAPS2_FULLSCREENGAMMA: DWORD = 0x00020000;
160 pub const D3DCAPS2_CANCALIBRATEGAMMA: DWORD = 0x00100000;
161 pub const D3DCAPS2_RESERVED: DWORD = 0x02000000;
162 pub const D3DCAPS2_CANMANAGERESOURCE: DWORD = 0x10000000;
163 pub const D3DCAPS2_DYNAMICTEXTURES: DWORD = 0x20000000;
164 pub const D3DCAPS2_CANAUTOGENMIPMAP: DWORD = 0x40000000;
165 pub const D3DCAPS2_CANSHARERESOURCE: DWORD = 0x80000000;
166 pub const D3DCAPS3_RESERVED: DWORD = 0x8000001f;
167 pub const D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD: DWORD = 0x00000020;
168 pub const D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION: DWORD = 0x00000080;
169 pub const D3DCAPS3_COPY_TO_VIDMEM: DWORD = 0x00000100;
170 pub const D3DCAPS3_COPY_TO_SYSTEMMEM: DWORD = 0x00000200;
171 pub const D3DCAPS3_DXVAHD: DWORD = 0x00000400;
172 pub const D3DCAPS3_DXVAHD_LIMITED: DWORD = 0x00000800;
173 pub const D3DPRESENT_INTERVAL_DEFAULT: DWORD = 0x00000000;
174 pub const D3DPRESENT_INTERVAL_ONE: DWORD = 0x00000001;
175 pub const D3DPRESENT_INTERVAL_TWO: DWORD = 0x00000002;
176 pub const D3DPRESENT_INTERVAL_THREE: DWORD = 0x00000004;
177 pub const D3DPRESENT_INTERVAL_FOUR: DWORD = 0x00000008;
178 pub const D3DPRESENT_INTERVAL_IMMEDIATE: DWORD = 0x80000000;
179 pub const D3DCURSORCAPS_COLOR: DWORD = 0x00000001;
180 pub const D3DCURSORCAPS_LOWRES: DWORD = 0x00000002;
181 pub const D3DDEVCAPS_EXECUTESYSTEMMEMORY: DWORD = 0x00000010;
182 pub const D3DDEVCAPS_EXECUTEVIDEOMEMORY: DWORD = 0x00000020;
183 pub const D3DDEVCAPS_TLVERTEXSYSTEMMEMORY: DWORD = 0x00000040;
184 pub const D3DDEVCAPS_TLVERTEXVIDEOMEMORY: DWORD = 0x00000080;
185 pub const D3DDEVCAPS_TEXTURESYSTEMMEMORY: DWORD = 0x00000100;
186 pub const D3DDEVCAPS_TEXTUREVIDEOMEMORY: DWORD = 0x00000200;
187 pub const D3DDEVCAPS_DRAWPRIMTLVERTEX: DWORD = 0x00000400;
188 pub const D3DDEVCAPS_CANRENDERAFTERFLIP: DWORD = 0x00000800;
189 pub const D3DDEVCAPS_TEXTURENONLOCALVIDMEM: DWORD = 0x00001000;
190 pub const D3DDEVCAPS_DRAWPRIMITIVES2: DWORD = 0x00002000;
191 pub const D3DDEVCAPS_SEPARATETEXTUREMEMORIES: DWORD = 0x00004000;
192 pub const D3DDEVCAPS_DRAWPRIMITIVES2EX: DWORD = 0x00008000;
193 pub const D3DDEVCAPS_HWTRANSFORMANDLIGHT: DWORD = 0x00010000;
194 pub const D3DDEVCAPS_CANBLTSYSTONONLOCAL: DWORD = 0x00020000;
195 pub const D3DDEVCAPS_HWRASTERIZATION: DWORD = 0x00080000;
196 pub const D3DDEVCAPS_PUREDEVICE: DWORD = 0x00100000;
197 pub const D3DDEVCAPS_QUINTICRTPATCHES: DWORD = 0x00200000;
198 pub const D3DDEVCAPS_RTPATCHES: DWORD = 0x00400000;
199 pub const D3DDEVCAPS_RTPATCHHANDLEZERO: DWORD = 0x00800000;
200 pub const D3DDEVCAPS_NPATCHES: DWORD = 0x01000000;
201 pub const D3DPMISCCAPS_MASKZ: DWORD = 0x00000002;
202 pub const D3DPMISCCAPS_CULLNONE: DWORD = 0x00000010;
203 pub const D3DPMISCCAPS_CULLCW: DWORD = 0x00000020;
204 pub const D3DPMISCCAPS_CULLCCW: DWORD = 0x00000040;
205 pub const D3DPMISCCAPS_COLORWRITEENABLE: DWORD = 0x00000080;
206 pub const D3DPMISCCAPS_CLIPPLANESCALEDPOINTS: DWORD = 0x00000100;
207 pub const D3DPMISCCAPS_CLIPTLVERTS: DWORD = 0x00000200;
208 pub const D3DPMISCCAPS_TSSARGTEMP: DWORD = 0x00000400;
209 pub const D3DPMISCCAPS_BLENDOP: DWORD = 0x00000800;
210 pub const D3DPMISCCAPS_NULLREFERENCE: DWORD = 0x00001000;
211 pub const D3DPMISCCAPS_INDEPENDENTWRITEMASKS: DWORD = 0x00004000;
212 pub const D3DPMISCCAPS_PERSTAGECONSTANT: DWORD = 0x00008000;
213 pub const D3DPMISCCAPS_FOGANDSPECULARALPHA: DWORD = 0x00010000;
214 pub const D3DPMISCCAPS_SEPARATEALPHABLEND: DWORD = 0x00020000;
215 pub const D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS: DWORD = 0x00040000;
216 pub const D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING: DWORD = 0x00080000;
217 pub const D3DPMISCCAPS_FOGVERTEXCLAMPED: DWORD = 0x00100000;
218 pub const D3DPMISCCAPS_POSTBLENDSRGBCONVERT: DWORD = 0x00200000;
219 pub const D3DLINECAPS_TEXTURE: DWORD = 0x00000001;
220 pub const D3DLINECAPS_ZTEST: DWORD = 0x00000002;
221 pub const D3DLINECAPS_BLEND: DWORD = 0x00000004;
222 pub const D3DLINECAPS_ALPHACMP: DWORD = 0x00000008;
223 pub const D3DLINECAPS_FOG: DWORD = 0x00000010;
224 pub const D3DLINECAPS_ANTIALIAS: DWORD = 0x00000020;
225 pub const D3DPRASTERCAPS_DITHER: DWORD = 0x00000001;
226 pub const D3DPRASTERCAPS_ZTEST: DWORD = 0x00000010;
227 pub const D3DPRASTERCAPS_FOGVERTEX: DWORD = 0x00000080;
228 pub const D3DPRASTERCAPS_FOGTABLE: DWORD = 0x00000100;
229 pub const D3DPRASTERCAPS_MIPMAPLODBIAS: DWORD = 0x00002000;
230 pub const D3DPRASTERCAPS_ZBUFFERLESSHSR: DWORD = 0x00008000;
231 pub const D3DPRASTERCAPS_FOGRANGE: DWORD = 0x00010000;
232 pub const D3DPRASTERCAPS_ANISOTROPY: DWORD = 0x00020000;
233 pub const D3DPRASTERCAPS_WBUFFER: DWORD = 0x00040000;
234 pub const D3DPRASTERCAPS_WFOG: DWORD = 0x00100000;
235 pub const D3DPRASTERCAPS_ZFOG: DWORD = 0x00200000;
236 pub const D3DPRASTERCAPS_COLORPERSPECTIVE: DWORD = 0x00400000;
237 pub const D3DPRASTERCAPS_SCISSORTEST: DWORD = 0x01000000;
238 pub const D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS: DWORD = 0x02000000;
239 pub const D3DPRASTERCAPS_DEPTHBIAS: DWORD = 0x04000000;
240 pub const D3DPRASTERCAPS_MULTISAMPLE_TOGGLE: DWORD = 0x08000000;
241 pub const D3DPCMPCAPS_NEVER: DWORD = 0x00000001;
242 pub const D3DPCMPCAPS_LESS: DWORD = 0x00000002;
243 pub const D3DPCMPCAPS_EQUAL: DWORD = 0x00000004;
244 pub const D3DPCMPCAPS_LESSEQUAL: DWORD = 0x00000008;
245 pub const D3DPCMPCAPS_GREATER: DWORD = 0x00000010;
246 pub const D3DPCMPCAPS_NOTEQUAL: DWORD = 0x00000020;
247 pub const D3DPCMPCAPS_GREATEREQUAL: DWORD = 0x00000040;
248 pub const D3DPCMPCAPS_ALWAYS: DWORD = 0x00000080;
249 pub const D3DPBLENDCAPS_ZERO: DWORD = 0x00000001;
250 pub const D3DPBLENDCAPS_ONE: DWORD = 0x00000002;
251 pub const D3DPBLENDCAPS_SRCCOLOR: DWORD = 0x00000004;
252 pub const D3DPBLENDCAPS_INVSRCCOLOR: DWORD = 0x00000008;
253 pub const D3DPBLENDCAPS_SRCALPHA: DWORD = 0x00000010;
254 pub const D3DPBLENDCAPS_INVSRCALPHA: DWORD = 0x00000020;
255 pub const D3DPBLENDCAPS_DESTALPHA: DWORD = 0x00000040;
256 pub const D3DPBLENDCAPS_INVDESTALPHA: DWORD = 0x00000080;
257 pub const D3DPBLENDCAPS_DESTCOLOR: DWORD = 0x00000100;
258 pub const D3DPBLENDCAPS_INVDESTCOLOR: DWORD = 0x00000200;
259 pub const D3DPBLENDCAPS_SRCALPHASAT: DWORD = 0x00000400;
260 pub const D3DPBLENDCAPS_BOTHSRCALPHA: DWORD = 0x00000800;
261 pub const D3DPBLENDCAPS_BOTHINVSRCALPHA: DWORD = 0x00001000;
262 pub const D3DPBLENDCAPS_BLENDFACTOR: DWORD = 0x00002000;
263 pub const D3DPBLENDCAPS_SRCCOLOR2: DWORD = 0x00004000;
264 pub const D3DPBLENDCAPS_INVSRCCOLOR2: DWORD = 0x00008000;
265 pub const D3DPSHADECAPS_COLORGOURAUDRGB: DWORD = 0x00000008;
266 pub const D3DPSHADECAPS_SPECULARGOURAUDRGB: DWORD = 0x00000200;
267 pub const D3DPSHADECAPS_ALPHAGOURAUDBLEND: DWORD = 0x00004000;
268 pub const D3DPSHADECAPS_FOGGOURAUD: DWORD = 0x00080000;
269 pub const D3DPTEXTURECAPS_PERSPECTIVE: DWORD = 0x00000001;
270 pub const D3DPTEXTURECAPS_POW2: DWORD = 0x00000002;
271 pub const D3DPTEXTURECAPS_ALPHA: DWORD = 0x00000004;
272 pub const D3DPTEXTURECAPS_SQUAREONLY: DWORD = 0x00000020;
273 pub const D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE: DWORD = 0x00000040;
274 pub const D3DPTEXTURECAPS_ALPHAPALETTE: DWORD = 0x00000080;
275 pub const D3DPTEXTURECAPS_NONPOW2CONDITIONAL: DWORD = 0x00000100;
276 pub const D3DPTEXTURECAPS_PROJECTED: DWORD = 0x00000400;
277 pub const D3DPTEXTURECAPS_CUBEMAP: DWORD = 0x00000800;
278 pub const D3DPTEXTURECAPS_VOLUMEMAP: DWORD = 0x00002000;
279 pub const D3DPTEXTURECAPS_MIPMAP: DWORD = 0x00004000;
280 pub const D3DPTEXTURECAPS_MIPVOLUMEMAP: DWORD = 0x00008000;
281 pub const D3DPTEXTURECAPS_MIPCUBEMAP: DWORD = 0x00010000;
282 pub const D3DPTEXTURECAPS_CUBEMAP_POW2: DWORD = 0x00020000;
283 pub const D3DPTEXTURECAPS_VOLUMEMAP_POW2: DWORD = 0x00040000;
284 pub const D3DPTEXTURECAPS_NOPROJECTEDBUMPENV: DWORD = 0x00200000;
285 pub const D3DPTFILTERCAPS_MINFPOINT: DWORD = 0x00000100;
286 pub const D3DPTFILTERCAPS_MINFLINEAR: DWORD = 0x00000200;
287 pub const D3DPTFILTERCAPS_MINFANISOTROPIC: DWORD = 0x00000400;
288 pub const D3DPTFILTERCAPS_MINFPYRAMIDALQUAD: DWORD = 0x00000800;
289 pub const D3DPTFILTERCAPS_MINFGAUSSIANQUAD: DWORD = 0x00001000;
290 pub const D3DPTFILTERCAPS_MIPFPOINT: DWORD = 0x00010000;
291 pub const D3DPTFILTERCAPS_MIPFLINEAR: DWORD = 0x00020000;
292 pub const D3DPTFILTERCAPS_CONVOLUTIONMONO: DWORD = 0x00040000;
293 pub const D3DPTFILTERCAPS_MAGFPOINT: DWORD = 0x01000000;
294 pub const D3DPTFILTERCAPS_MAGFLINEAR: DWORD = 0x02000000;
295 pub const D3DPTFILTERCAPS_MAGFANISOTROPIC: DWORD = 0x04000000;
296 pub const D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD: DWORD = 0x08000000;
297 pub const D3DPTFILTERCAPS_MAGFGAUSSIANQUAD: DWORD = 0x10000000;
298 pub const D3DPTADDRESSCAPS_WRAP: DWORD = 0x00000001;
299 pub const D3DPTADDRESSCAPS_MIRROR: DWORD = 0x00000002;
300 pub const D3DPTADDRESSCAPS_CLAMP: DWORD = 0x00000004;
301 pub const D3DPTADDRESSCAPS_BORDER: DWORD = 0x00000008;
302 pub const D3DPTADDRESSCAPS_INDEPENDENTUV: DWORD = 0x00000010;
303 pub const D3DPTADDRESSCAPS_MIRRORONCE: DWORD = 0x00000020;
304 pub const D3DSTENCILCAPS_KEEP: DWORD = 0x00000001;
305 pub const D3DSTENCILCAPS_ZERO: DWORD = 0x00000002;
306 pub const D3DSTENCILCAPS_REPLACE: DWORD = 0x00000004;
307 pub const D3DSTENCILCAPS_INCRSAT: DWORD = 0x00000008;
308 pub const D3DSTENCILCAPS_DECRSAT: DWORD = 0x00000010;
309 pub const D3DSTENCILCAPS_INVERT: DWORD = 0x00000020;
310 pub const D3DSTENCILCAPS_INCR: DWORD = 0x00000040;
311 pub const D3DSTENCILCAPS_DECR: DWORD = 0x00000080;
312 pub const D3DSTENCILCAPS_TWOSIDED: DWORD = 0x00000100;
313 pub const D3DTEXOPCAPS_DISABLE: DWORD = 0x00000001;
314 pub const D3DTEXOPCAPS_SELECTARG1: DWORD = 0x00000002;
315 pub const D3DTEXOPCAPS_SELECTARG2: DWORD = 0x00000004;
316 pub const D3DTEXOPCAPS_MODULATE: DWORD = 0x00000008;
317 pub const D3DTEXOPCAPS_MODULATE2X: DWORD = 0x00000010;
318 pub const D3DTEXOPCAPS_MODULATE4X: DWORD = 0x00000020;
319 pub const D3DTEXOPCAPS_ADD: DWORD = 0x00000040;
320 pub const D3DTEXOPCAPS_ADDSIGNED: DWORD = 0x00000080;
321 pub const D3DTEXOPCAPS_ADDSIGNED2X: DWORD = 0x00000100;
322 pub const D3DTEXOPCAPS_SUBTRACT: DWORD = 0x00000200;
323 pub const D3DTEXOPCAPS_ADDSMOOTH: DWORD = 0x00000400;
324 pub const D3DTEXOPCAPS_BLENDDIFFUSEALPHA: DWORD = 0x00000800;
325 pub const D3DTEXOPCAPS_BLENDTEXTUREALPHA: DWORD = 0x00001000;
326 pub const D3DTEXOPCAPS_BLENDFACTORALPHA: DWORD = 0x00002000;
327 pub const D3DTEXOPCAPS_BLENDTEXTUREALPHAPM: DWORD = 0x00004000;
328 pub const D3DTEXOPCAPS_BLENDCURRENTALPHA: DWORD = 0x00008000;
329 pub const D3DTEXOPCAPS_PREMODULATE: DWORD = 0x00010000;
330 pub const D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR: DWORD = 0x00020000;
331 pub const D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA: DWORD = 0x00040000;
332 pub const D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR: DWORD = 0x00080000;
333 pub const D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA: DWORD = 0x00100000;
334 pub const D3DTEXOPCAPS_BUMPENVMAP: DWORD = 0x00200000;
335 pub const D3DTEXOPCAPS_BUMPENVMAPLUMINANCE: DWORD = 0x00400000;
336 pub const D3DTEXOPCAPS_DOTPRODUCT3: DWORD = 0x00800000;
337 pub const D3DTEXOPCAPS_MULTIPLYADD: DWORD = 0x01000000;
338 pub const D3DTEXOPCAPS_LERP: DWORD = 0x02000000;
339 pub const D3DFVFCAPS_TEXCOORDCOUNTMASK: DWORD = 0x0000ffff;
340 pub const D3DFVFCAPS_DONOTSTRIPELEMENTS: DWORD = 0x00080000;
341 pub const D3DFVFCAPS_PSIZE: DWORD = 0x00100000;
342 pub const D3DVTXPCAPS_TEXGEN: DWORD = 0x00000001;
343 pub const D3DVTXPCAPS_MATERIALSOURCE7: DWORD = 0x00000002;
344 pub const D3DVTXPCAPS_DIRECTIONALLIGHTS: DWORD = 0x00000008;
345 pub const D3DVTXPCAPS_POSITIONALLIGHTS: DWORD = 0x00000010;
346 pub const D3DVTXPCAPS_LOCALVIEWER: DWORD = 0x00000020;
347 pub const D3DVTXPCAPS_TWEENING: DWORD = 0x00000040;
348 pub const D3DVTXPCAPS_TEXGEN_SPHEREMAP: DWORD = 0x00000100;
349 pub const D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER: DWORD = 0x00000200;
350 pub const D3DDEVCAPS2_STREAMOFFSET: DWORD = 0x00000001;
351 pub const D3DDEVCAPS2_DMAPNPATCH: DWORD = 0x00000002;
352 pub const D3DDEVCAPS2_ADAPTIVETESSRTPATCH: DWORD = 0x00000004;
353 pub const D3DDEVCAPS2_ADAPTIVETESSNPATCH: DWORD = 0x00000008;
354 pub const D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES: DWORD = 0x00000010;
355 pub const D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH: DWORD = 0x00000020;
356 pub const D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET: DWORD = 0x00000040;
357 pub const D3DDTCAPS_UBYTE4: DWORD = 0x00000001;
358 pub const D3DDTCAPS_UBYTE4N: DWORD = 0x00000002;
359 pub const D3DDTCAPS_SHORT2N: DWORD = 0x00000004;
360 pub const D3DDTCAPS_SHORT4N: DWORD = 0x00000008;
361 pub const D3DDTCAPS_USHORT2N: DWORD = 0x00000010;
362 pub const D3DDTCAPS_USHORT4N: DWORD = 0x00000020;
363 pub const D3DDTCAPS_UDEC3: DWORD = 0x00000040;
364 pub const D3DDTCAPS_DEC3N: DWORD = 0x00000080;
365 pub const D3DDTCAPS_FLOAT16_2: DWORD = 0x00000100;
366 pub const D3DDTCAPS_FLOAT16_4: DWORD = 0x00000200;
367