Update D3D headers

This commit is contained in:
twinaphex 2017-12-05 16:40:13 +01:00
parent 3ede6a9aeb
commit 3e81996bd3
3 changed files with 120 additions and 127 deletions

View File

@ -643,4 +643,4 @@ typedef struct _D3DXSHADER_STRUCTMEMBERINFO
#endif //__D3DX9SHADER_H__
#endif /* __D3DX9SHADER_H__ */

View File

@ -12,9 +12,9 @@
#ifndef DIRECT3D_VERSION
#define DIRECT3D_VERSION 0x0900
#endif //DIRECT3D_VERSION
#endif /* DIRECT3D_VERSION */
// include this file content only if compiling for DX9 interfaces
/* include this file content only if compiling for DX9 interfaces */
#if(DIRECT3D_VERSION >= 0x0900)
@ -117,7 +117,7 @@ DEFINE_GUID(D3DKEYEXCHANGE_RSAES_OAEP,
DEFINE_GUID(D3DKEYEXCHANGE_DXVA,
0x43d3775c, 0x38e5, 0x4924, 0x8d, 0x86, 0xd3, 0xfc, 0xcf, 0x15, 0x3e, 0x9b);
#endif // !D3D_DISABLE_9EX
#endif /* !D3D_DISABLE_9EX */
/* -- D3D9Ex only */
typedef struct _D3DCAPS9
@ -146,13 +146,13 @@ typedef struct _D3DCAPS9
DWORD AlphaCmpCaps;
DWORD ShadeCaps;
DWORD TextureCaps;
DWORD TextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture9's
DWORD CubeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DCubeTexture9's
DWORD VolumeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DVolumeTexture9's
DWORD TextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DTexture9's
DWORD VolumeTextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DVolumeTexture9's
DWORD TextureFilterCaps; /* D3DPTFILTERCAPS for IDirect3DTexture9's */
DWORD CubeTextureFilterCaps; /* D3DPTFILTERCAPS for IDirect3DCubeTexture9's */
DWORD VolumeTextureFilterCaps; /* D3DPTFILTERCAPS for IDirect3DVolumeTexture9's */
DWORD TextureAddressCaps; /* D3DPTADDRESSCAPS for IDirect3DTexture9's */
DWORD VolumeTextureAddressCaps; /* D3DPTADDRESSCAPS for IDirect3DVolumeTexture9's */
DWORD LineCaps; // D3DLINECAPS
DWORD LineCaps; /* D3DLINECAPS */
DWORD MaxTextureWidth, MaxTextureHeight;
DWORD MaxVolumeExtent;
@ -183,51 +183,49 @@ typedef struct _D3DCAPS9
float MaxPointSize;
DWORD MaxPrimitiveCount; // max number of primitives per DrawPrimitive call
DWORD MaxPrimitiveCount; /* max number of primitives per DrawPrimitive call */
DWORD MaxVertexIndex;
DWORD MaxStreams;
DWORD MaxStreamStride; // max stride for SetStreamSource
DWORD MaxStreamStride; /* max stride for SetStreamSource */
DWORD VertexShaderVersion;
DWORD MaxVertexShaderConst; // number of vertex shader constant registers
DWORD MaxVertexShaderConst; /* number of vertex shader constant registers */
DWORD PixelShaderVersion;
float PixelShader1xMaxValue; // max value storable in registers of ps.1.x shaders
float PixelShader1xMaxValue; /* max value storable in registers of ps.1.x shaders */
// Here are the DX9 specific ones
/* Here are the DX9 specific ones */
DWORD DevCaps2;
float MaxNpatchTessellationLevel;
DWORD Reserved5;
UINT MasterAdapterOrdinal; // ordinal of master adaptor for adapter group
UINT AdapterOrdinalInGroup; // ordinal inside the adapter group
UINT NumberOfAdaptersInGroup; // number of adapters in this adapter group (only if master)
DWORD DeclTypes; // Data types, supported in vertex declarations
DWORD NumSimultaneousRTs; // Will be at least 1
DWORD StretchRectFilterCaps; // Filter caps supported by StretchRect
UINT MasterAdapterOrdinal; /* ordinal of master adaptor for adapter group */
UINT AdapterOrdinalInGroup; /* ordinal inside the adapter group */
UINT NumberOfAdaptersInGroup; /* number of adapters in this adapter group (only if master) */
DWORD DeclTypes; /* Data types, supported in vertex declarations */
DWORD NumSimultaneousRTs; /* Will be at least 1 */
DWORD StretchRectFilterCaps; /* Filter caps supported by StretchRect */
D3DVSHADERCAPS2_0 VS20Caps;
D3DPSHADERCAPS2_0 PS20Caps;
DWORD VertexTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture9's for texture, used in vertex shaders
DWORD MaxVShaderInstructionsExecuted; // maximum number of vertex shader instructions that can be executed
DWORD MaxPShaderInstructionsExecuted; // maximum number of pixel shader instructions that can be executed
DWORD VertexTextureFilterCaps; /* D3DPTFILTERCAPS for IDirect3DTexture9's for texture, used in vertex shaders */
DWORD MaxVShaderInstructionsExecuted; /* maximum number of vertex shader instructions that can be executed */
DWORD MaxPShaderInstructionsExecuted; /* maximum number of pixel shader instructions that can be executed */
DWORD MaxVertexShader30InstructionSlots;
DWORD MaxPixelShader30InstructionSlots;
} D3DCAPS9;
//
// BIT DEFINES FOR D3DCAPS9 DWORD MEMBERS
//
/*
* BIT DEFINES FOR D3DCAPS9 DWORD MEMBERS
*/
//
// Caps
//
/*
* Caps
*/
#define D3DCAPS_OVERLAY 0x00000800L
#define D3DCAPS_READ_SCANLINE 0x00020000L
//
// Caps2
//
/* Caps2 */
#define D3DCAPS2_FULLSCREENGAMMA 0x00020000L
#define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000L
#define D3DCAPS2_RESERVED 0x02000000L
@ -240,21 +238,21 @@ typedef struct _D3DCAPS9
#define D3DCAPS2_CANSHARERESOURCE 0x80000000L
#endif // !D3D_DISABLE_9EX
#endif /* !D3D_DISABLE_9EX */
/* -- D3D9Ex only */
//
// Caps3
//
/* Caps3 */
#define D3DCAPS3_RESERVED 0x8000001fL
// Indicates that the device can respect the ALPHABLENDENABLE render state
// when fullscreen while using the FLIP or DISCARD swap effect.
// COPY and COPYVSYNC swap effects work whether or not this flag is set.
/* Indicates that the device can respect the ALPHABLENDENABLE render state
* when fullscreen while using the FLIP or DISCARD swap effect.
* COPY and COPYVSYNC swap effects work whether or not this flag is set.
*/
#define D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD 0x00000020L
// Indicates that the device can perform a gamma correction from
// a windowed back buffer containing linear content to the sRGB desktop.
/* Indicates that the device can perform a gamma correction from
* a windowed back buffer containing linear content to the sRGB desktop.
*/
#define D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION 0x00000080L
#define D3DCAPS3_COPY_TO_VIDMEM 0x00000100L /* Device can acclerate copies from sysmem to local vidmem */
@ -262,10 +260,7 @@ typedef struct _D3DCAPS9
#define D3DCAPS3_DXVAHD 0x00000400L
#define D3DCAPS3_DXVAHD_LIMITED 0x00000800L
//
// PresentationIntervals
//
/* PresentationIntervals */
#define D3DPRESENT_INTERVAL_DEFAULT 0x00000000L
#define D3DPRESENT_INTERVAL_ONE 0x00000001L
#define D3DPRESENT_INTERVAL_TWO 0x00000002L
@ -273,17 +268,13 @@ typedef struct _D3DCAPS9
#define D3DPRESENT_INTERVAL_FOUR 0x00000008L
#define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000L
//
// CursorCaps
//
// Driver supports HW color cursor in at least hi-res modes(height >=400)
/* CursorCaps */
/* Driver supports HW color cursor in at least hi-res modes(height >=400) */
#define D3DCURSORCAPS_COLOR 0x00000001L
// Driver supports HW cursor also in low-res modes(height < 400)
/* Driver supports HW cursor also in low-res modes(height < 400) */
#define D3DCURSORCAPS_LOWRES 0x00000002L
//
// DevCaps
//
/* DevCaps */
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
@ -305,9 +296,9 @@ typedef struct _D3DCAPS9
#define D3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000L /* Indicates that RT Patches may be drawn efficiently using handle 0 */
#define D3DDEVCAPS_NPATCHES 0x01000000L /* Device supports N-Patches */
//
// PrimitiveMiscCaps
//
/*
* PrimitiveMiscCaps
*/
#define D3DPMISCCAPS_MASKZ 0x00000002L
#define D3DPMISCCAPS_CULLNONE 0x00000010L
#define D3DPMISCCAPS_CULLCW 0x00000020L
@ -332,13 +323,13 @@ typedef struct _D3DCAPS9
#define D3DPMISCCAPS_POSTBLENDSRGBCONVERT 0x00200000L /* Indicates device can perform conversion to sRGB after blending. */
#endif // !D3D_DISABLE_9EX
#endif /* !D3D_DISABLE_9EX */
/* -- D3D9Ex only */
//
// LineCaps
//
/*
* LineCaps
*/
#define D3DLINECAPS_TEXTURE 0x00000001L
#define D3DLINECAPS_ZTEST 0x00000002L
#define D3DLINECAPS_BLEND 0x00000004L
@ -346,9 +337,9 @@ typedef struct _D3DCAPS9
#define D3DLINECAPS_FOG 0x00000010L
#define D3DLINECAPS_ANTIALIAS 0x00000020L
//
// RasterCaps
//
/*
* RasterCaps
*/
#define D3DPRASTERCAPS_DITHER 0x00000001L
#define D3DPRASTERCAPS_ZTEST 0x00000010L
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
@ -366,9 +357,9 @@ typedef struct _D3DCAPS9
#define D3DPRASTERCAPS_DEPTHBIAS 0x04000000L
#define D3DPRASTERCAPS_MULTISAMPLE_TOGGLE 0x08000000L
//
// ZCmpCaps, AlphaCmpCaps
//
/*
* ZCmpCaps, AlphaCmpCaps
*/
#define D3DPCMPCAPS_NEVER 0x00000001L
#define D3DPCMPCAPS_LESS 0x00000002L
#define D3DPCMPCAPS_EQUAL 0x00000004L
@ -378,9 +369,9 @@ typedef struct _D3DCAPS9
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
#define D3DPCMPCAPS_ALWAYS 0x00000080L
//
// SourceBlendCaps, DestBlendCaps
//
/*
* SourceBlendCaps, DestBlendCaps
*/
#define D3DPBLENDCAPS_ZERO 0x00000001L
#define D3DPBLENDCAPS_ONE 0x00000002L
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
@ -402,31 +393,32 @@ typedef struct _D3DCAPS9
#define D3DPBLENDCAPS_SRCCOLOR2 0x00004000L
#define D3DPBLENDCAPS_INVSRCCOLOR2 0x00008000L
#endif // !D3D_DISABLE_9EX
#endif /* !D3D_DISABLE_9EX */
/* -- D3D9Ex only */
//
// ShadeCaps
//
/*
* ShadeCaps
*/
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
//
// TextureCaps
//
/*
* TextureCaps
*/
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L /* Perspective-correct texturing is supported */
#define D3DPTEXTURECAPS_POW2 0x00000002L /* Power-of-2 texture dimensions are required - applies to non-Cube/Volume textures only. */
#define D3DPTEXTURECAPS_ALPHA 0x00000004L /* Alpha in texture pixels is supported */
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L /* Only square textures are supported */
#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L /* Texture indices are not scaled by the texture size prior to interpolation */
#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L /* Device can draw alpha from texture palettes */
// Device can use non-POW2 textures if:
// 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
// 2) D3DRS_WRAP(N) is zero for this texture's coordinates
// 3) mip mapping is not enabled (use magnification filter only)
/* Device can use non-POW2 textures if:
* 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
* 2) D3DRS_WRAP(N) is zero for this texture's coordinates
* 3) mip mapping is not enabled (use magnification filter only)
*/
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
#define D3DPTEXTURECAPS_PROJECTED 0x00000400L /* Device can do D3DTTFF_PROJECTED */
#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L /* Device can do cubemap textures */
@ -439,9 +431,9 @@ typedef struct _D3DCAPS9
#define D3DPTEXTURECAPS_NOPROJECTEDBUMPENV 0x00200000L /* Device does not support projected bump env lookup operation
in programmable and fixed function pixel shaders */
//
// TextureFilterCaps, StretchRectFilterCaps
//
/*
* TextureFilterCaps, StretchRectFilterCaps
*/
#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L /* Min Filter */
#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
@ -455,7 +447,7 @@ typedef struct _D3DCAPS9
#define D3DPTFILTERCAPS_CONVOLUTIONMONO 0x00040000L /* Min and Mag for the convolution mono filter */
#endif // !D3D_DISABLE_9EX
#endif /* !D3D_DISABLE_9EX */
/* -- D3D9Ex only */
#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L /* Mag Filter */
@ -464,9 +456,9 @@ typedef struct _D3DCAPS9
#define D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD 0x08000000L
#define D3DPTFILTERCAPS_MAGFGAUSSIANQUAD 0x10000000L
//
// TextureAddressCaps
//
/*
* TextureAddressCaps
*/
#define D3DPTADDRESSCAPS_WRAP 0x00000001L
#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
@ -474,9 +466,9 @@ typedef struct _D3DCAPS9
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
#define D3DPTADDRESSCAPS_MIRRORONCE 0x00000020L
//
// StencilCaps
//
/*
* StencilCaps
*/
#define D3DSTENCILCAPS_KEEP 0x00000001L
#define D3DSTENCILCAPS_ZERO 0x00000002L
#define D3DSTENCILCAPS_REPLACE 0x00000004L
@ -487,9 +479,9 @@ typedef struct _D3DCAPS9
#define D3DSTENCILCAPS_DECR 0x00000080L
#define D3DSTENCILCAPS_TWOSIDED 0x00000100L
//
// TextureOpCaps
//
/*
* TextureOpCaps
*/
#define D3DTEXOPCAPS_DISABLE 0x00000001L
#define D3DTEXOPCAPS_SELECTARG1 0x00000002L
#define D3DTEXOPCAPS_SELECTARG2 0x00000004L
@ -517,16 +509,16 @@ typedef struct _D3DCAPS9
#define D3DTEXOPCAPS_MULTIPLYADD 0x01000000L
#define D3DTEXOPCAPS_LERP 0x02000000L
//
// FVFCaps
//
/*
* FVFCaps
*/
#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
#define D3DFVFCAPS_PSIZE 0x00100000L /* Device can receive point size */
//
// VertexProcessingCaps
//
/*
* VertexProcessingCaps
*/
#define D3DVTXPCAPS_TEXGEN 0x00000001L /* device can do texgen */
#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L /* device can do DX7-level colormaterialsource ops */
#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L /* device can do directional lights */
@ -537,9 +529,9 @@ typedef struct _D3DCAPS9
#define D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER 0x00000200L /* device does not support TexGen in non-local
viewer mode */
//
// DevCaps2
//
/*
* DevCaps2
*/
#define D3DDEVCAPS2_STREAMOFFSET 0x00000001L /* Device supports offsets in streams. Must be set by DX9 drivers */
#define D3DDEVCAPS2_DMAPNPATCH 0x00000002L /* Device supports displacement maps for N-Patches*/
#define D3DDEVCAPS2_ADAPTIVETESSRTPATCH 0x00000004L /* Device supports adaptive tesselation of RT-patches*/
@ -548,9 +540,9 @@ typedef struct _D3DCAPS9
#define D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH 0x00000020L /* Device supports presampled displacement maps for N-Patches */
#define D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET 0x00000040L /* Vertex elements in a vertex declaration can share the same stream offset */
//
// DeclTypes
//
/*
* DeclTypes
*/
#define D3DDTCAPS_UBYTE4 0x00000001L
#define D3DDTCAPS_UBYTE4N 0x00000002L
#define D3DDTCAPS_SHORT2N 0x00000004L

View File

@ -565,25 +565,25 @@ typedef enum _D3DTEXTUREOP
D3DTOP_MODULATE4X = 6, /* multiply and 2 bits */
/* Add */
D3DTOP_ADD = 7, // add arguments together
D3DTOP_ADDSIGNED = 8, // add with -0.5 bias
D3DTOP_ADDSIGNED2X = 9, // as above but left 1 bit
D3DTOP_SUBTRACT = 10, // Arg1 - Arg2, with no saturation
D3DTOP_ADDSMOOTH = 11, // add 2 args, subtract product
// Arg1 + Arg2 - Arg1*Arg2
// = Arg1 + (1-Arg1)*Arg2
D3DTOP_ADD = 7, /* add arguments together */
D3DTOP_ADDSIGNED = 8, /* add with -0.5 bias */
D3DTOP_ADDSIGNED2X = 9, /* as above but left 1 bit */
D3DTOP_SUBTRACT = 10, /* Arg1 - Arg2, with no saturation */
D3DTOP_ADDSMOOTH = 11, /* add 2 args, subtract product */
/* Arg1 + Arg2 - Arg1*Arg2 */
/* = Arg1 + (1-Arg1)*Arg2 */
// Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha)
D3DTOP_BLENDDIFFUSEALPHA = 12, // iterated alpha
D3DTOP_BLENDTEXTUREALPHA = 13, // texture alpha
D3DTOP_BLENDFACTORALPHA = 14, // alpha from D3DRS_TEXTUREFACTOR
/* Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha) */
D3DTOP_BLENDDIFFUSEALPHA = 12, /* iterated alpha */
D3DTOP_BLENDTEXTUREALPHA = 13, /* texture alpha */
D3DTOP_BLENDFACTORALPHA = 14, /* alpha from D3DRS_TEXTUREFACTOR */
// Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha)
D3DTOP_BLENDTEXTUREALPHAPM = 15, // texture alpha
D3DTOP_BLENDCURRENTALPHA = 16, // by alpha of current color
/* Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha) */
D3DTOP_BLENDTEXTUREALPHAPM = 15, /* texture alpha */
D3DTOP_BLENDCURRENTALPHA = 16, /* by alpha of current color */
// Specular mapping
D3DTOP_PREMODULATE = 17, // modulate with next texture before use
/* Specular mapping */
D3DTOP_PREMODULATE = 17, /* modulate with next texture before use */
D3DTOP_MODULATEALPHA_ADDCOLOR = 18, // Arg1.RGB + Arg1.A*Arg2.RGB
// COLOROP only
D3DTOP_MODULATECOLOR_ADDALPHA = 19, // Arg1.RGB*Arg2.RGB + Arg1.A
@ -1601,10 +1601,11 @@ typedef enum _D3DRESOURCETYPE {
#endif /* !D3D_DISABLE_9EX */
/* -- D3D9Ex only */
// When passed to CheckDeviceFormat, D3DUSAGE_AUTOGENMIPMAP may return
// D3DOK_NOAUTOGEN if the device doesn't support autogeneration for that format.
// D3DOK_NOAUTOGEN is a success code, not a failure code... the SUCCEEDED and FAILED macros
// will return true and false respectively for this code.
/* When passed to CheckDeviceFormat, D3DUSAGE_AUTOGENMIPMAP may return
* D3DOK_NOAUTOGEN if the device doesn't support autogeneration for that format.
* D3DOK_NOAUTOGEN is a success code, not a failure code... the SUCCEEDED and FAILED macros
* will return true and false respectively for this code.
*/
#define D3DUSAGE_AUTOGENMIPMAP (0x00000400L)
#define D3DUSAGE_DMAP (0x00004000L)