zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
d3d9types.h
Go to the documentation of this file.
1 /*==========================================================================;
2  *
3  * Copyright (C) Microsoft Corporation. All Rights Reserved.
4  *
5  * File: d3d9types.h
6  * Content: Direct3D capabilities include file
7  *
8  ***************************************************************************/
9 
10 #ifndef _d3d9TYPES_H_
11 #define _d3d9TYPES_H_
12 
13 #ifndef DIRECT3D_VERSION
14 #define DIRECT3D_VERSION 0x0900
15 #endif //DIRECT3D_VERSION
16 
17 // include this file content only if compiling for DX9 interfaces
18 #if(DIRECT3D_VERSION >= 0x0900)
19 
20 #include <float.h>
21 
22 #if _MSC_VER >= 1200
23 #pragma warning(push)
24 #endif
25 #pragma warning(disable:4201) // anonymous unions warning
26 #if defined(_X86_) || defined(_IA64_)
27 #pragma pack(4)
28 #endif
29 
30 // D3DCOLOR is equivalent to D3DFMT_A8R8G8B8
31 #ifndef D3DCOLOR_DEFINED
32 typedef DWORD D3DCOLOR;
33 #define D3DCOLOR_DEFINED
34 #endif
35 
36 // maps unsigned 8 bits/channel to D3DCOLOR
37 #define D3DCOLOR_ARGB(a,r,g,b) \
38  ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
39 #define D3DCOLOR_RGBA(r,g,b,a) D3DCOLOR_ARGB(a,r,g,b)
40 #define D3DCOLOR_XRGB(r,g,b) D3DCOLOR_ARGB(0xff,r,g,b)
41 
42 #define D3DCOLOR_XYUV(y,u,v) D3DCOLOR_ARGB(0xff,y,u,v)
43 #define D3DCOLOR_AYUV(a,y,u,v) D3DCOLOR_ARGB(a,y,u,v)
44 
45 // maps floating point channels (0.f to 1.f range) to D3DCOLOR
46 #define D3DCOLOR_COLORVALUE(r,g,b,a) \
47  D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f))
48 
49 
50 #ifndef D3DVECTOR_DEFINED
51 typedef struct _D3DVECTOR {
52  float x;
53  float y;
54  float z;
55 } D3DVECTOR;
56 #define D3DVECTOR_DEFINED
57 #endif
58 
59 #ifndef D3DCOLORVALUE_DEFINED
60 typedef struct _D3DCOLORVALUE {
61  float r;
62  float g;
63  float b;
64  float a;
66 #define D3DCOLORVALUE_DEFINED
67 #endif
68 
69 #ifndef D3DRECT_DEFINED
70 typedef struct _D3DRECT {
71  LONG x1;
72  LONG y1;
73  LONG x2;
74  LONG y2;
75 } D3DRECT;
76 #define D3DRECT_DEFINED
77 #endif
78 
79 #ifndef D3DMATRIX_DEFINED
80 typedef struct _D3DMATRIX {
81  union {
82  struct {
83  float _11, _12, _13, _14;
84  float _21, _22, _23, _24;
85  float _31, _32, _33, _34;
86  float _41, _42, _43, _44;
87 
88  };
89  float m[4][4];
90  };
91 } D3DMATRIX;
92 #define D3DMATRIX_DEFINED
93 #endif
94 
95 typedef struct _D3DVIEWPORT9 {
97  DWORD Y; /* Viewport Top left */
99  DWORD Height; /* Viewport Dimensions */
100  float MinZ; /* Min/max of clip Volume */
101  float MaxZ;
102 } D3DVIEWPORT9;
103 
104 /*
105  * Values for clip fields.
106  */
107 
108 // Max number of user clipping planes, supported in D3D.
109 #define D3DMAXUSERCLIPPLANES 32
110 
111 // These bits could be ORed together to use with D3DRS_CLIPPLANEENABLE
112 //
113 #define D3DCLIPPLANE0 (1 << 0)
114 #define D3DCLIPPLANE1 (1 << 1)
115 #define D3DCLIPPLANE2 (1 << 2)
116 #define D3DCLIPPLANE3 (1 << 3)
117 #define D3DCLIPPLANE4 (1 << 4)
118 #define D3DCLIPPLANE5 (1 << 5)
119 
120 // The following bits are used in the ClipUnion and ClipIntersection
121 // members of the D3DCLIPSTATUS9
122 //
123 
124 #define D3DCS_LEFT 0x00000001L
125 #define D3DCS_RIGHT 0x00000002L
126 #define D3DCS_TOP 0x00000004L
127 #define D3DCS_BOTTOM 0x00000008L
128 #define D3DCS_FRONT 0x00000010L
129 #define D3DCS_BACK 0x00000020L
130 #define D3DCS_PLANE0 0x00000040L
131 #define D3DCS_PLANE1 0x00000080L
132 #define D3DCS_PLANE2 0x00000100L
133 #define D3DCS_PLANE3 0x00000200L
134 #define D3DCS_PLANE4 0x00000400L
135 #define D3DCS_PLANE5 0x00000800L
136 
137 #define D3DCS_ALL (D3DCS_LEFT | \
138  D3DCS_RIGHT | \
139  D3DCS_TOP | \
140  D3DCS_BOTTOM | \
141  D3DCS_FRONT | \
142  D3DCS_BACK | \
143  D3DCS_PLANE0 | \
144  D3DCS_PLANE1 | \
145  D3DCS_PLANE2 | \
146  D3DCS_PLANE3 | \
147  D3DCS_PLANE4 | \
148  D3DCS_PLANE5)
149 
150 typedef struct _D3DCLIPSTATUS9 {
154 
155 typedef struct _D3DMATERIAL9 {
156  D3DCOLORVALUE Diffuse; /* Diffuse color RGBA */
157  D3DCOLORVALUE Ambient; /* Ambient color RGB */
158  D3DCOLORVALUE Specular; /* Specular 'shininess' */
159  D3DCOLORVALUE Emissive; /* Emissive color RGB */
160  float Power; /* Sharpness if specular highlight */
161 } D3DMATERIAL9;
162 
163 typedef enum _D3DLIGHTTYPE {
167  D3DLIGHT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
168 } D3DLIGHTTYPE;
169 
170 typedef struct _D3DLIGHT9 {
171  D3DLIGHTTYPE Type; /* Type of light source */
172  D3DCOLORVALUE Diffuse; /* Diffuse color of light */
173  D3DCOLORVALUE Specular; /* Specular color of light */
174  D3DCOLORVALUE Ambient; /* Ambient color of light */
175  D3DVECTOR Position; /* Position in world space */
176  D3DVECTOR Direction; /* Direction in world space */
177  float Range; /* Cutoff range */
178  float Falloff; /* Falloff */
179  float Attenuation0; /* Constant attenuation */
180  float Attenuation1; /* Linear attenuation */
181  float Attenuation2; /* Quadratic attenuation */
182  float Theta; /* Inner angle of spotlight cone */
183  float Phi; /* Outer angle of spotlight cone */
184 } D3DLIGHT9;
185 
186 /*
187  * Options for clearing
188  */
189 #define D3DCLEAR_TARGET 0x00000001l /* Clear target surface */
190 #define D3DCLEAR_ZBUFFER 0x00000002l /* Clear target z buffer */
191 #define D3DCLEAR_STENCIL 0x00000004l /* Clear stencil planes */
192 
193 /*
194  * The following defines the rendering states
195  */
196 
197 typedef enum _D3DSHADEMODE {
201  D3DSHADE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
202 } D3DSHADEMODE;
203 
204 typedef enum _D3DFILLMODE {
208  D3DFILL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
209 } D3DFILLMODE;
210 
211 typedef enum _D3DBLEND {
225  D3DBLEND_BLENDFACTOR = 14, /* Only supported if D3DPBLENDCAPS_BLENDFACTOR is on */
226  D3DBLEND_INVBLENDFACTOR = 15, /* Only supported if D3DPBLENDCAPS_BLENDFACTOR is on */
227 /* D3D9Ex only -- */
228 #if !defined(D3D_DISABLE_9EX)
229 
232 
233 #endif // !D3D_DISABLE_9EX
234 /* -- D3D9Ex only */
235  D3DBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
236 } D3DBLEND;
237 
238 typedef enum _D3DBLENDOP {
244  D3DBLENDOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
245 } D3DBLENDOP;
246 
247 typedef enum _D3DTEXTUREADDRESS {
253  D3DTADDRESS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
255 
256 typedef enum _D3DCULL {
260  D3DCULL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
261 } D3DCULL;
262 
263 typedef enum _D3DCMPFUNC {
272  D3DCMP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
273 } D3DCMPFUNC;
274 
275 typedef enum _D3DSTENCILOP {
284  D3DSTENCILOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
285 } D3DSTENCILOP;
286 
287 typedef enum _D3DFOGMODE {
292  D3DFOG_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
293 } D3DFOGMODE;
294 
295 typedef enum _D3DZBUFFERTYPE {
297  D3DZB_TRUE = 1, // Z buffering
298  D3DZB_USEW = 2, // W buffering
299  D3DZB_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
301 
302 // Primitives supported by draw-primitive API
303 typedef enum _D3DPRIMITIVETYPE {
310  D3DPT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
312 
324  D3DTS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
326 
327 #define D3DTS_WORLDMATRIX(index) (D3DTRANSFORMSTATETYPE)(index + 256)
328 #define D3DTS_WORLD D3DTS_WORLDMATRIX(0)
329 #define D3DTS_WORLD1 D3DTS_WORLDMATRIX(1)
330 #define D3DTS_WORLD2 D3DTS_WORLDMATRIX(2)
331 #define D3DTS_WORLD3 D3DTS_WORLDMATRIX(3)
332 
333 typedef enum _D3DRENDERSTATETYPE {
334  D3DRS_ZENABLE = 7, /* D3DZBUFFERTYPE (or TRUE/FALSE for legacy) */
335  D3DRS_FILLMODE = 8, /* D3DFILLMODE */
336  D3DRS_SHADEMODE = 9, /* D3DSHADEMODE */
337  D3DRS_ZWRITEENABLE = 14, /* TRUE to enable z writes */
338  D3DRS_ALPHATESTENABLE = 15, /* TRUE to enable alpha tests */
339  D3DRS_LASTPIXEL = 16, /* TRUE for last-pixel on lines */
340  D3DRS_SRCBLEND = 19, /* D3DBLEND */
341  D3DRS_DESTBLEND = 20, /* D3DBLEND */
342  D3DRS_CULLMODE = 22, /* D3DCULL */
343  D3DRS_ZFUNC = 23, /* D3DCMPFUNC */
344  D3DRS_ALPHAREF = 24, /* D3DFIXED */
345  D3DRS_ALPHAFUNC = 25, /* D3DCMPFUNC */
346  D3DRS_DITHERENABLE = 26, /* TRUE to enable dithering */
347  D3DRS_ALPHABLENDENABLE = 27, /* TRUE to enable alpha blending */
348  D3DRS_FOGENABLE = 28, /* TRUE to enable fog blending */
349  D3DRS_SPECULARENABLE = 29, /* TRUE to enable specular */
350  D3DRS_FOGCOLOR = 34, /* D3DCOLOR */
351  D3DRS_FOGTABLEMODE = 35, /* D3DFOGMODE */
352  D3DRS_FOGSTART = 36, /* Fog start (for both vertex and pixel fog) */
353  D3DRS_FOGEND = 37, /* Fog end */
354  D3DRS_FOGDENSITY = 38, /* Fog density */
355  D3DRS_RANGEFOGENABLE = 48, /* Enables range-based fog */
356  D3DRS_STENCILENABLE = 52, /* BOOL enable/disable stenciling */
357  D3DRS_STENCILFAIL = 53, /* D3DSTENCILOP to do if stencil test fails */
358  D3DRS_STENCILZFAIL = 54, /* D3DSTENCILOP to do if stencil test passes and Z test fails */
359  D3DRS_STENCILPASS = 55, /* D3DSTENCILOP to do if both stencil and Z tests pass */
360  D3DRS_STENCILFUNC = 56, /* D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true */
361  D3DRS_STENCILREF = 57, /* Reference value used in stencil test */
362  D3DRS_STENCILMASK = 58, /* Mask value used in stencil test */
363  D3DRS_STENCILWRITEMASK = 59, /* Write mask applied to values written to stencil buffer */
364  D3DRS_TEXTUREFACTOR = 60, /* D3DCOLOR used for multi-texture blend */
365  D3DRS_WRAP0 = 128, /* wrap for 1st texture coord. set */
366  D3DRS_WRAP1 = 129, /* wrap for 2nd texture coord. set */
367  D3DRS_WRAP2 = 130, /* wrap for 3rd texture coord. set */
368  D3DRS_WRAP3 = 131, /* wrap for 4th texture coord. set */
369  D3DRS_WRAP4 = 132, /* wrap for 5th texture coord. set */
370  D3DRS_WRAP5 = 133, /* wrap for 6th texture coord. set */
371  D3DRS_WRAP6 = 134, /* wrap for 7th texture coord. set */
372  D3DRS_WRAP7 = 135, /* wrap for 8th texture coord. set */
386  D3DRS_POINTSIZE = 154, /* float point size */
387  D3DRS_POINTSIZE_MIN = 155, /* float point size min threshold */
388  D3DRS_POINTSPRITEENABLE = 156, /* BOOL point texture coord control */
389  D3DRS_POINTSCALEENABLE = 157, /* BOOL point size scale enable */
390  D3DRS_POINTSCALE_A = 158, /* float point attenuation A value */
391  D3DRS_POINTSCALE_B = 159, /* float point attenuation B value */
392  D3DRS_POINTSCALE_C = 160, /* float point attenuation C value */
393  D3DRS_MULTISAMPLEANTIALIAS = 161, // BOOL - set to do FSAA with multisample buffer
394  D3DRS_MULTISAMPLEMASK = 162, // DWORD - per-sample enable/disable
395  D3DRS_PATCHEDGESTYLE = 163, // Sets whether patch edges will use float style tessellation
396  D3DRS_DEBUGMONITORTOKEN = 165, // DEBUG ONLY - token to debug monitor
397  D3DRS_POINTSIZE_MAX = 166, /* float point size max threshold */
399  D3DRS_COLORWRITEENABLE = 168, // per-channel write enable
400  D3DRS_TWEENFACTOR = 170, // float tween factor
401  D3DRS_BLENDOP = 171, // D3DBLENDOP setting
402  D3DRS_POSITIONDEGREE = 172, // NPatch position interpolation degree. D3DDEGREE_LINEAR or D3DDEGREE_CUBIC (default)
403  D3DRS_NORMALDEGREE = 173, // NPatch normal interpolation degree. D3DDEGREE_LINEAR (default) or D3DDEGREE_QUADRATIC
414  D3DRS_TWOSIDEDSTENCILMODE = 185, /* BOOL enable/disable 2 sided stenciling */
415  D3DRS_CCW_STENCILFAIL = 186, /* D3DSTENCILOP to do if ccw stencil test fails */
416  D3DRS_CCW_STENCILZFAIL = 187, /* D3DSTENCILOP to do if ccw stencil test passes and Z test fails */
417  D3DRS_CCW_STENCILPASS = 188, /* D3DSTENCILOP to do if both ccw stencil and Z tests pass */
418  D3DRS_CCW_STENCILFUNC = 189, /* D3DCMPFUNC fn. ccw Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true */
419  D3DRS_COLORWRITEENABLE1 = 190, /* Additional ColorWriteEnables for the devices that support D3DPMISCCAPS_INDEPENDENTWRITEMASKS */
420  D3DRS_COLORWRITEENABLE2 = 191, /* Additional ColorWriteEnables for the devices that support D3DPMISCCAPS_INDEPENDENTWRITEMASKS */
421  D3DRS_COLORWRITEENABLE3 = 192, /* Additional ColorWriteEnables for the devices that support D3DPMISCCAPS_INDEPENDENTWRITEMASKS */
422  D3DRS_BLENDFACTOR = 193, /* D3DCOLOR used for a constant blend factor during alpha blending for devices that support D3DPBLENDCAPS_BLENDFACTOR */
423  D3DRS_SRGBWRITEENABLE = 194, /* Enable rendertarget writes to be DE-linearized to SRGB (for formats that expose D3DUSAGE_QUERY_SRGBWRITE) */
425  D3DRS_WRAP8 = 198, /* Additional wrap states for vs_3_0+ attributes with D3DDECLUSAGE_TEXCOORD */
426  D3DRS_WRAP9 = 199,
433  D3DRS_SEPARATEALPHABLENDENABLE = 206, /* TRUE to enable a separate blending function for the alpha channel */
434  D3DRS_SRCBLENDALPHA = 207, /* SRC blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */
435  D3DRS_DESTBLENDALPHA = 208, /* DST blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */
436  D3DRS_BLENDOPALPHA = 209, /* Blending operation for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */
437 
438 
439  D3DRS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
441 
442 // Maximum number of simultaneous render targets D3D supports
443 #define D3D_MAX_SIMULTANEOUS_RENDERTARGETS 4
444 
445 // Values for material source
447 {
448  D3DMCS_MATERIAL = 0, // Color from material is used
449  D3DMCS_COLOR1 = 1, // Diffuse vertex color is used
450  D3DMCS_COLOR2 = 2, // Specular vertex color is used
451  D3DMCS_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
453 
454 // Bias to apply to the texture coordinate set to apply a wrap to.
455 #define D3DRENDERSTATE_WRAPBIAS 128UL
456 
457 /* Flags to construct the WRAP render states */
458 #define D3DWRAP_U 0x00000001L
459 #define D3DWRAP_V 0x00000002L
460 #define D3DWRAP_W 0x00000004L
461 
462 /* Flags to construct the WRAP render states for 1D thru 4D texture coordinates */
463 #define D3DWRAPCOORD_0 0x00000001L // same as D3DWRAP_U
464 #define D3DWRAPCOORD_1 0x00000002L // same as D3DWRAP_V
465 #define D3DWRAPCOORD_2 0x00000004L // same as D3DWRAP_W
466 #define D3DWRAPCOORD_3 0x00000008L
467 
468 /* Flags to construct D3DRS_COLORWRITEENABLE */
469 #define D3DCOLORWRITEENABLE_RED (1L<<0)
470 #define D3DCOLORWRITEENABLE_GREEN (1L<<1)
471 #define D3DCOLORWRITEENABLE_BLUE (1L<<2)
472 #define D3DCOLORWRITEENABLE_ALPHA (1L<<3)
473 
474 /*
475  * State enumerants for per-stage processing of fixed function pixel processing
476  * Two of these affect fixed function vertex processing as well: TEXTURETRANSFORMFLAGS and TEXCOORDINDEX.
477  */
479 {
480  D3DTSS_COLOROP = 1, /* D3DTEXTUREOP - per-stage blending controls for color channels */
481  D3DTSS_COLORARG1 = 2, /* D3DTA_* (texture arg) */
482  D3DTSS_COLORARG2 = 3, /* D3DTA_* (texture arg) */
483  D3DTSS_ALPHAOP = 4, /* D3DTEXTUREOP - per-stage blending controls for alpha channel */
484  D3DTSS_ALPHAARG1 = 5, /* D3DTA_* (texture arg) */
485  D3DTSS_ALPHAARG2 = 6, /* D3DTA_* (texture arg) */
486  D3DTSS_BUMPENVMAT00 = 7, /* float (bump mapping matrix) */
487  D3DTSS_BUMPENVMAT01 = 8, /* float (bump mapping matrix) */
488  D3DTSS_BUMPENVMAT10 = 9, /* float (bump mapping matrix) */
489  D3DTSS_BUMPENVMAT11 = 10, /* float (bump mapping matrix) */
490  D3DTSS_TEXCOORDINDEX = 11, /* identifies which set of texture coordinates index this texture */
491  D3DTSS_BUMPENVLSCALE = 22, /* float scale for bump map luminance */
492  D3DTSS_BUMPENVLOFFSET = 23, /* float offset for bump map luminance */
493  D3DTSS_TEXTURETRANSFORMFLAGS = 24, /* D3DTEXTURETRANSFORMFLAGS controls texture transform */
494  D3DTSS_COLORARG0 = 26, /* D3DTA_* third arg for triadic ops */
495  D3DTSS_ALPHAARG0 = 27, /* D3DTA_* third arg for triadic ops */
496  D3DTSS_RESULTARG = 28, /* D3DTA_* arg for result (CURRENT or TEMP) */
497  D3DTSS_CONSTANT = 32, /* Per-stage constant D3DTA_CONSTANT */
498 
499 
500  D3DTSS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
502 
503 /*
504  * State enumerants for per-sampler texture processing.
505  */
507 {
508  D3DSAMP_ADDRESSU = 1, /* D3DTEXTUREADDRESS for U coordinate */
509  D3DSAMP_ADDRESSV = 2, /* D3DTEXTUREADDRESS for V coordinate */
510  D3DSAMP_ADDRESSW = 3, /* D3DTEXTUREADDRESS for W coordinate */
511  D3DSAMP_BORDERCOLOR = 4, /* D3DCOLOR */
512  D3DSAMP_MAGFILTER = 5, /* D3DTEXTUREFILTER filter to use for magnification */
513  D3DSAMP_MINFILTER = 6, /* D3DTEXTUREFILTER filter to use for minification */
514  D3DSAMP_MIPFILTER = 7, /* D3DTEXTUREFILTER filter to use between mipmaps during minification */
515  D3DSAMP_MIPMAPLODBIAS = 8, /* float Mipmap LOD bias */
516  D3DSAMP_MAXMIPLEVEL = 9, /* DWORD 0..(n-1) LOD index of largest map to use (0 == largest) */
517  D3DSAMP_MAXANISOTROPY = 10, /* DWORD maximum anisotropy */
518  D3DSAMP_SRGBTEXTURE = 11, /* Default = 0 (which means Gamma 1.0,
519  no correction required.) else correct for
520  Gamma = 2.2 */
521  D3DSAMP_ELEMENTINDEX = 12, /* When multi-element texture is assigned to sampler, this
522  indicates which element index to use. Default = 0. */
523  D3DSAMP_DMAPOFFSET = 13, /* Offset in vertices in the pre-sampled displacement map.
524  Only valid for D3DDMAPSAMPLER sampler */
525  D3DSAMP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
527 
528 /* Special sampler which is used in the tesselator */
529 #define D3DDMAPSAMPLER 256
530 
531 // Samplers used in vertex shaders
532 #define D3DVERTEXTEXTURESAMPLER0 (D3DDMAPSAMPLER+1)
533 #define D3DVERTEXTEXTURESAMPLER1 (D3DDMAPSAMPLER+2)
534 #define D3DVERTEXTEXTURESAMPLER2 (D3DDMAPSAMPLER+3)
535 #define D3DVERTEXTEXTURESAMPLER3 (D3DDMAPSAMPLER+4)
536 
537 // Values, used with D3DTSS_TEXCOORDINDEX, to specify that the vertex data(position
538 // and normal in the camera space) should be taken as texture coordinates
539 // Low 16 bits are used to specify texture coordinate index, to take the WRAP mode from
540 //
541 #define D3DTSS_TCI_PASSTHRU 0x00000000
542 #define D3DTSS_TCI_CAMERASPACENORMAL 0x00010000
543 #define D3DTSS_TCI_CAMERASPACEPOSITION 0x00020000
544 #define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x00030000
545 #define D3DTSS_TCI_SPHEREMAP 0x00040000
546 
547 /*
548  * Enumerations for COLOROP and ALPHAOP texture blending operations set in
549  * texture processing stage controls in D3DTSS.
550  */
551 typedef enum _D3DTEXTUREOP
552 {
553  // Control
554  D3DTOP_DISABLE = 1, // disables stage
555  D3DTOP_SELECTARG1 = 2, // the default
557 
558  // Modulate
559  D3DTOP_MODULATE = 4, // multiply args together
560  D3DTOP_MODULATE2X = 5, // multiply and 1 bit
561  D3DTOP_MODULATE4X = 6, // multiply and 2 bits
562 
563  // Add
564  D3DTOP_ADD = 7, // add arguments together
565  D3DTOP_ADDSIGNED = 8, // add with -0.5 bias
566  D3DTOP_ADDSIGNED2X = 9, // as above but left 1 bit
567  D3DTOP_SUBTRACT = 10, // Arg1 - Arg2, with no saturation
568  D3DTOP_ADDSMOOTH = 11, // add 2 args, subtract product
569  // Arg1 + Arg2 - Arg1*Arg2
570  // = Arg1 + (1-Arg1)*Arg2
571 
572  // Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha)
573  D3DTOP_BLENDDIFFUSEALPHA = 12, // iterated alpha
574  D3DTOP_BLENDTEXTUREALPHA = 13, // texture alpha
575  D3DTOP_BLENDFACTORALPHA = 14, // alpha from D3DRS_TEXTUREFACTOR
576 
577  // Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha)
578  D3DTOP_BLENDTEXTUREALPHAPM = 15, // texture alpha
579  D3DTOP_BLENDCURRENTALPHA = 16, // by alpha of current color
580 
581  // Specular mapping
582  D3DTOP_PREMODULATE = 17, // modulate with next texture before use
583  D3DTOP_MODULATEALPHA_ADDCOLOR = 18, // Arg1.RGB + Arg1.A*Arg2.RGB
584  // COLOROP only
585  D3DTOP_MODULATECOLOR_ADDALPHA = 19, // Arg1.RGB*Arg2.RGB + Arg1.A
586  // COLOROP only
587  D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, // (1-Arg1.A)*Arg2.RGB + Arg1.RGB
588  // COLOROP only
589  D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, // (1-Arg1.RGB)*Arg2.RGB + Arg1.A
590  // COLOROP only
591 
592  // Bump mapping
593  D3DTOP_BUMPENVMAP = 22, // per pixel env map perturbation
594  D3DTOP_BUMPENVMAPLUMINANCE = 23, // with luminance channel
595 
596  // This can do either diffuse or specular bump mapping with correct input.
597  // Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B)
598  // where each component has been scaled and offset to make it signed.
599  // The result is replicated into all four (including alpha) channels.
600  // This is a valid COLOROP only.
602 
603  // Triadic ops
604  D3DTOP_MULTIPLYADD = 25, // Arg0 + Arg1*Arg2
605  D3DTOP_LERP = 26, // (Arg0)*Arg1 + (1-Arg0)*Arg2
606 
607  D3DTOP_FORCE_DWORD = 0x7fffffff,
608 } D3DTEXTUREOP;
609 
610 /*
611  * Values for COLORARG0,1,2, ALPHAARG0,1,2, and RESULTARG texture blending
612  * operations set in texture processing stage controls in D3DRENDERSTATE.
613  */
614 #define D3DTA_SELECTMASK 0x0000000f // mask for arg selector
615 #define D3DTA_DIFFUSE 0x00000000 // select diffuse color (read only)
616 #define D3DTA_CURRENT 0x00000001 // select stage destination register (read/write)
617 #define D3DTA_TEXTURE 0x00000002 // select texture color (read only)
618 #define D3DTA_TFACTOR 0x00000003 // select D3DRS_TEXTUREFACTOR (read only)
619 #define D3DTA_SPECULAR 0x00000004 // select specular color (read only)
620 #define D3DTA_TEMP 0x00000005 // select temporary register color (read/write)
621 #define D3DTA_CONSTANT 0x00000006 // select texture stage constant
622 #define D3DTA_COMPLEMENT 0x00000010 // take 1.0 - x (read modifier)
623 #define D3DTA_ALPHAREPLICATE 0x00000020 // replicate alpha to color components (read modifier)
624 
625 //
626 // Values for D3DSAMP_***FILTER texture stage states
627 //
629 {
630  D3DTEXF_NONE = 0, // filtering disabled (valid for mip filter only)
631  D3DTEXF_POINT = 1, // nearest
632  D3DTEXF_LINEAR = 2, // linear interpolation
633  D3DTEXF_ANISOTROPIC = 3, // anisotropic
634  D3DTEXF_PYRAMIDALQUAD = 6, // 4-sample tent
635  D3DTEXF_GAUSSIANQUAD = 7, // 4-sample gaussian
636 /* D3D9Ex only -- */
637 #if !defined(D3D_DISABLE_9EX)
638 
639  D3DTEXF_CONVOLUTIONMONO = 8, // Convolution filter for monochrome textures
640 
641 #endif // !D3D_DISABLE_9EX
642 /* -- D3D9Ex only */
643  D3DTEXF_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
645 
646 /* Bits for Flags in ProcessVertices call */
647 
648 #define D3DPV_DONOTCOPYDATA (1 << 0)
649 
650 //-------------------------------------------------------------------
651 
652 // Flexible vertex format bits
653 //
654 #define D3DFVF_RESERVED0 0x001
655 #define D3DFVF_POSITION_MASK 0x400E
656 #define D3DFVF_XYZ 0x002
657 #define D3DFVF_XYZRHW 0x004
658 #define D3DFVF_XYZB1 0x006
659 #define D3DFVF_XYZB2 0x008
660 #define D3DFVF_XYZB3 0x00a
661 #define D3DFVF_XYZB4 0x00c
662 #define D3DFVF_XYZB5 0x00e
663 #define D3DFVF_XYZW 0x4002
664 
665 #define D3DFVF_NORMAL 0x010
666 #define D3DFVF_PSIZE 0x020
667 #define D3DFVF_DIFFUSE 0x040
668 #define D3DFVF_SPECULAR 0x080
669 
670 #define D3DFVF_TEXCOUNT_MASK 0xf00
671 #define D3DFVF_TEXCOUNT_SHIFT 8
672 #define D3DFVF_TEX0 0x000
673 #define D3DFVF_TEX1 0x100
674 #define D3DFVF_TEX2 0x200
675 #define D3DFVF_TEX3 0x300
676 #define D3DFVF_TEX4 0x400
677 #define D3DFVF_TEX5 0x500
678 #define D3DFVF_TEX6 0x600
679 #define D3DFVF_TEX7 0x700
680 #define D3DFVF_TEX8 0x800
681 
682 #define D3DFVF_LASTBETA_UBYTE4 0x1000
683 #define D3DFVF_LASTBETA_D3DCOLOR 0x8000
684 
685 #define D3DFVF_RESERVED2 0x6000 // 2 reserved bits
686 
687 //---------------------------------------------------------------------
688 // Vertex Shaders
689 //
690 
691 // Vertex shader declaration
692 
693 // Vertex element semantics
694 //
695 typedef enum _D3DDECLUSAGE
696 {
711 } D3DDECLUSAGE;
712 
713 #define MAXD3DDECLUSAGE D3DDECLUSAGE_SAMPLE
714 #define MAXD3DDECLUSAGEINDEX 15
715 #define MAXD3DDECLLENGTH 64 // does not include "end" marker vertex element
716 
717 typedef enum _D3DDECLMETHOD
718 {
724  D3DDECLMETHOD_LOOKUP, // Lookup a displacement map
725  D3DDECLMETHOD_LOOKUPPRESAMPLED, // Lookup a pre-sampled displacement map
726 } D3DDECLMETHOD;
727 
728 #define MAXD3DDECLMETHOD D3DDECLMETHOD_LOOKUPPRESAMPLED
729 
730 // Declarations for _Type fields
731 //
732 typedef enum _D3DDECLTYPE
733 {
734  D3DDECLTYPE_FLOAT1 = 0, // 1D float expanded to (value, 0., 0., 1.)
735  D3DDECLTYPE_FLOAT2 = 1, // 2D float expanded to (value, value, 0., 1.)
736  D3DDECLTYPE_FLOAT3 = 2, // 3D float expanded to (value, value, value, 1.)
737  D3DDECLTYPE_FLOAT4 = 3, // 4D float
738  D3DDECLTYPE_D3DCOLOR = 4, // 4D packed unsigned bytes mapped to 0. to 1. range
739  // Input is in D3DCOLOR format (ARGB) expanded to (R, G, B, A)
740  D3DDECLTYPE_UBYTE4 = 5, // 4D unsigned byte
741  D3DDECLTYPE_SHORT2 = 6, // 2D signed short expanded to (value, value, 0., 1.)
742  D3DDECLTYPE_SHORT4 = 7, // 4D signed short
743 
744 // The following types are valid only with vertex shaders >= 2.0
745 
746 
747  D3DDECLTYPE_UBYTE4N = 8, // Each of 4 bytes is normalized by dividing to 255.0
748  D3DDECLTYPE_SHORT2N = 9, // 2D signed short normalized (v[0]/32767.0,v[1]/32767.0,0,1)
749  D3DDECLTYPE_SHORT4N = 10, // 4D signed short normalized (v[0]/32767.0,v[1]/32767.0,v[2]/32767.0,v[3]/32767.0)
750  D3DDECLTYPE_USHORT2N = 11, // 2D unsigned short normalized (v[0]/65535.0,v[1]/65535.0,0,1)
751  D3DDECLTYPE_USHORT4N = 12, // 4D unsigned short normalized (v[0]/65535.0,v[1]/65535.0,v[2]/65535.0,v[3]/65535.0)
752  D3DDECLTYPE_UDEC3 = 13, // 3D unsigned 10 10 10 format expanded to (value, value, value, 1)
753  D3DDECLTYPE_DEC3N = 14, // 3D signed 10 10 10 format normalized and expanded to (v[0]/511.0, v[1]/511.0, v[2]/511.0, 1)
754  D3DDECLTYPE_FLOAT16_2 = 15, // Two 16-bit floating point values, expanded to (value, value, 0, 1)
755  D3DDECLTYPE_FLOAT16_4 = 16, // Four 16-bit floating point values
756  D3DDECLTYPE_UNUSED = 17, // When the type field in a decl is unused.
757 } D3DDECLTYPE;
758 
759 #define MAXD3DDECLTYPE D3DDECLTYPE_UNUSED
760 
761 typedef struct _D3DVERTEXELEMENT9
762 {
763  WORD Stream; // Stream index
764  WORD Offset; // Offset in the stream in bytes
765  BYTE Type; // Data type
766  BYTE Method; // Processing method
767  BYTE Usage; // Semantics
768  BYTE UsageIndex; // Semantic index
770 
771 // This is used to initialize the last vertex element in a vertex declaration
772 // array
773 //
774 #define D3DDECL_END() {0xFF,0,D3DDECLTYPE_UNUSED,0,0,0}
775 
776 // Maximum supported number of texture coordinate sets
777 #define D3DDP_MAXTEXCOORD 8
778 
779 //---------------------------------------------------------------------
780 // Values for IDirect3DDevice9::SetStreamSourceFreq's Setting parameter
781 //---------------------------------------------------------------------
782 #define D3DSTREAMSOURCE_INDEXEDDATA (1<<30)
783 #define D3DSTREAMSOURCE_INSTANCEDATA (2<<30)
784 
785 
786 
787 //---------------------------------------------------------------------
788 //
789 // The internal format of Pixel Shader (PS) & Vertex Shader (VS)
790 // Instruction Tokens is defined in the Direct3D Device Driver Kit
791 //
792 //---------------------------------------------------------------------
793 
794 //
795 // Instruction Token Bit Definitions
796 //
797 #define D3DSI_OPCODE_MASK 0x0000FFFF
798 
799 #define D3DSI_INSTLENGTH_MASK 0x0F000000
800 #define D3DSI_INSTLENGTH_SHIFT 24
801 
803 {
853 
887 
888  D3DSIO_PHASE = 0xFFFD,
889  D3DSIO_COMMENT = 0xFFFE,
890  D3DSIO_END = 0xFFFF,
891 
892  D3DSIO_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
894 
895 //---------------------------------------------------------------------
896 // Use these constants with D3DSIO_SINCOS macro as SRC2, SRC3
897 //
898 #define D3DSINCOSCONST1 -1.5500992e-006f, -2.1701389e-005f, 0.0026041667f, 0.00026041668f
899 #define D3DSINCOSCONST2 -0.020833334f, -0.12500000f, 1.0f, 0.50000000f
900 
901 //---------------------------------------------------------------------
902 // Co-Issue Instruction Modifier - if set then this instruction is to be
903 // issued in parallel with the previous instruction(s) for which this bit
904 // is not set.
905 //
906 #define D3DSI_COISSUE 0x40000000
907 
908 //---------------------------------------------------------------------
909 // Opcode specific controls
910 
911 #define D3DSP_OPCODESPECIFICCONTROL_MASK 0x00ff0000
912 #define D3DSP_OPCODESPECIFICCONTROL_SHIFT 16
913 
914 // ps_2_0 texld controls
915 #define D3DSI_TEXLD_PROJECT (0x01 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
916 #define D3DSI_TEXLD_BIAS (0x02 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
917 
918 // Comparison for dynamic conditional instruction opcodes (i.e. if, breakc)
920 {
921  // < = >
922  D3DSPC_RESERVED0= 0, // 0 0 0
923  D3DSPC_GT = 1, // 0 0 1
924  D3DSPC_EQ = 2, // 0 1 0
925  D3DSPC_GE = 3, // 0 1 1
926  D3DSPC_LT = 4, // 1 0 0
927  D3DSPC_NE = 5, // 1 0 1
928  D3DSPC_LE = 6, // 1 1 0
929  D3DSPC_RESERVED1= 7 // 1 1 1
931 
932 // Comparison is part of instruction opcode token:
933 #define D3DSHADER_COMPARISON_SHIFT D3DSP_OPCODESPECIFICCONTROL_SHIFT
934 #define D3DSHADER_COMPARISON_MASK (0x7<<D3DSHADER_COMPARISON_SHIFT)
935 
936 //---------------------------------------------------------------------
937 // Predication flags on instruction token
938 #define D3DSHADER_INSTRUCTION_PREDICATED (0x1 << 28)
939 
940 //---------------------------------------------------------------------
941 // DCL Info Token Controls
942 
943 // For dcl info tokens requiring a semantic (usage + index)
944 #define D3DSP_DCL_USAGE_SHIFT 0
945 #define D3DSP_DCL_USAGE_MASK 0x0000000f
946 
947 #define D3DSP_DCL_USAGEINDEX_SHIFT 16
948 #define D3DSP_DCL_USAGEINDEX_MASK 0x000f0000
949 
950 // DCL pixel shader sampler info token.
951 #define D3DSP_TEXTURETYPE_SHIFT 27
952 #define D3DSP_TEXTURETYPE_MASK 0x78000000
953 
955 {
956  D3DSTT_UNKNOWN = 0<<D3DSP_TEXTURETYPE_SHIFT, // uninitialized value
957  D3DSTT_2D = 2<<D3DSP_TEXTURETYPE_SHIFT, // dcl_2d s# (for declaring a 2-D texture)
958  D3DSTT_CUBE = 3<<D3DSP_TEXTURETYPE_SHIFT, // dcl_cube s# (for declaring a cube texture)
959  D3DSTT_VOLUME = 4<<D3DSP_TEXTURETYPE_SHIFT, // dcl_volume s# (for declaring a volume texture)
960  D3DSTT_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
962 
963 //---------------------------------------------------------------------
964 // Parameter Token Bit Definitions
965 //
966 #define D3DSP_REGNUM_MASK 0x000007FF
967 
968 // destination parameter write mask
969 #define D3DSP_WRITEMASK_0 0x00010000 // Component 0 (X;Red)
970 #define D3DSP_WRITEMASK_1 0x00020000 // Component 1 (Y;Green)
971 #define D3DSP_WRITEMASK_2 0x00040000 // Component 2 (Z;Blue)
972 #define D3DSP_WRITEMASK_3 0x00080000 // Component 3 (W;Alpha)
973 #define D3DSP_WRITEMASK_ALL 0x000F0000 // All Components
974 
975 // destination parameter modifiers
976 #define D3DSP_DSTMOD_SHIFT 20
977 #define D3DSP_DSTMOD_MASK 0x00F00000
978 
979 // Bit masks for destination parameter modifiers
980 #define D3DSPDM_NONE (0<<D3DSP_DSTMOD_SHIFT) // nop
981 #define D3DSPDM_SATURATE (1<<D3DSP_DSTMOD_SHIFT) // clamp to 0. to 1. range
982 #define D3DSPDM_PARTIALPRECISION (2<<D3DSP_DSTMOD_SHIFT) // Partial precision hint
983 #define D3DSPDM_MSAMPCENTROID (4<<D3DSP_DSTMOD_SHIFT) // Relevant to multisampling only:
984  // When the pixel center is not covered, sample
985  // attribute or compute gradients/LOD
986  // using multisample "centroid" location.
987  // "Centroid" is some location within the covered
988  // region of the pixel.
989 
990 // destination parameter
991 #define D3DSP_DSTSHIFT_SHIFT 24
992 #define D3DSP_DSTSHIFT_MASK 0x0F000000
993 
994 // destination/source parameter register type
995 #define D3DSP_REGTYPE_SHIFT 28
996 #define D3DSP_REGTYPE_SHIFT2 8
997 #define D3DSP_REGTYPE_MASK 0x70000000
998 #define D3DSP_REGTYPE_MASK2 0x00001800
999 
1001 {
1002  D3DSPR_TEMP = 0, // Temporary Register File
1003  D3DSPR_INPUT = 1, // Input Register File
1004  D3DSPR_CONST = 2, // Constant Register File
1005  D3DSPR_ADDR = 3, // Address Register (VS)
1006  D3DSPR_TEXTURE = 3, // Texture Register File (PS)
1007  D3DSPR_RASTOUT = 4, // Rasterizer Register File
1008  D3DSPR_ATTROUT = 5, // Attribute Output Register File
1009  D3DSPR_TEXCRDOUT = 6, // Texture Coordinate Output Register File
1010  D3DSPR_OUTPUT = 6, // Output register file for VS3.0+
1011  D3DSPR_CONSTINT = 7, // Constant Integer Vector Register File
1012  D3DSPR_COLOROUT = 8, // Color Output Register File
1013  D3DSPR_DEPTHOUT = 9, // Depth Output Register File
1014  D3DSPR_SAMPLER = 10, // Sampler State Register File
1015  D3DSPR_CONST2 = 11, // Constant Register File 2048 - 4095
1016  D3DSPR_CONST3 = 12, // Constant Register File 4096 - 6143
1017  D3DSPR_CONST4 = 13, // Constant Register File 6144 - 8191
1018  D3DSPR_CONSTBOOL = 14, // Constant Boolean register file
1019  D3DSPR_LOOP = 15, // Loop counter register file
1020  D3DSPR_TEMPFLOAT16 = 16, // 16-bit float temp register file
1021  D3DSPR_MISCTYPE = 17, // Miscellaneous (single) registers.
1022  D3DSPR_LABEL = 18, // Label
1023  D3DSPR_PREDICATE = 19, // Predicate register
1024  D3DSPR_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1026 
1027 // The miscellaneous register file (D3DSPR_MISCTYPES)
1028 // contains register types for which there is only ever one
1029 // register (i.e. the register # is not needed).
1030 // Rather than use up additional register types for such
1031 // registers, they are defined
1032 // as particular offsets into the misc. register file:
1034 {
1035  D3DSMO_POSITION = 0, // Input position x,y,z,rhw (PS)
1036  D3DSMO_FACE = 1, // Floating point primitive area (PS)
1038 
1039 // Register offsets in the Rasterizer Register File
1040 //
1042 {
1046  D3DSRO_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1048 
1049 // Source operand addressing modes
1050 
1051 #define D3DVS_ADDRESSMODE_SHIFT 13
1052 #define D3DVS_ADDRESSMODE_MASK (1 << D3DVS_ADDRESSMODE_SHIFT)
1053 
1055 {
1058  D3DVS_ADDRMODE_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1060 
1061 #define D3DSHADER_ADDRESSMODE_SHIFT 13
1062 #define D3DSHADER_ADDRESSMODE_MASK (1 << D3DSHADER_ADDRESSMODE_SHIFT)
1063 
1065 {
1068  D3DSHADER_ADDRMODE_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1070 
1071 // Source operand swizzle definitions
1072 //
1073 #define D3DVS_SWIZZLE_SHIFT 16
1074 #define D3DVS_SWIZZLE_MASK 0x00FF0000
1075 
1076 // The following bits define where to take component X from:
1077 
1078 #define D3DVS_X_X (0 << D3DVS_SWIZZLE_SHIFT)
1079 #define D3DVS_X_Y (1 << D3DVS_SWIZZLE_SHIFT)
1080 #define D3DVS_X_Z (2 << D3DVS_SWIZZLE_SHIFT)
1081 #define D3DVS_X_W (3 << D3DVS_SWIZZLE_SHIFT)
1082 
1083 // The following bits define where to take component Y from:
1084 
1085 #define D3DVS_Y_X (0 << (D3DVS_SWIZZLE_SHIFT + 2))
1086 #define D3DVS_Y_Y (1 << (D3DVS_SWIZZLE_SHIFT + 2))
1087 #define D3DVS_Y_Z (2 << (D3DVS_SWIZZLE_SHIFT + 2))
1088 #define D3DVS_Y_W (3 << (D3DVS_SWIZZLE_SHIFT + 2))
1089 
1090 // The following bits define where to take component Z from:
1091 
1092 #define D3DVS_Z_X (0 << (D3DVS_SWIZZLE_SHIFT + 4))
1093 #define D3DVS_Z_Y (1 << (D3DVS_SWIZZLE_SHIFT + 4))
1094 #define D3DVS_Z_Z (2 << (D3DVS_SWIZZLE_SHIFT + 4))
1095 #define D3DVS_Z_W (3 << (D3DVS_SWIZZLE_SHIFT + 4))
1096 
1097 // The following bits define where to take component W from:
1098 
1099 #define D3DVS_W_X (0 << (D3DVS_SWIZZLE_SHIFT + 6))
1100 #define D3DVS_W_Y (1 << (D3DVS_SWIZZLE_SHIFT + 6))
1101 #define D3DVS_W_Z (2 << (D3DVS_SWIZZLE_SHIFT + 6))
1102 #define D3DVS_W_W (3 << (D3DVS_SWIZZLE_SHIFT + 6))
1103 
1104 // Value when there is no swizzle (X is taken from X, Y is taken from Y,
1105 // Z is taken from Z, W is taken from W
1106 //
1107 #define D3DVS_NOSWIZZLE (D3DVS_X_X | D3DVS_Y_Y | D3DVS_Z_Z | D3DVS_W_W)
1108 
1109 // source parameter swizzle
1110 #define D3DSP_SWIZZLE_SHIFT 16
1111 #define D3DSP_SWIZZLE_MASK 0x00FF0000
1112 
1113 #define D3DSP_NOSWIZZLE \
1114  ( (0 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1115  (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1116  (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1117  (3 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1118 
1119 // pixel-shader swizzle ops
1120 #define D3DSP_REPLICATERED \
1121  ( (0 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1122  (0 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1123  (0 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1124  (0 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1125 
1126 #define D3DSP_REPLICATEGREEN \
1127  ( (1 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1128  (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1129  (1 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1130  (1 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1131 
1132 #define D3DSP_REPLICATEBLUE \
1133  ( (2 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1134  (2 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1135  (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1136  (2 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1137 
1138 #define D3DSP_REPLICATEALPHA \
1139  ( (3 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1140  (3 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1141  (3 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1142  (3 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1143 
1144 // source parameter modifiers
1145 #define D3DSP_SRCMOD_SHIFT 24
1146 #define D3DSP_SRCMOD_MASK 0x0F000000
1147 
1149 {
1153  D3DSPSM_BIASNEG = 3<<D3DSP_SRCMOD_SHIFT, // bias and negate
1155  D3DSPSM_SIGNNEG = 5<<D3DSP_SRCMOD_SHIFT, // sign and negate
1156  D3DSPSM_COMP = 6<<D3DSP_SRCMOD_SHIFT, // complement
1158  D3DSPSM_X2NEG = 8<<D3DSP_SRCMOD_SHIFT, // *2 and negate
1159  D3DSPSM_DZ = 9<<D3DSP_SRCMOD_SHIFT, // divide through by z component
1160  D3DSPSM_DW = 10<<D3DSP_SRCMOD_SHIFT, // divide through by w component
1163  D3DSPSM_NOT = 13<<D3DSP_SRCMOD_SHIFT, // for predicate register: "!p0"
1164  D3DSPSM_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1166 
1167 // pixel shader version token
1168 #define D3DPS_VERSION(_Major,_Minor) (0xFFFF0000|((_Major)<<8)|(_Minor))
1169 
1170 // vertex shader version token
1171 #define D3DVS_VERSION(_Major,_Minor) (0xFFFE0000|((_Major)<<8)|(_Minor))
1172 
1173 // extract major/minor from version cap
1174 #define D3DSHADER_VERSION_MAJOR(_Version) (((_Version)>>8)&0xFF)
1175 #define D3DSHADER_VERSION_MINOR(_Version) (((_Version)>>0)&0xFF)
1176 
1177 // destination/source parameter register type
1178 #define D3DSI_COMMENTSIZE_SHIFT 16
1179 #define D3DSI_COMMENTSIZE_MASK 0x7FFF0000
1180 #define D3DSHADER_COMMENT(_DWordSize) \
1181  ((((_DWordSize)<<D3DSI_COMMENTSIZE_SHIFT)&D3DSI_COMMENTSIZE_MASK)|D3DSIO_COMMENT)
1182 
1183 // pixel/vertex shader end token
1184 #define D3DPS_END() 0x0000FFFF
1185 #define D3DVS_END() 0x0000FFFF
1186 
1187 
1188 //---------------------------------------------------------------------
1189 
1190 // High order surfaces
1191 //
1192 typedef enum _D3DBASISTYPE
1193 {
1196  D3DBASIS_CATMULL_ROM = 2, /* In D3D8 this used to be D3DBASIS_INTERPOLATE */
1197  D3DBASIS_FORCE_DWORD = 0x7fffffff,
1198 } D3DBASISTYPE;
1199 
1200 typedef enum _D3DDEGREETYPE
1201 {
1207 } D3DDEGREETYPE;
1208 
1210 {
1215 
1217 {
1218  D3DSBT_ALL = 1, // capture all state
1219  D3DSBT_PIXELSTATE = 2, // capture pixel state
1220  D3DSBT_VERTEXSTATE = 3, // capture vertex state
1221  D3DSBT_FORCE_DWORD = 0x7fffffff,
1223 
1224 // The D3DVERTEXBLENDFLAGS type is used with D3DRS_VERTEXBLEND state.
1225 //
1227 {
1228  D3DVBF_DISABLE = 0, // Disable vertex blending
1229  D3DVBF_1WEIGHTS = 1, // 2 matrix blending
1230  D3DVBF_2WEIGHTS = 2, // 3 matrix blending
1231  D3DVBF_3WEIGHTS = 3, // 4 matrix blending
1232  D3DVBF_TWEENING = 255, // blending using D3DRS_TWEENFACTOR
1233  D3DVBF_0WEIGHTS = 256, // one matrix is used with weight 1.0
1234  D3DVBF_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1236 
1238  D3DTTFF_DISABLE = 0, // texture coordinates are passed directly
1239  D3DTTFF_COUNT1 = 1, // rasterizer should expect 1-D texture coords
1240  D3DTTFF_COUNT2 = 2, // rasterizer should expect 2-D texture coords
1241  D3DTTFF_COUNT3 = 3, // rasterizer should expect 3-D texture coords
1242  D3DTTFF_COUNT4 = 4, // rasterizer should expect 4-D texture coords
1243  D3DTTFF_PROJECTED = 256, // texcoords to be divided by COUNTth element
1244  D3DTTFF_FORCE_DWORD = 0x7fffffff,
1246 
1247 // Macros to set texture coordinate format bits in the FVF id
1248 
1249 #define D3DFVF_TEXTUREFORMAT2 0 // Two floating point values
1250 #define D3DFVF_TEXTUREFORMAT1 3 // One floating point value
1251 #define D3DFVF_TEXTUREFORMAT3 1 // Three floating point values
1252 #define D3DFVF_TEXTUREFORMAT4 2 // Four floating point values
1253 
1254 #define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
1255 #define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2)
1256 #define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
1257 #define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
1258 
1259 
1260 //---------------------------------------------------------------------
1261 
1262 /* Direct3D9 Device types */
1263 typedef enum _D3DDEVTYPE
1264 {
1268 
1270 
1272 } D3DDEVTYPE;
1273 
1274 /* Multi-Sample buffer types */
1276 {
1294 
1297 
1298 /* Formats
1299  * Most of these names have the following convention:
1300  * A = Alpha
1301  * R = Red
1302  * G = Green
1303  * B = Blue
1304  * X = Unused Bits
1305  * P = Palette
1306  * L = Luminance
1307  * U = dU coordinate for BumpMap
1308  * V = dV coordinate for BumpMap
1309  * S = Stencil
1310  * D = Depth (e.g. Z or W buffer)
1311  * C = Computed from other channels (typically on certain read operations)
1312  *
1313  * Further, the order of the pieces are from MSB first; hence
1314  * D3DFMT_A8L8 indicates that the high byte of this two byte
1315  * format is alpha.
1316  *
1317  * D3DFMT_D16_LOCKABLE indicates:
1318  * - An integer 16-bit value.
1319  * - An app-lockable surface.
1320  *
1321  * D3DFMT_D32F_LOCKABLE indicates:
1322  * - An IEEE 754 floating-point value.
1323  * - An app-lockable surface.
1324  *
1325  * All Depth/Stencil formats except D3DFMT_D16_LOCKABLE and D3DFMT_D32F_LOCKABLE indicate:
1326  * - no particular bit ordering per pixel, and
1327  * - are not app lockable, and
1328  * - the driver is allowed to consume more than the indicated
1329  * number of bits per Depth channel (but not Stencil channel).
1330  */
1331 #ifndef MAKEFOURCC
1332  #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
1333  ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
1334  ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
1335 #endif /* defined(MAKEFOURCC) */
1336 
1337 
1338 typedef enum _D3DFORMAT
1339 {
1341 
1359 
1362 
1366 
1373 
1374  D3DFMT_UYVY = MAKEFOURCC('U', 'Y', 'V', 'Y'),
1375  D3DFMT_R8G8_B8G8 = MAKEFOURCC('R', 'G', 'B', 'G'),
1376  D3DFMT_YUY2 = MAKEFOURCC('Y', 'U', 'Y', '2'),
1377  D3DFMT_G8R8_G8B8 = MAKEFOURCC('G', 'R', 'G', 'B'),
1378  D3DFMT_DXT1 = MAKEFOURCC('D', 'X', 'T', '1'),
1379  D3DFMT_DXT2 = MAKEFOURCC('D', 'X', 'T', '2'),
1380  D3DFMT_DXT3 = MAKEFOURCC('D', 'X', 'T', '3'),
1381  D3DFMT_DXT4 = MAKEFOURCC('D', 'X', 'T', '4'),
1382  D3DFMT_DXT5 = MAKEFOURCC('D', 'X', 'T', '5'),
1383 
1391 
1394 
1395 /* D3D9Ex only -- */
1396 #if !defined(D3D_DISABLE_9EX)
1397 
1398  /* Z-Stencil formats valid for CPU access */
1401 
1402 #endif // !D3D_DISABLE_9EX
1403 /* -- D3D9Ex only */
1404 
1405 
1407 
1411 
1413 
1414  D3DFMT_MULTI2_ARGB8 = MAKEFOURCC('M','E','T','1'),
1415 
1416  // Floating point surface formats
1417 
1418  // s10e5 formats (16-bits per channel)
1422 
1423  // IEEE s23e8 formats (32-bits per channel)
1427 
1429 
1430 /* D3D9Ex only -- */
1431 #if !defined(D3D_DISABLE_9EX)
1432 
1433  // Monochrome 1 bit per pixel format
1434  D3DFMT_A1 = 118,
1435 
1436  // 2.8 biased fixed point
1438 
1439 
1440  // Binary format indicating that the data has no inherent type
1442 
1443 #endif // !D3D_DISABLE_9EX
1444 /* -- D3D9Ex only */
1445 
1446 
1448 } D3DFORMAT;
1449 
1450 /* Display Modes */
1451 typedef struct _D3DDISPLAYMODE
1452 {
1457 } D3DDISPLAYMODE;
1458 
1459 /* Creation Parameters */
1461 {
1467 
1468 
1469 /* SwapEffects */
1470 typedef enum _D3DSWAPEFFECT
1471 {
1475 
1476 /* D3D9Ex only -- */
1477 #if !defined(D3D_DISABLE_9EX)
1480 #endif // !D3D_DISABLE_9EX
1481 /* -- D3D9Ex only */
1482 
1484 } D3DSWAPEFFECT;
1485 
1486 /* Pool types */
1487 typedef enum _D3DPOOL {
1492 
1493  D3DPOOL_FORCE_DWORD = 0x7fffffff
1494 } D3DPOOL;
1495 
1496 
1497 /* RefreshRate pre-defines */
1498 #define D3DPRESENT_RATE_DEFAULT 0x00000000
1499 
1500 
1501 /* Resize Optional Parameters */
1503 {
1508 
1511 
1518 
1519  /* FullScreen_RefreshRateInHz must be zero for Windowed mode */
1523 
1524 // Values for D3DPRESENT_PARAMETERS.Flags
1525 
1526 #define D3DPRESENTFLAG_LOCKABLE_BACKBUFFER 0x00000001
1527 #define D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL 0x00000002
1528 #define D3DPRESENTFLAG_DEVICECLIP 0x00000004
1529 #define D3DPRESENTFLAG_VIDEO 0x00000010
1530 
1531 /* D3D9Ex only -- */
1532 #if !defined(D3D_DISABLE_9EX)
1533 
1534 #define D3DPRESENTFLAG_NOAUTOROTATE 0x00000020
1535 #define D3DPRESENTFLAG_UNPRUNEDMODE 0x00000040
1536 #define D3DPRESENTFLAG_OVERLAY_LIMITEDRGB 0x00000080
1537 #define D3DPRESENTFLAG_OVERLAY_YCbCr_BT709 0x00000100
1538 #define D3DPRESENTFLAG_OVERLAY_YCbCr_xvYCC 0x00000200
1539 #define D3DPRESENTFLAG_RESTRICTED_CONTENT 0x00000400
1540 #define D3DPRESENTFLAG_RESTRICT_SHARED_RESOURCE_DRIVER 0x00000800
1541 
1542 #endif // !D3D_DISABLE_9EX
1543 /* -- D3D9Ex only */
1544 
1545 /* Gamma Ramp: Same as DX7 */
1546 
1547 typedef struct _D3DGAMMARAMP
1548 {
1549  WORD red [256];
1550  WORD green[256];
1551  WORD blue [256];
1552 } D3DGAMMARAMP;
1553 
1554 /* Back buffer types */
1556 {
1560 
1563 
1564 
1565 /* Types */
1566 typedef enum _D3DRESOURCETYPE {
1573  D3DRTYPE_INDEXBUFFER = 7, //if this changes, change _D3DDEVINFO_RESOURCEMANAGER definition
1574 
1575 
1577 } D3DRESOURCETYPE;
1578 
1579 /* Usages */
1580 #define D3DUSAGE_RENDERTARGET (0x00000001L)
1581 #define D3DUSAGE_DEPTHSTENCIL (0x00000002L)
1582 #define D3DUSAGE_DYNAMIC (0x00000200L)
1583 
1584 /* D3D9Ex only -- */
1585 #if !defined(D3D_DISABLE_9EX)
1586 
1587 #define D3DUSAGE_NONSECURE (0x00800000L)
1588 
1589 #endif // !D3D_DISABLE_9EX
1590 /* -- D3D9Ex only */
1591 
1592 // When passed to CheckDeviceFormat, D3DUSAGE_AUTOGENMIPMAP may return
1593 // D3DOK_NOAUTOGEN if the device doesn't support autogeneration for that format.
1594 // D3DOK_NOAUTOGEN is a success code, not a failure code... the SUCCEEDED and FAILED macros
1595 // will return true and false respectively for this code.
1596 #define D3DUSAGE_AUTOGENMIPMAP (0x00000400L)
1597 #define D3DUSAGE_DMAP (0x00004000L)
1598 
1599 // The following usages are valid only for querying CheckDeviceFormat
1600 #define D3DUSAGE_QUERY_LEGACYBUMPMAP (0x00008000L)
1601 #define D3DUSAGE_QUERY_SRGBREAD (0x00010000L)
1602 #define D3DUSAGE_QUERY_FILTER (0x00020000L)
1603 #define D3DUSAGE_QUERY_SRGBWRITE (0x00040000L)
1604 #define D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING (0x00080000L)
1605 #define D3DUSAGE_QUERY_VERTEXTEXTURE (0x00100000L)
1606 #define D3DUSAGE_QUERY_WRAPANDMIP (0x00200000L)
1607 
1608 /* Usages for Vertex/Index buffers */
1609 #define D3DUSAGE_WRITEONLY (0x00000008L)
1610 #define D3DUSAGE_SOFTWAREPROCESSING (0x00000010L)
1611 #define D3DUSAGE_DONOTCLIP (0x00000020L)
1612 #define D3DUSAGE_POINTS (0x00000040L)
1613 #define D3DUSAGE_RTPATCHES (0x00000080L)
1614 #define D3DUSAGE_NPATCHES (0x00000100L)
1615 
1616 /* D3D9Ex only -- */
1617 #if !defined(D3D_DISABLE_9EX)
1618 
1619 #define D3DUSAGE_TEXTAPI (0x10000000L)
1620 #define D3DUSAGE_RESTRICTED_CONTENT (0x00000800L)
1621 #define D3DUSAGE_RESTRICT_SHARED_RESOURCE (0x00002000L)
1622 #define D3DUSAGE_RESTRICT_SHARED_RESOURCE_DRIVER (0x00001000L)
1623 
1624 #endif // !D3D_DISABLE_9EX
1625 /* -- D3D9Ex only */
1626 
1627 
1628 
1629 
1630 
1631 
1632 
1633 
1634 
1635 
1636 
1637 
1638 
1639 
1640 
1641 
1642 /* CubeMap Face identifiers */
1643 typedef enum _D3DCUBEMAP_FACES
1644 {
1651 
1654 
1655 
1656 /* Lock flags */
1657 
1658 #define D3DLOCK_READONLY 0x00000010L
1659 #define D3DLOCK_DISCARD 0x00002000L
1660 #define D3DLOCK_NOOVERWRITE 0x00001000L
1661 #define D3DLOCK_NOSYSLOCK 0x00000800L
1662 #define D3DLOCK_DONOTWAIT 0x00004000L
1663 
1664 #define D3DLOCK_NO_DIRTY_UPDATE 0x00008000L
1665 
1666 
1667 
1668 
1669 
1670 
1671 
1672 /* Vertex Buffer Description */
1674 {
1680 
1682 
1684 
1685 /* Index Buffer Description */
1686 typedef struct _D3DINDEXBUFFER_DESC
1687 {
1694 
1695 
1696 /* Surface Description */
1697 typedef struct _D3DSURFACE_DESC
1698 {
1703 
1708 } D3DSURFACE_DESC;
1709 
1710 typedef struct _D3DVOLUME_DESC
1711 {
1716 
1720 } D3DVOLUME_DESC;
1721 
1722 /* Structure for LockRect */
1723 typedef struct _D3DLOCKED_RECT
1724 {
1726  void* pBits;
1727 } D3DLOCKED_RECT;
1728 
1729 /* Structures for LockBox */
1730 typedef struct _D3DBOX
1731 {
1738 } D3DBOX;
1739 
1740 typedef struct _D3DLOCKED_BOX
1741 {
1744  void* pBits;
1745 } D3DLOCKED_BOX;
1746 
1747 /* Structures for LockRange */
1748 typedef struct _D3DRANGE
1749 {
1752 } D3DRANGE;
1753 
1754 /* Structures for high order primitives */
1755 typedef struct _D3DRECTPATCH_INFO
1756 {
1765 
1766 typedef struct _D3DTRIPATCH_INFO
1767 {
1773 
1774 /* Adapter Identifier */
1775 
1776 #define MAX_DEVICE_IDENTIFIER_STRING 512
1778 {
1781  char DeviceName[32]; /* Device name for GDI (ex. \\.\DISPLAY1) */
1782 
1783 #ifdef _WIN32
1784  LARGE_INTEGER DriverVersion; /* Defined for 32 bit components */
1785 #else
1786  DWORD DriverVersionLowPart; /* Defined for 16 bit driver components */
1788 #endif
1789 
1794 
1796 
1798 
1800 
1801 
1802 /* Raster Status structure returned by GetRasterStatus */
1803 typedef struct _D3DRASTER_STATUS
1804 {
1808 
1809 
1810 
1811 /* Debug monitor tokens (DEBUG only)
1812 
1813  Note that if D3DRS_DEBUGMONITORTOKEN is set, the call is treated as
1814  passing a token to the debug monitor. For example, if, after passing
1815  D3DDMT_ENABLE/DISABLE to D3DRS_DEBUGMONITORTOKEN other token values
1816  are passed in, the enabled/disabled state of the debug
1817  monitor will still persist.
1818 
1819  The debug monitor defaults to enabled.
1820 
1821  Calling GetRenderState on D3DRS_DEBUGMONITORTOKEN is not of any use.
1822 */
1824  D3DDMT_ENABLE = 0, // enable debug monitor
1825  D3DDMT_DISABLE = 1, // disable debug monitor
1826  D3DDMT_FORCE_DWORD = 0x7fffffff,
1828 
1829 // Async feedback
1830 
1831 typedef enum _D3DQUERYTYPE {
1832  D3DQUERYTYPE_VCACHE = 4, /* D3DISSUE_END */
1833  D3DQUERYTYPE_RESOURCEMANAGER = 5, /* D3DISSUE_END */
1834  D3DQUERYTYPE_VERTEXSTATS = 6, /* D3DISSUE_END */
1835  D3DQUERYTYPE_EVENT = 8, /* D3DISSUE_END */
1836  D3DQUERYTYPE_OCCLUSION = 9, /* D3DISSUE_BEGIN, D3DISSUE_END */
1837  D3DQUERYTYPE_TIMESTAMP = 10, /* D3DISSUE_END */
1838  D3DQUERYTYPE_TIMESTAMPDISJOINT = 11, /* D3DISSUE_BEGIN, D3DISSUE_END */
1839  D3DQUERYTYPE_TIMESTAMPFREQ = 12, /* D3DISSUE_END */
1840  D3DQUERYTYPE_PIPELINETIMINGS = 13, /* D3DISSUE_BEGIN, D3DISSUE_END */
1841  D3DQUERYTYPE_INTERFACETIMINGS = 14, /* D3DISSUE_BEGIN, D3DISSUE_END */
1842  D3DQUERYTYPE_VERTEXTIMINGS = 15, /* D3DISSUE_BEGIN, D3DISSUE_END */
1843  D3DQUERYTYPE_PIXELTIMINGS = 16, /* D3DISSUE_BEGIN, D3DISSUE_END */
1844  D3DQUERYTYPE_BANDWIDTHTIMINGS = 17, /* D3DISSUE_BEGIN, D3DISSUE_END */
1845  D3DQUERYTYPE_CACHEUTILIZATION = 18, /* D3DISSUE_BEGIN, D3DISSUE_END */
1846 /* D3D9Ex only -- */
1847 #if !defined(D3D_DISABLE_9EX)
1848  D3DQUERYTYPE_MEMORYPRESSURE = 19, /* D3DISSUE_BEGIN, D3DISSUE_END */
1849 #endif // !D3D_DISABLE_9EX
1850 } D3DQUERYTYPE;
1851 
1852 // Flags field for Issue
1853 #define D3DISSUE_END (1 << 0) // Tells the runtime to issue the end of a query, changing it's state to "non-signaled".
1854 #define D3DISSUE_BEGIN (1 << 1) // Tells the runtime to issue the beginng of a query.
1855 
1856 
1857 // Flags field for GetData
1858 #define D3DGETDATA_FLUSH (1 << 0) // Tells the runtime to flush if the query is outstanding.
1859 
1860 
1861 typedef struct _D3DRESOURCESTATS
1862 {
1863 // Data collected since last Present()
1864  BOOL bThrashing; /* indicates if thrashing */
1865  DWORD ApproxBytesDownloaded; /* Approximate number of bytes downloaded by resource manager */
1866  DWORD NumEvicts; /* number of objects evicted */
1867  DWORD NumVidCreates; /* number of objects created in video memory */
1868  DWORD LastPri; /* priority of last object evicted */
1869  DWORD NumUsed; /* number of objects set to the device */
1870  DWORD NumUsedInVidMem; /* number of objects set to the device, which are already in video memory */
1871 // Persistent data
1872  DWORD WorkingSet; /* number of objects in video memory */
1873  DWORD WorkingSetBytes; /* number of bytes in video memory */
1874  DWORD TotalManaged; /* total number of managed objects */
1875  DWORD TotalBytes; /* total number of bytes of managed objects */
1877 
1878 #define D3DRTYPECOUNT (D3DRTYPE_INDEXBUFFER+1)
1879 
1881 {
1882 #ifndef WOW64_ENUM_WORKAROUND
1884 #else
1886 #endif
1888 
1890 {
1891  DWORD NumRenderedTriangles; /* total number of triangles that are not clipped in this frame */
1892  DWORD NumExtraClippingTriangles; /* Number of new triangles generated by clipping */
1894 
1895 
1896 typedef struct _D3DDEVINFO_VCACHE {
1897  DWORD Pattern; /* bit pattern, return value must be FOUR_CC('C', 'A', 'C', 'H') */
1898  DWORD OptMethod; /* optimization method 0 means longest strips, 1 means vertex cache based */
1899  DWORD CacheSize; /* cache size to optimize for (only required if type is 1) */
1900  DWORD MagicNumber; /* used to determine when to restart strips (only required if type is 1)*/
1902 
1904 {
1910 
1912 {
1919 
1921 {
1925 
1927 {
1934 
1936 {
1937  FLOAT TextureCacheHitRate; // Percentage of cache hits
1940 
1941 /* D3D9Ex only -- */
1942 #if !defined(D3D_DISABLE_9EX)
1943 
1944 typedef struct _D3DMEMORYPRESSURE
1945 {
1950 
1951 typedef enum _D3DCOMPOSERECTSOP{
1956  D3DCOMPOSERECTS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
1958 
1959 typedef struct _D3DCOMPOSERECTDESC
1960 {
1961  USHORT X, Y; // Top-left coordinates of a rect in the source surface
1962  USHORT Width, Height; // Dimensions of the rect
1964 
1966 {
1967  USHORT SrcRectIndex; // Index of D3DCOMPOSERECTDESC
1968  USHORT Reserved; // For alignment
1969  SHORT X, Y; // Top-left coordinates of the rect in the destination surface
1971 
1972 #define D3DCOMPOSERECTS_MAXNUMRECTS 0xFFFF
1973 #define D3DCONVOLUTIONMONO_MAXWIDTH 7
1974 #define D3DCONVOLUTIONMONO_MAXHEIGHT D3DCONVOLUTIONMONO_MAXWIDTH
1975 #define D3DFMT_A1_SURFACE_MAXWIDTH 8192
1976 #define D3DFMT_A1_SURFACE_MAXHEIGHT 2048
1977 
1978 
1979 typedef struct _D3DPRESENTSTATS {
1983  LARGE_INTEGER SyncQPCTime;
1984  LARGE_INTEGER SyncGPUTime;
1985 } D3DPRESENTSTATS;
1986 
1988 {
1993 
1994 
1995 typedef struct D3DDISPLAYMODEEX
1996 {
2004 
2005 typedef struct D3DDISPLAYMODEFILTER
2006 {
2011 
2012 
2014 {
2015  D3DDISPLAYROTATION_IDENTITY = 1, // No rotation.
2016  D3DDISPLAYROTATION_90 = 2, // Rotated 90 degrees.
2017  D3DDISPLAYROTATION_180 = 3, // Rotated 180 degrees.
2018  D3DDISPLAYROTATION_270 = 4 // Rotated 270 degrees.
2020 
2021 /* For use in ID3DResource9::SetPriority calls */
2022 #define D3D9_RESOURCE_PRIORITY_MINIMUM 0x28000000
2023 #define D3D9_RESOURCE_PRIORITY_LOW 0x50000000
2024 #define D3D9_RESOURCE_PRIORITY_NORMAL 0x78000000
2025 #define D3D9_RESOURCE_PRIORITY_HIGH 0xa0000000
2026 #define D3D9_RESOURCE_PRIORITY_MAXIMUM 0xc8000000
2027 
2028 #define D3D_OMAC_SIZE 16
2029 
2030 typedef struct _D3D_OMAC
2031 {
2033 } D3D_OMAC;
2034 
2036 {
2041 
2043 {
2048 
2050 {
2057 
2058 DEFINE_GUID(D3DAUTHENTICATEDQUERY_PROTECTION,
2059 0xa84eb584, 0xc495, 0x48aa, 0xb9, 0x4d, 0x8b, 0xd2, 0xd6, 0xfb, 0xce, 0x5);
2060 
2062 {
2063  union
2064  {
2065  struct
2066  {
2070  };
2072  };
2073 
2075 
2077 {
2079 
2081 
2083 
2084 
2085 DEFINE_GUID(D3DAUTHENTICATEDQUERY_CHANNELTYPE,
2086 0xbc1b18a5, 0xb1fb, 0x42ab, 0xbd, 0x94, 0xb5, 0x82, 0x8b, 0x4b, 0xf7, 0xbe);
2087 
2089 {
2091 
2093 
2095 
2096 
2097 DEFINE_GUID(D3DAUTHENTICATEDQUERY_DEVICEHANDLE,
2098 0xec1c539d, 0x8cff, 0x4e2a, 0xbc, 0xc4, 0xf5, 0x69, 0x2f, 0x99, 0xf4, 0x80);
2099 
2101 {
2103 
2105 
2107 
2108 
2109 DEFINE_GUID(D3DAUTHENTICATEDQUERY_CRYPTOSESSION,
2110 0x2634499e, 0xd018, 0x4d74, 0xac, 0x17, 0x7f, 0x72, 0x40, 0x59, 0x52, 0x8d);
2111 
2113 {
2115 
2117 
2119 
2121 {
2123 
2127 
2129 
2130 
2131 DEFINE_GUID(D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESSCOUNT,
2132 0xdb207b3, 0x9450, 0x46a6, 0x82, 0xde, 0x1b, 0x96, 0xd4, 0x4f, 0x9c, 0xf2);
2133 
2135 {
2137 
2139 
2141 
2142 
2143 DEFINE_GUID(D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESS,
2144 0x649bbadb, 0xf0f4, 0x4639, 0xa1, 0x5b, 0x24, 0x39, 0x3f, 0xc3, 0xab, 0xac);
2145 
2147 {
2149 
2151 
2153 
2155 {
2160 
2162 {
2164 
2168 
2170 
2171 
2172 DEFINE_GUID(D3DAUTHENTICATEDQUERY_UNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT,
2173 0x12f0bd6, 0xe662, 0x4474, 0xbe, 0xfd, 0xaa, 0x53, 0xe5, 0x14, 0x3c, 0x6d);
2174 
2176 {
2178 
2180 
2182 
2183 
2184 DEFINE_GUID(D3DAUTHENTICATEDQUERY_OUTPUTIDCOUNT,
2185 0x2c042b5e, 0x8c07, 0x46d5, 0xaa, 0xbe, 0x8f, 0x75, 0xcb, 0xad, 0x4c, 0x31);
2186 
2188 {
2190 
2193 
2195 
2197 {
2199 
2203 
2205 
2206 
2207 DEFINE_GUID(D3DAUTHENTICATEDQUERY_OUTPUTID,
2208 0x839ddca3, 0x9b4e, 0x41e4, 0xb0, 0x53, 0x89, 0x2b, 0xd2, 0xa1, 0x1e, 0xe7);
2209 
2211 {
2213 
2217 
2219 
2221 {
2223 
2227  UINT64 OutputID;
2228 
2230 
2231 
2232 DEFINE_GUID(D3DAUTHENTICATEDQUERY_ACCESSIBILITYATTRIBUTES,
2233 0x6214d9d2, 0x432c, 0x4abb, 0x9f, 0xce, 0x21, 0x6e, 0xea, 0x26, 0x9e, 0x3b);
2234 
2235 typedef enum _D3DBUSTYPE
2236 {
2237  D3DBUSTYPE_OTHER = 0x00000000,
2238  D3DBUSTYPE_PCI = 0x00000001,
2239  D3DBUSTYPE_PCIX = 0x00000002,
2241  D3DBUSTYPE_AGP = 0x00000004,
2248 } D3DBUSTYPE;
2249 
2251 {
2253 
2257 
2259 
2260 
2261 DEFINE_GUID(D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUIDCOUNT,
2262 0xb30f7066, 0x203c, 0x4b07, 0x93, 0xfc, 0xce, 0xaa, 0xfd, 0x61, 0x24, 0x1e);
2263 
2265 {
2267 
2269 
2271 
2272 
2273 DEFINE_GUID(D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUID,
2274 0xf83a5958, 0xe986, 0x4bda, 0xbe, 0xb0, 0x41, 0x1f, 0x6a, 0x7a, 0x1, 0xb7);
2275 
2277 {
2279 
2281 
2283 
2285 {
2287 
2290 
2292 
2293 
2294 DEFINE_GUID(D3DAUTHENTICATEDQUERY_CURRENTENCRYPTIONWHENACCESSIBLE,
2295 0xec1791c7, 0xdad3, 0x4f15, 0x9e, 0xc3, 0xfa, 0xa9, 0x3d, 0x60, 0xd4, 0xf0);
2296 
2298 {
2300 
2302 
2304 
2305 
2307 {
2312 
2314 
2316 {
2322 
2324 
2325 DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_INITIALIZE,
2326 0x6114bdb, 0x3523, 0x470a, 0x8d, 0xca, 0xfb, 0xc2, 0x84, 0x51, 0x54, 0xf0);
2327 
2329 {
2331 
2334 
2336 
2337 
2338 DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_PROTECTION,
2339 0x50455658, 0x3f47, 0x4362, 0xbf, 0x99, 0xbf, 0xdf, 0xcd, 0xe9, 0xed, 0x29);
2340 
2342 {
2344 
2346 
2348 
2349 
2350 DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_CRYPTOSESSION,
2351 0x6346cc54, 0x2cfc, 0x4ad4, 0x82, 0x24, 0xd1, 0x58, 0x37, 0xde, 0x77, 0x0);
2352 
2354 {
2356 
2360 
2362 
2363 
2364 DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_SHAREDRESOURCE,
2365 0x772d047, 0x1b40, 0x48e8, 0x9c, 0xa6, 0xb5, 0xf5, 0x10, 0xde, 0x9f, 0x1);
2366 
2368 {
2370 
2374 
2376 
2377 
2378 DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_ENCRYPTIONWHENACCESSIBLE,
2379 0x41fff286, 0x6ae0, 0x4d43, 0x9d, 0x55, 0xa4, 0x6e, 0x9e, 0xfd, 0x15, 0x8a);
2380 
2382 {
2384 
2386 
2388 
2390 {
2395 
2396 typedef struct _D3DAES_CTR_IV
2397 {
2398  UINT64 IV; // Big-Endian IV
2399  UINT64 Count; // Big-Endian Block Count
2400 } D3DAES_CTR_IV;
2401 
2402 
2403 
2404 #endif // !D3D_DISABLE_9EX
2405 /* -- D3D9Ex only */
2406 
2407 #pragma pack()
2408 #if _MSC_VER >= 1200
2409 #pragma warning(pop)
2410 #else
2411 #pragma warning(default:4201)
2412 #endif
2413 
2414 #endif /* (DIRECT3D_VERSION >= 0x0900) */
2415 #endif /* _d3d9TYPES(P)_H_ */
2416 
_D3DVS_ADDRESSMODE_TYPE
Definition: d3d9types.h:1054
float _13
Definition: d3d9types.h:83
_D3DMULTISAMPLE_TYPE
Definition: d3d9types.h:1275
float Attenuation1
Definition: d3d9types.h:180
struct _D3DVECTOR D3DVECTOR
D3DFORMAT AutoDepthStencilFormat
Definition: d3d9types.h:1516
D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters
Definition: d3d9types.h:2383
D3DCOLORVALUE Ambient
Definition: d3d9types.h:157
_D3DVS_RASTOUT_OFFSETS
Definition: d3d9types.h:1041
_D3DPOOL
Definition: d3d9types.h:1487
_D3DSHADER_PARAM_SRCMOD_TYPE
Definition: d3d9types.h:1148
float Phi
Definition: d3d9types.h:183
_D3DSWAPEFFECT
Definition: d3d9types.h:1470
enum _D3DBUSTYPE D3DBUSTYPE
struct _D3DVERTEXBUFFER_DESC D3DVERTEXBUFFER_DESC
struct D3DDISPLAYMODEFILTER D3DDISPLAYMODEFILTER
struct _D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT
D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE ProcessIdentiferType
Definition: d3d9types.h:2371
D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output
Definition: d3d9types.h:2090
struct _D3DDEVINFO_D3D9BANDWIDTHTIMINGS D3DDEVINFO_D3D9BANDWIDTHTIMINGS
struct _D3DRECT D3DRECT
D3DBASISTYPE Basis
Definition: d3d9types.h:1770
D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output
Definition: d3d9types.h:2102
D3DSWAPEFFECT SwapEffect
Definition: d3d9types.h:1512
D3DFORMAT BackBufferFormat
Definition: d3d9types.h:1506
float _33
Definition: d3d9types.h:85
_D3DBUSTYPE
Definition: d3d9types.h:2235
struct _D3DRASTER_STATUS D3DRASTER_STATUS
struct _D3D_OMAC D3D_OMAC
_D3DBACKBUFFER_TYPE
Definition: d3d9types.h:1555
D3DSCANLINEORDERING ScanLineOrdering
Definition: d3d9types.h:2002
typedef INT(WINAPI *PFNWGLGETGPUINFOAMDPROC)(UINT id
UINT PresentRefreshCount
Definition: d3d9types.h:1981
struct _D3DTRIPATCH_INFO D3DTRIPATCH_INFO
struct _D3DLOCKED_BOX D3DLOCKED_BOX
_D3DSHADER_PARAM_REGISTER_TYPE
Definition: d3d9types.h:1000
struct _D3DBOX D3DBOX
struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_INPUT D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_INPUT
UINT64 BytesEvictedFromProcess
Definition: d3d9types.h:1946
D3DFORMAT Format
Definition: d3d9types.h:1699
D3DSCANLINEORDERING
Definition: d3d9types.h:1987
UINT StartVertexOffsetWidth
Definition: d3d9types.h:1757
enum _D3DCMPFUNC D3DCMPFUNC
enum _D3DFOGMODE D3DFOGMODE
typedef HRESULT(WINAPI *LPD3DXIMTSIGNALCALLBACK)(CONST D3DXVECTOR2 *uv
_D3DBLENDOP
Definition: d3d9types.h:238
enum _D3DLIGHTTYPE D3DLIGHTTYPE
_D3DLIGHTTYPE
Definition: d3d9types.h:163
float _24
Definition: d3d9types.h:84
DWORD Height
Definition: d3d9types.h:99
float _42
Definition: d3d9types.h:86
D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output
Definition: d3d9types.h:2122
struct _D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_INPUT D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_INPUT
struct _D3DAUTHENTICATEDCHANNEL_QUERYINFOBUSTYPE_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYINFOBUSTYPE_OUTPUT
enum _D3DSHADER_ADDRESSMODE_TYPE D3DSHADER_ADDRESSMODE_TYPE
D3DVECTOR Position
Definition: d3d9types.h:175
enum _D3DPRIMITIVETYPE D3DPRIMITIVETYPE
struct _D3DPRESENTSTATS D3DPRESENTSTATS
enum _D3DBLEND D3DBLEND
struct _D3DAES_CTR_IV D3DAES_CTR_IV
enum _D3DFILLMODE D3DFILLMODE
struct _D3DDEVINFO_D3DVERTEXSTATS D3DDEVINFO_D3DVERTEXSTATS
struct _D3DDEVICE_CREATION_PARAMETERS D3DDEVICE_CREATION_PARAMETERS
enum _D3DBLENDOP D3DBLENDOP
enum _D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE
_D3DDECLUSAGE
Definition: d3d9types.h:695
_D3DDEGREETYPE
Definition: d3d9types.h:1200
_D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE
Definition: d3d9types.h:2154
enum _D3DSHADER_MISCTYPE_OFFSETS D3DSHADER_MISCTYPE_OFFSETS
enum _D3DSHADER_INSTRUCTION_OPCODE_TYPE D3DSHADER_INSTRUCTION_OPCODE_TYPE
struct _D3DVERTEXELEMENT9 D3DVERTEXELEMENT9
enum _D3DSHADEMODE D3DSHADEMODE
struct _D3DAUTHENTICATEDCHANNEL_CONFIGUREINITIALIZE D3DAUTHENTICATEDCHANNEL_CONFIGUREINITIALIZE
UINT64 SizeOfInefficientAllocation
Definition: d3d9types.h:1947
float Theta
Definition: d3d9types.h:182
enum _D3DSAMPLER_TEXTURE_TYPE D3DSAMPLER_TEXTURE_TYPE
struct _D3DADAPTER_IDENTIFIER9 D3DADAPTER_IDENTIFIER9
struct _D3DGAMMARAMP D3DGAMMARAMP
_D3DTEXTURESTAGESTATETYPE
Definition: d3d9types.h:478
enum _D3DTEXTUREOP D3DTEXTUREOP
float Range
Definition: d3d9types.h:177
struct _D3DAUTHENTICATEDCHANNEL_QUERYUNCOMPRESSEDENCRYPTIONLEVEL_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYUNCOMPRESSEDENCRYPTIONLEVEL_OUTPUT
D3DRESOURCETYPE Type
Definition: d3d9types.h:1689
D3DAUTHENTICATEDCHANNEL_QUERY_INPUT Input
Definition: d3d9types.h:2212
D3DRESOURCETYPE Type
Definition: d3d9types.h:1676
enum _D3DZBUFFERTYPE D3DZBUFFERTYPE
GLclampf green
Definition: glew.h:1506
_D3DCMPFUNC
Definition: d3d9types.h:263
_D3DTEXTUREFILTERTYPE
Definition: d3d9types.h:628
float _14
Definition: d3d9types.h:83
D3DCOLORVALUE Specular
Definition: d3d9types.h:173
D3DAUTHENTICATEDCHANNEL_QUERY_INPUT Input
Definition: d3d9types.h:2114
typedef UINT(WINAPI *PFNWGLGETCONTEXTGPUIDAMDPROC)(HGLRC hglrc)
D3DCOLORVALUE Specular
Definition: d3d9types.h:158
LONG y2
Definition: d3d9types.h:74
struct _D3DDEVINFO_VCACHE D3DDEVINFO_VCACHE
#define D3DSP_TEXTURETYPE_SHIFT
Definition: d3d9types.h:951
struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_INPUT D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_INPUT
struct _D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_OUTPUT
enum _D3DCUBEMAP_FACES D3DCUBEMAP_FACES
_D3DCULL
Definition: d3d9types.h:256
float _43
Definition: d3d9types.h:86
_D3DDEBUGMONITORTOKENS
Definition: d3d9types.h:1823
struct _D3DSURFACE_DESC D3DSURFACE_DESC
_D3DRENDERSTATETYPE
Definition: d3d9types.h:333
_D3DTEXTURETRANSFORMFLAGS
Definition: d3d9types.h:1237
_D3DSTENCILOP
Definition: d3d9types.h:275
UINT Bottom
Definition: d3d9types.h:1735
_D3DTEXTUREOP
Definition: d3d9types.h:551
D3DVECTOR Direction
Definition: d3d9types.h:176
struct _D3DDEVINFO_D3D9STAGETIMINGS D3DDEVINFO_D3D9STAGETIMINGS
float _34
Definition: d3d9types.h:85
struct _D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUTPUT
enum _D3DSWAPEFFECT D3DSWAPEFFECT
_D3DSHADER_INSTRUCTION_OPCODE_TYPE
Definition: d3d9types.h:802
enum _D3DDECLUSAGE D3DDECLUSAGE
struct _D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT
char Driver[MAX_DEVICE_IDENTIFIER_STRING]
Definition: d3d9types.h:1779
_D3DFILLMODE
Definition: d3d9types.h:204
enum _D3DSHADER_PARAM_REGISTER_TYPE D3DSHADER_PARAM_REGISTER_TYPE
_D3DBASISTYPE
Definition: d3d9types.h:1192
_D3DMATERIALCOLORSOURCE
Definition: d3d9types.h:446
struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT
struct _D3DAUTHENTICATEDCHANNEL_QUERY_INPUT D3DAUTHENTICATEDCHANNEL_QUERY_INPUT
_D3DBLEND
Definition: d3d9types.h:211
_D3DCOMPOSERECTSOP
Definition: d3d9types.h:1951
float _11
Definition: d3d9types.h:83
enum _D3DRESOURCETYPE D3DRESOURCETYPE
UINT Right
Definition: d3d9types.h:1734
_D3DDECLMETHOD
Definition: d3d9types.h:717
enum _D3DFORMAT D3DFORMAT
_D3DDECLTYPE
Definition: d3d9types.h:732
_D3DRESOURCETYPE
Definition: d3d9types.h:1566
_D3DDEVTYPE
Definition: d3d9types.h:1263
D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters
Definition: d3d9types.h:2343
DWORD ApproxBytesDownloaded
Definition: d3d9types.h:1865
_D3DPRIMITIVETYPE
Definition: d3d9types.h:303
typedef HANDLE(WINAPI *PFNWGLCREATEBUFFERREGIONARBPROC)(HDC hDC
float y
Definition: d3d9types.h:53
enum _D3DDEVTYPE D3DDEVTYPE
float _22
Definition: d3d9types.h:84
D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters
Definition: d3d9types.h:2330
D3DDEGREETYPE Degree
Definition: d3d9types.h:1771
D3DRESOURCETYPE Type
Definition: d3d9types.h:1713
enum _D3DDECLTYPE D3DDECLTYPE
_D3DZBUFFERTYPE
Definition: d3d9types.h:295
struct _D3DVOLUME_DESC D3DVOLUME_DESC
_D3DTEXTUREADDRESS
Definition: d3d9types.h:247
struct _D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_OUTPUT
float _12
Definition: d3d9types.h:83
enum _D3DSHADER_COMPARISON D3DSHADER_COMPARISON
UINT Offset
Definition: d3d9types.h:1750
enum _D3DAUTHENTICATEDCHANNELTYPE D3DAUTHENTICATEDCHANNELTYPE
D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output
Definition: d3d9types.h:2198
struct _D3DAUTHENTICATEDCHANNEL_CONFIGUREPROTECTION D3DAUTHENTICATEDCHANNEL_CONFIGUREPROTECTION
_D3DSAMPLERSTATETYPE
Definition: d3d9types.h:506
struct _D3DDEVINFO_RESOURCEMANAGER * LPD3DDEVINFO_RESOURCEMANAGER
LONG x1
Definition: d3d9types.h:71
struct _D3DVIEWPORT9 D3DVIEWPORT9
float _21
Definition: d3d9types.h:84
D3DCOLORVALUE Diffuse
Definition: d3d9types.h:156
_D3DQUERYTYPE
Definition: d3d9types.h:1831
#define D3DVS_ADDRESSMODE_SHIFT
Definition: d3d9types.h:1051
enum _D3DCULL D3DCULL
struct _D3DAUTHENTICATEDCHANNEL_CONFIGURECRYPTOSESSION D3DAUTHENTICATEDCHANNEL_CONFIGURECRYPTOSESSION
struct _D3DLOCKED_RECT D3DLOCKED_RECT
DWORD D3DCOLOR
Definition: d3d9types.h:32
struct _D3DDEVINFO_VCACHE * LPD3DDEVINFO_VCACHE
enum _D3DTEXTUREFILTERTYPE D3DTEXTUREFILTERTYPE
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_PCM, 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
enum _D3DSHADER_PARAM_SRCMOD_TYPE D3DSHADER_PARAM_SRCMOD_TYPE
D3DCOLORVALUE Ambient
Definition: d3d9types.h:174
_D3DFOGMODE
Definition: d3d9types.h:287
enum _D3DSTATEBLOCKTYPE D3DSTATEBLOCKTYPE
_D3DSAMPLER_TEXTURE_TYPE
Definition: d3d9types.h:954
enum _D3DDEBUGMONITORTOKENS D3DDEBUGMONITORTOKENS
enum _D3DDEGREETYPE D3DDEGREETYPE
float _31
Definition: d3d9types.h:85
D3DFORMAT Format
Definition: d3d9types.h:2001
WORD red[256]
Definition: d3d9types.h:1549
struct _D3DMATERIAL9 D3DMATERIAL9
enum _D3DPOOL D3DPOOL
D3DSCANLINEORDERING ScanLineOrdering
Definition: d3d9types.h:2009
struct _D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT
enum _D3DTEXTURESTAGESTATETYPE D3DTEXTURESTAGESTATETYPE
char Description[MAX_DEVICE_IDENTIFIER_STRING]
Definition: d3d9types.h:1780
_D3DSHADER_COMPARISON
Definition: d3d9types.h:919
float z
Definition: d3d9types.h:54
_D3DTRANSFORMSTATETYPE
Definition: d3d9types.h:313
D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output
Definition: d3d9types.h:2222
enum _D3DSAMPLERSTATETYPE D3DSAMPLERSTATETYPE
struct _D3DRESOURCESTATS D3DRESOURCESTATS
enum _D3DMATERIALCOLORSOURCE D3DMATERIALCOLORSOURCE
D3DDISPLAYROTATION
Definition: d3d9types.h:2013
D3DLIGHTTYPE Type
Definition: d3d9types.h:171
UINT StartVertexOffsetHeight
Definition: d3d9types.h:1758
struct _D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_INPUT D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_INPUT
LONG y1
Definition: d3d9types.h:72
GLuint GLfloat GLfloat GLfloat x1
Definition: glew.h:11582
float _41
Definition: d3d9types.h:86
_D3DAUTHENTICATEDCHANNELTYPE
Definition: d3d9types.h:2035
float x
Definition: d3d9types.h:52
GLuint GLfloat x0
Definition: glew.h:11582
enum _D3DSTENCILOP D3DSTENCILOP
D3DRESOURCESTATS stats[D3DRTYPECOUNT]
Definition: d3d9types.h:1883
DWORD ClipIntersection
Definition: d3d9types.h:152
struct _D3DCLIPSTATUS9 D3DCLIPSTATUS9
D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output
Definition: d3d9types.h:2252
_D3DCUBEMAP_FACES
Definition: d3d9types.h:1643
enum _D3DBACKBUFFER_TYPE D3DBACKBUFFER_TYPE
D3DCOLORVALUE Emissive
Definition: d3d9types.h:159
_D3DSHADEMODE
Definition: d3d9types.h:197
struct _D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE
enum _D3DVERTEXBLENDFLAGS D3DVERTEXBLENDFLAGS
enum _D3DTRANSFORMSTATETYPE D3DTRANSFORMSTATETYPE
enum _D3DDECLMETHOD D3DDECLMETHOD
enum _D3DPATCHEDGESTYLE D3DPATCHEDGESTYLE
D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE ProcessIdentifer
Definition: d3d9types.h:2166
BYTE Omac[D3D_OMAC_SIZE]
Definition: d3d9types.h:2032
D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters
Definition: d3d9types.h:2355
struct _D3DLIGHT9 D3DLIGHT9
struct _D3DCOLORVALUE D3DCOLORVALUE
struct _D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESSCOUNT_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESSCOUNT_OUTPUT
struct _D3DRANGE D3DRANGE
UINT Top
Definition: d3d9types.h:1733
struct _D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT
UINT Front
Definition: d3d9types.h:1736
D3DMULTISAMPLE_TYPE MultiSampleType
Definition: d3d9types.h:1509
struct _D3DRECTPATCH_INFO D3DRECTPATCH_INFO
enum _D3DBASISTYPE D3DBASISTYPE
struct _D3DENCRYPTED_BLOCK_INFO D3DENCRYPTED_BLOCK_INFO
typedef DWORD(WINAPI *XInputGetState_t)(DWORD dwUserIndex
enum _D3DVS_ADDRESSMODE_TYPE D3DVS_ADDRESSMODE_TYPE
LARGE_INTEGER SyncQPCTime
Definition: d3d9types.h:1983
LARGE_INTEGER SyncGPUTime
Definition: d3d9types.h:1984
struct _D3DDEVINFO_D3D9PIPELINETIMINGS D3DDEVINFO_D3D9PIPELINETIMINGS
_D3DFORMAT
Definition: d3d9types.h:1338
float _23
Definition: d3d9types.h:84
LONG x2
Definition: d3d9types.h:73
struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT
struct _D3DMEMORYPRESSURE D3DMEMORYPRESSURE
D3DRESOURCETYPE Type
Definition: d3d9types.h:1700
_D3DSTATEBLOCKTYPE
Definition: d3d9types.h:1216
struct D3DDISPLAYMODEEX D3DDISPLAYMODEEX
struct _D3DDEVINFO_D3DVERTEXSTATS * LPD3DDEVINFO_D3DVERTEXSTATS
struct _D3DDEVINFO_D3D9CACHEUTILIZATION D3DDEVINFO_D3D9CACHEUTILIZATION
struct _D3DAUTHENTICATEDCHANNEL_CONFIGUREUNCOMPRESSEDENCRYPTION D3DAUTHENTICATEDCHANNEL_CONFIGUREUNCOMPRESSEDENCRYPTION
UINT Size
Definition: d3d9types.h:1751
#define D3DSP_SRCMOD_SHIFT
Definition: d3d9types.h:1145
#define D3D_OMAC_SIZE
Definition: d3d9types.h:2028
float _44
Definition: d3d9types.h:86
enum _D3DTEXTUREADDRESS D3DTEXTUREADDRESS
D3DFORMAT Format
Definition: d3d9types.h:1456
float Falloff
Definition: d3d9types.h:178
struct _D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS
struct _D3DPRESENT_PARAMETERS_ D3DPRESENT_PARAMETERS
#define D3DSHADER_ADDRESSMODE_SHIFT
Definition: d3d9types.h:1061
enum _D3DRENDERSTATETYPE D3DRENDERSTATETYPE
struct _D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT
D3DDEGREETYPE Degree
Definition: d3d9types.h:1763
struct _D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT
struct _D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT
_D3DSHADER_MISCTYPE_OFFSETS
Definition: d3d9types.h:1033
struct _D3DCOMPOSERECTDESTINATION D3DCOMPOSERECTDESTINATION
struct _D3DDEVINFO_D3D9INTERFACETIMINGS D3DDEVINFO_D3D9INTERFACETIMINGS
struct _D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUIDCOUNT_OUTPUT D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUIDCOUNT_OUTPUT
FLOAT WaitingForGPUToUseApplicationResourceTimePercent
Definition: d3d9types.h:1913
enum _D3DVS_RASTOUT_OFFSETS D3DVS_RASTOUT_OFFSETS