1 /*==========================================================================; 2 * 3 * Copyright (C) Microsoft Corporation. All Rights Reserved. 4 * 5 * File: d3d9caps.h 6 * Content: Direct3D capabilities include file 7 * 8 ***************************************************************************/ 9 10 #ifndef _d3d9CAPS_H 11 #define _d3d9CAPS_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 21 22 #if defined(_X86_) || defined(_IA64_) 23 #pragma pack(4) 24 #endif 25 26 typedef struct _D3DVSHADERCAPS2_0 27 { 28 DWORD Caps; 29 INT DynamicFlowControlDepth; 30 INT NumTemps; 31 INT StaticFlowControlDepth; 32 } D3DVSHADERCAPS2_0; 33 34 #define D3DVS20CAPS_PREDICATION (1<<0) 35 36 #define D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH 24 37 #define D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH 0 38 #define D3DVS20_MAX_NUMTEMPS 32 39 #define D3DVS20_MIN_NUMTEMPS 12 40 #define D3DVS20_MAX_STATICFLOWCONTROLDEPTH 4 41 #define D3DVS20_MIN_STATICFLOWCONTROLDEPTH 1 42 43 typedef struct _D3DPSHADERCAPS2_0 44 { 45 DWORD Caps; 46 INT DynamicFlowControlDepth; 47 INT NumTemps; 48 INT StaticFlowControlDepth; 49 INT NumInstructionSlots; 50 } D3DPSHADERCAPS2_0; 51 52 #define D3DPS20CAPS_ARBITRARYSWIZZLE (1<<0) 53 #define D3DPS20CAPS_GRADIENTINSTRUCTIONS (1<<1) 54 #define D3DPS20CAPS_PREDICATION (1<<2) 55 #define D3DPS20CAPS_NODEPENDENTREADLIMIT (1<<3) 56 #define D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT (1<<4) 57 58 #define D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH 24 59 #define D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH 0 60 #define D3DPS20_MAX_NUMTEMPS 32 61 #define D3DPS20_MIN_NUMTEMPS 12 62 #define D3DPS20_MAX_STATICFLOWCONTROLDEPTH 4 63 #define D3DPS20_MIN_STATICFLOWCONTROLDEPTH 0 64 #define D3DPS20_MAX_NUMINSTRUCTIONSLOTS 512 65 #define D3DPS20_MIN_NUMINSTRUCTIONSLOTS 96 66 67 #define D3DMIN30SHADERINSTRUCTIONS 512 68 #define D3DMAX30SHADERINSTRUCTIONS 32768 69 70 /* D3D9Ex only -- */ 71 #if !defined(D3D_DISABLE_9EX) 72 73 typedef struct _D3DOVERLAYCAPS 74 { 75 UINT Caps; 76 UINT MaxOverlayDisplayWidth; 77 UINT MaxOverlayDisplayHeight; 78 } D3DOVERLAYCAPS; 79 80 #define D3DOVERLAYCAPS_FULLRANGERGB 0x00000001 81 #define D3DOVERLAYCAPS_LIMITEDRANGERGB 0x00000002 82 #define D3DOVERLAYCAPS_YCbCr_BT601 0x00000004 83 #define D3DOVERLAYCAPS_YCbCr_BT709 0x00000008 84 #define D3DOVERLAYCAPS_YCbCr_BT601_xvYCC 0x00000010 85 #define D3DOVERLAYCAPS_YCbCr_BT709_xvYCC 0x00000020 86 #define D3DOVERLAYCAPS_STRETCHX 0x00000040 87 #define D3DOVERLAYCAPS_STRETCHY 0x00000080 88 89 90 typedef struct _D3DCONTENTPROTECTIONCAPS 91 { 92 DWORD Caps; 93 GUID KeyExchangeType; 94 UINT BufferAlignmentStart; 95 UINT BlockAlignmentSize; 96 ULONGLONG ProtectedMemorySize; 97 } D3DCONTENTPROTECTIONCAPS; 98 99 #define D3DCPCAPS_SOFTWARE 0x00000001 100 #define D3DCPCAPS_HARDWARE 0x00000002 101 #define D3DCPCAPS_PROTECTIONALWAYSON 0x00000004 102 #define D3DCPCAPS_PARTIALDECRYPTION 0x00000008 103 #define D3DCPCAPS_CONTENTKEY 0x00000010 104 #define D3DCPCAPS_FRESHENSESSIONKEY 0x00000020 105 #define D3DCPCAPS_ENCRYPTEDREADBACK 0x00000040 106 #define D3DCPCAPS_ENCRYPTEDREADBACKKEY 0x00000080 107 #define D3DCPCAPS_SEQUENTIAL_CTR_IV 0x00000100 108 #define D3DCPCAPS_ENCRYPTSLICEDATAONLY 0x00000200 109 110 DEFINE_GUID(D3DCRYPTOTYPE_AES128_CTR, 111 0x9b6bd711, 0x4f74, 0x41c9, 0x9e, 0x7b, 0xb, 0xe2, 0xd7, 0xd9, 0x3b, 0x4f); 112 DEFINE_GUID(D3DCRYPTOTYPE_PROPRIETARY, 113 0xab4e9afd, 0x1d1c, 0x46e6, 0xa7, 0x2f, 0x8, 0x69, 0x91, 0x7b, 0xd, 0xe8); 114 115 DEFINE_GUID(D3DKEYEXCHANGE_RSAES_OAEP, 116 0xc1949895, 0xd72a, 0x4a1d, 0x8e, 0x5d, 0xed, 0x85, 0x7d, 0x17, 0x15, 0x20); 117 DEFINE_GUID(D3DKEYEXCHANGE_DXVA, 118 0x43d3775c, 0x38e5, 0x4924, 0x8d, 0x86, 0xd3, 0xfc, 0xcf, 0x15, 0x3e, 0x9b); 119 120 #endif // !D3D_DISABLE_9EX 121 /* -- D3D9Ex only */ 122 123 typedef struct _D3DCAPS9 124 { 125 /* Device Info */ 126 D3DDEVTYPE DeviceType; 127 UINT AdapterOrdinal; 128 129 /* Caps from DX7 Draw */ 130 DWORD Caps; 131 DWORD Caps2; 132 DWORD Caps3; 133 DWORD PresentationIntervals; 134 135 /* Cursor Caps */ 136 DWORD CursorCaps; 137 138 /* 3D Device Caps */ 139 DWORD DevCaps; 140 141 DWORD PrimitiveMiscCaps; 142 DWORD RasterCaps; 143 DWORD ZCmpCaps; 144 DWORD SrcBlendCaps; 145 DWORD DestBlendCaps; 146 DWORD AlphaCmpCaps; 147 DWORD ShadeCaps; 148 DWORD TextureCaps; 149 DWORD TextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture9's 150 DWORD CubeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DCubeTexture9's 151 DWORD VolumeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DVolumeTexture9's 152 DWORD TextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DTexture9's 153 DWORD VolumeTextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DVolumeTexture9's 154 155 DWORD LineCaps; // D3DLINECAPS 156 157 DWORD MaxTextureWidth, MaxTextureHeight; 158 DWORD MaxVolumeExtent; 159 160 DWORD MaxTextureRepeat; 161 DWORD MaxTextureAspectRatio; 162 DWORD MaxAnisotropy; 163 float MaxVertexW; 164 165 float GuardBandLeft; 166 float GuardBandTop; 167 float GuardBandRight; 168 float GuardBandBottom; 169 170 float ExtentsAdjust; 171 DWORD StencilCaps; 172 173 DWORD FVFCaps; 174 DWORD TextureOpCaps; 175 DWORD MaxTextureBlendStages; 176 DWORD MaxSimultaneousTextures; 177 178 DWORD VertexProcessingCaps; 179 DWORD MaxActiveLights; 180 DWORD MaxUserClipPlanes; 181 DWORD MaxVertexBlendMatrices; 182 DWORD MaxVertexBlendMatrixIndex; 183 184 float MaxPointSize; 185 186 DWORD MaxPrimitiveCount; // max number of primitives per DrawPrimitive call 187 DWORD MaxVertexIndex; 188 DWORD MaxStreams; 189 DWORD MaxStreamStride; // max stride for SetStreamSource 190 191 DWORD VertexShaderVersion; 192 DWORD MaxVertexShaderConst; // number of vertex shader constant registers 193 194 DWORD PixelShaderVersion; 195 float PixelShader1xMaxValue; // max value storable in registers of ps.1.x shaders 196 197 // Here are the DX9 specific ones 198 DWORD DevCaps2; 199 200 float MaxNpatchTessellationLevel; 201 DWORD Reserved5; 202 203 UINT MasterAdapterOrdinal; // ordinal of master adaptor for adapter group 204 UINT AdapterOrdinalInGroup; // ordinal inside the adapter group 205 UINT NumberOfAdaptersInGroup; // number of adapters in this adapter group (only if master) 206 DWORD DeclTypes; // Data types, supported in vertex declarations 207 DWORD NumSimultaneousRTs; // Will be at least 1 208 DWORD StretchRectFilterCaps; // Filter caps supported by StretchRect 209 D3DVSHADERCAPS2_0 VS20Caps; 210 D3DPSHADERCAPS2_0 PS20Caps; 211 DWORD VertexTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture9's for texture, used in vertex shaders 212 DWORD MaxVShaderInstructionsExecuted; // maximum number of vertex shader instructions that can be executed 213 DWORD MaxPShaderInstructionsExecuted; // maximum number of pixel shader instructions that can be executed 214 DWORD MaxVertexShader30InstructionSlots; 215 DWORD MaxPixelShader30InstructionSlots; 216 } D3DCAPS9; 217 218 // 219 // BIT DEFINES FOR D3DCAPS9 DWORD MEMBERS 220 // 221 222 // 223 // Caps 224 // 225 #define D3DCAPS_OVERLAY 0x00000800L 226 #define D3DCAPS_READ_SCANLINE 0x00020000L 227 228 // 229 // Caps2 230 // 231 #define D3DCAPS2_FULLSCREENGAMMA 0x00020000L 232 #define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000L 233 #define D3DCAPS2_RESERVED 0x02000000L 234 #define D3DCAPS2_CANMANAGERESOURCE 0x10000000L 235 #define D3DCAPS2_DYNAMICTEXTURES 0x20000000L 236 #define D3DCAPS2_CANAUTOGENMIPMAP 0x40000000L 237 238 /* D3D9Ex only -- */ 239 #if !defined(D3D_DISABLE_9EX) 240 241 #define D3DCAPS2_CANSHARERESOURCE 0x80000000L 242 243 #endif // !D3D_DISABLE_9EX 244 /* -- D3D9Ex only */ 245 246 // 247 // Caps3 248 // 249 #define D3DCAPS3_RESERVED 0x8000001fL 250 251 // Indicates that the device can respect the ALPHABLENDENABLE render state 252 // when fullscreen while using the FLIP or DISCARD swap effect. 253 // COPY and COPYVSYNC swap effects work whether or not this flag is set. 254 #define D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD 0x00000020L 255 256 // Indicates that the device can perform a gamma correction from 257 // a windowed back buffer containing linear content to the sRGB desktop. 258 #define D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION 0x00000080L 259 260 #define D3DCAPS3_COPY_TO_VIDMEM 0x00000100L /* Device can acclerate copies from sysmem to local vidmem */ 261 #define D3DCAPS3_COPY_TO_SYSTEMMEM 0x00000200L /* Device can acclerate copies from local vidmem to sysmem */ 262 #define D3DCAPS3_DXVAHD 0x00000400L 263 #define D3DCAPS3_DXVAHD_LIMITED 0x00000800L 264 265 266 // 267 // PresentationIntervals 268 // 269 #define D3DPRESENT_INTERVAL_DEFAULT 0x00000000L 270 #define D3DPRESENT_INTERVAL_ONE 0x00000001L 271 #define D3DPRESENT_INTERVAL_TWO 0x00000002L 272 #define D3DPRESENT_INTERVAL_THREE 0x00000004L 273 #define D3DPRESENT_INTERVAL_FOUR 0x00000008L 274 #define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000L 275 276 // 277 // CursorCaps 278 // 279 // Driver supports HW color cursor in at least hi-res modes(height >=400) 280 #define D3DCURSORCAPS_COLOR 0x00000001L 281 // Driver supports HW cursor also in low-res modes(height < 400) 282 #define D3DCURSORCAPS_LOWRES 0x00000002L 283 284 // 285 // DevCaps 286 // 287 #define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */ 288 #define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */ 289 #define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */ 290 #define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */ 291 #define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */ 292 #define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */ 293 #define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */ 294 #define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */ 295 #define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */ 296 #define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */ 297 #define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */ 298 #define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/ 299 #define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */ 300 #define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */ 301 #define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */ 302 #define D3DDEVCAPS_PUREDEVICE 0x00100000L /* Device supports D3DCREATE_PUREDEVICE */ 303 #define D3DDEVCAPS_QUINTICRTPATCHES 0x00200000L /* Device supports quintic Beziers and BSplines */ 304 #define D3DDEVCAPS_RTPATCHES 0x00400000L /* Device supports Rect and Tri patches */ 305 #define D3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000L /* Indicates that RT Patches may be drawn efficiently using handle 0 */ 306 #define D3DDEVCAPS_NPATCHES 0x01000000L /* Device supports N-Patches */ 307 308 // 309 // PrimitiveMiscCaps 310 // 311 #define D3DPMISCCAPS_MASKZ 0x00000002L 312 #define D3DPMISCCAPS_CULLNONE 0x00000010L 313 #define D3DPMISCCAPS_CULLCW 0x00000020L 314 #define D3DPMISCCAPS_CULLCCW 0x00000040L 315 #define D3DPMISCCAPS_COLORWRITEENABLE 0x00000080L 316 #define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100L /* Device correctly clips scaled points to clip planes */ 317 #define D3DPMISCCAPS_CLIPTLVERTS 0x00000200L /* device will clip post-transformed vertex primitives */ 318 #define D3DPMISCCAPS_TSSARGTEMP 0x00000400L /* device supports D3DTA_TEMP for temporary register */ 319 #define D3DPMISCCAPS_BLENDOP 0x00000800L /* device supports D3DRS_BLENDOP */ 320 #define D3DPMISCCAPS_NULLREFERENCE 0x00001000L /* Reference Device that doesnt render */ 321 #define D3DPMISCCAPS_INDEPENDENTWRITEMASKS 0x00004000L /* Device supports independent write masks for MET or MRT */ 322 #define D3DPMISCCAPS_PERSTAGECONSTANT 0x00008000L /* Device supports per-stage constants */ 323 #define D3DPMISCCAPS_FOGANDSPECULARALPHA 0x00010000L /* Device supports separate fog and specular alpha (many devices 324 use the specular alpha channel to store fog factor) */ 325 #define D3DPMISCCAPS_SEPARATEALPHABLEND 0x00020000L /* Device supports separate blend settings for the alpha channel */ 326 #define D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS 0x00040000L /* Device supports different bit depths for MRT */ 327 #define D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x00080000L /* Device supports post-pixel shader operations for MRT */ 328 #define D3DPMISCCAPS_FOGVERTEXCLAMPED 0x00100000L /* Device clamps fog blend factor per vertex */ 329 330 /* D3D9Ex only -- */ 331 #if !defined(D3D_DISABLE_9EX) 332 333 #define D3DPMISCCAPS_POSTBLENDSRGBCONVERT 0x00200000L /* Indicates device can perform conversion to sRGB after blending. */ 334 335 #endif // !D3D_DISABLE_9EX 336 /* -- D3D9Ex only */ 337 338 339 // 340 // LineCaps 341 // 342 #define D3DLINECAPS_TEXTURE 0x00000001L 343 #define D3DLINECAPS_ZTEST 0x00000002L 344 #define D3DLINECAPS_BLEND 0x00000004L 345 #define D3DLINECAPS_ALPHACMP 0x00000008L 346 #define D3DLINECAPS_FOG 0x00000010L 347 #define D3DLINECAPS_ANTIALIAS 0x00000020L 348 349 // 350 // RasterCaps 351 // 352 #define D3DPRASTERCAPS_DITHER 0x00000001L 353 #define D3DPRASTERCAPS_ZTEST 0x00000010L 354 #define D3DPRASTERCAPS_FOGVERTEX 0x00000080L 355 #define D3DPRASTERCAPS_FOGTABLE 0x00000100L 356 #define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L 357 #define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L 358 #define D3DPRASTERCAPS_FOGRANGE 0x00010000L 359 #define D3DPRASTERCAPS_ANISOTROPY 0x00020000L 360 #define D3DPRASTERCAPS_WBUFFER 0x00040000L 361 #define D3DPRASTERCAPS_WFOG 0x00100000L 362 #define D3DPRASTERCAPS_ZFOG 0x00200000L 363 #define D3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000L /* Device iterates colors perspective correct */ 364 #define D3DPRASTERCAPS_SCISSORTEST 0x01000000L 365 #define D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS 0x02000000L 366 #define D3DPRASTERCAPS_DEPTHBIAS 0x04000000L 367 #define D3DPRASTERCAPS_MULTISAMPLE_TOGGLE 0x08000000L 368 369 // 370 // ZCmpCaps, AlphaCmpCaps 371 // 372 #define D3DPCMPCAPS_NEVER 0x00000001L 373 #define D3DPCMPCAPS_LESS 0x00000002L 374 #define D3DPCMPCAPS_EQUAL 0x00000004L 375 #define D3DPCMPCAPS_LESSEQUAL 0x00000008L 376 #define D3DPCMPCAPS_GREATER 0x00000010L 377 #define D3DPCMPCAPS_NOTEQUAL 0x00000020L 378 #define D3DPCMPCAPS_GREATEREQUAL 0x00000040L 379 #define D3DPCMPCAPS_ALWAYS 0x00000080L 380 381 // 382 // SourceBlendCaps, DestBlendCaps 383 // 384 #define D3DPBLENDCAPS_ZERO 0x00000001L 385 #define D3DPBLENDCAPS_ONE 0x00000002L 386 #define D3DPBLENDCAPS_SRCCOLOR 0x00000004L 387 #define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L 388 #define D3DPBLENDCAPS_SRCALPHA 0x00000010L 389 #define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L 390 #define D3DPBLENDCAPS_DESTALPHA 0x00000040L 391 #define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L 392 #define D3DPBLENDCAPS_DESTCOLOR 0x00000100L 393 #define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L 394 #define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L 395 #define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L 396 #define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L 397 #define D3DPBLENDCAPS_BLENDFACTOR 0x00002000L /* Supports both D3DBLEND_BLENDFACTOR and D3DBLEND_INVBLENDFACTOR */ 398 399 /* D3D9Ex only -- */ 400 #if !defined(D3D_DISABLE_9EX) 401 402 #define D3DPBLENDCAPS_SRCCOLOR2 0x00004000L 403 #define D3DPBLENDCAPS_INVSRCCOLOR2 0x00008000L 404 405 #endif // !D3D_DISABLE_9EX 406 /* -- D3D9Ex only */ 407 408 409 // 410 // ShadeCaps 411 // 412 #define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L 413 #define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L 414 #define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L 415 #define D3DPSHADECAPS_FOGGOURAUD 0x00080000L 416 417 // 418 // TextureCaps 419 // 420 #define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L /* Perspective-correct texturing is supported */ 421 #define D3DPTEXTURECAPS_POW2 0x00000002L /* Power-of-2 texture dimensions are required - applies to non-Cube/Volume textures only. */ 422 #define D3DPTEXTURECAPS_ALPHA 0x00000004L /* Alpha in texture pixels is supported */ 423 #define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L /* Only square textures are supported */ 424 #define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L /* Texture indices are not scaled by the texture size prior to interpolation */ 425 #define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L /* Device can draw alpha from texture palettes */ 426 // Device can use non-POW2 textures if: 427 // 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage 428 // 2) D3DRS_WRAP(N) is zero for this texture's coordinates 429 // 3) mip mapping is not enabled (use magnification filter only) 430 #define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L 431 #define D3DPTEXTURECAPS_PROJECTED 0x00000400L /* Device can do D3DTTFF_PROJECTED */ 432 #define D3DPTEXTURECAPS_CUBEMAP 0x00000800L /* Device can do cubemap textures */ 433 #define D3DPTEXTURECAPS_VOLUMEMAP 0x00002000L /* Device can do volume textures */ 434 #define D3DPTEXTURECAPS_MIPMAP 0x00004000L /* Device can do mipmapped textures */ 435 #define D3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000L /* Device can do mipmapped volume textures */ 436 #define D3DPTEXTURECAPS_MIPCUBEMAP 0x00010000L /* Device can do mipmapped cube maps */ 437 #define D3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000L /* Device requires that cubemaps be power-of-2 dimension */ 438 #define D3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000L /* Device requires that volume maps be power-of-2 dimension */ 439 #define D3DPTEXTURECAPS_NOPROJECTEDBUMPENV 0x00200000L /* Device does not support projected bump env lookup operation 440 in programmable and fixed function pixel shaders */ 441 442 // 443 // TextureFilterCaps, StretchRectFilterCaps 444 // 445 #define D3DPTFILTERCAPS_MINFPOINT 0x00000100L /* Min Filter */ 446 #define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L 447 #define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L 448 #define D3DPTFILTERCAPS_MINFPYRAMIDALQUAD 0x00000800L 449 #define D3DPTFILTERCAPS_MINFGAUSSIANQUAD 0x00001000L 450 #define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L /* Mip Filter */ 451 #define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L 452 453 /* D3D9Ex only -- */ 454 #if !defined(D3D_DISABLE_9EX) 455 456 #define D3DPTFILTERCAPS_CONVOLUTIONMONO 0x00040000L /* Min and Mag for the convolution mono filter */ 457 458 #endif // !D3D_DISABLE_9EX 459 /* -- D3D9Ex only */ 460 461 #define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L /* Mag Filter */ 462 #define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L 463 #define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L 464 #define D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD 0x08000000L 465 #define D3DPTFILTERCAPS_MAGFGAUSSIANQUAD 0x10000000L 466 467 // 468 // TextureAddressCaps 469 // 470 #define D3DPTADDRESSCAPS_WRAP 0x00000001L 471 #define D3DPTADDRESSCAPS_MIRROR 0x00000002L 472 #define D3DPTADDRESSCAPS_CLAMP 0x00000004L 473 #define D3DPTADDRESSCAPS_BORDER 0x00000008L 474 #define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L 475 #define D3DPTADDRESSCAPS_MIRRORONCE 0x00000020L 476 477 // 478 // StencilCaps 479 // 480 #define D3DSTENCILCAPS_KEEP 0x00000001L 481 #define D3DSTENCILCAPS_ZERO 0x00000002L 482 #define D3DSTENCILCAPS_REPLACE 0x00000004L 483 #define D3DSTENCILCAPS_INCRSAT 0x00000008L 484 #define D3DSTENCILCAPS_DECRSAT 0x00000010L 485 #define D3DSTENCILCAPS_INVERT 0x00000020L 486 #define D3DSTENCILCAPS_INCR 0x00000040L 487 #define D3DSTENCILCAPS_DECR 0x00000080L 488 #define D3DSTENCILCAPS_TWOSIDED 0x00000100L 489 490 // 491 // TextureOpCaps 492 // 493 #define D3DTEXOPCAPS_DISABLE 0x00000001L 494 #define D3DTEXOPCAPS_SELECTARG1 0x00000002L 495 #define D3DTEXOPCAPS_SELECTARG2 0x00000004L 496 #define D3DTEXOPCAPS_MODULATE 0x00000008L 497 #define D3DTEXOPCAPS_MODULATE2X 0x00000010L 498 #define D3DTEXOPCAPS_MODULATE4X 0x00000020L 499 #define D3DTEXOPCAPS_ADD 0x00000040L 500 #define D3DTEXOPCAPS_ADDSIGNED 0x00000080L 501 #define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L 502 #define D3DTEXOPCAPS_SUBTRACT 0x00000200L 503 #define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L 504 #define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L 505 #define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L 506 #define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L 507 #define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L 508 #define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L 509 #define D3DTEXOPCAPS_PREMODULATE 0x00010000L 510 #define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L 511 #define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L 512 #define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L 513 #define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L 514 #define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L 515 #define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L 516 #define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L 517 #define D3DTEXOPCAPS_MULTIPLYADD 0x01000000L 518 #define D3DTEXOPCAPS_LERP 0x02000000L 519 520 // 521 // FVFCaps 522 // 523 #define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */ 524 #define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */ 525 #define D3DFVFCAPS_PSIZE 0x00100000L /* Device can receive point size */ 526 527 // 528 // VertexProcessingCaps 529 // 530 #define D3DVTXPCAPS_TEXGEN 0x00000001L /* device can do texgen */ 531 #define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L /* device can do DX7-level colormaterialsource ops */ 532 #define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L /* device can do directional lights */ 533 #define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L /* device can do positional lights (includes point and spot) */ 534 #define D3DVTXPCAPS_LOCALVIEWER 0x00000020L /* device can do local viewer */ 535 #define D3DVTXPCAPS_TWEENING 0x00000040L /* device can do vertex tweening */ 536 #define D3DVTXPCAPS_TEXGEN_SPHEREMAP 0x00000100L /* device supports D3DTSS_TCI_SPHEREMAP */ 537 #define D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER 0x00000200L /* device does not support TexGen in non-local 538 viewer mode */ 539 540 // 541 // DevCaps2 542 // 543 #define D3DDEVCAPS2_STREAMOFFSET 0x00000001L /* Device supports offsets in streams. Must be set by DX9 drivers */ 544 #define D3DDEVCAPS2_DMAPNPATCH 0x00000002L /* Device supports displacement maps for N-Patches*/ 545 #define D3DDEVCAPS2_ADAPTIVETESSRTPATCH 0x00000004L /* Device supports adaptive tesselation of RT-patches*/ 546 #define D3DDEVCAPS2_ADAPTIVETESSNPATCH 0x00000008L /* Device supports adaptive tesselation of N-patches*/ 547 #define D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES 0x00000010L /* Device supports StretchRect calls with a texture as the source*/ 548 #define D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH 0x00000020L /* Device supports presampled displacement maps for N-Patches */ 549 #define D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET 0x00000040L /* Vertex elements in a vertex declaration can share the same stream offset */ 550 551 // 552 // DeclTypes 553 // 554 #define D3DDTCAPS_UBYTE4 0x00000001L 555 #define D3DDTCAPS_UBYTE4N 0x00000002L 556 #define D3DDTCAPS_SHORT2N 0x00000004L 557 #define D3DDTCAPS_SHORT4N 0x00000008L 558 #define D3DDTCAPS_USHORT2N 0x00000010L 559 #define D3DDTCAPS_USHORT4N 0x00000020L 560 #define D3DDTCAPS_UDEC3 0x00000040L 561 #define D3DDTCAPS_DEC3N 0x00000080L 562 #define D3DDTCAPS_FLOAT16_2 0x00000100L 563 #define D3DDTCAPS_FLOAT16_4 0x00000200L 564 565 566 #pragma pack() 567 568 569 #endif /* (DIRECT3D_VERSION >= 0x0900) */ 570 #endif /* _d3d9CAPS_H_ */ 571 572